From 0f6c3ff58506bfa4eb1767a030d6ffb82d35d6c0 Mon Sep 17 00:00:00 2001 From: Sense T Date: Fri, 29 May 2026 02:49:35 +0000 Subject: [PATCH] =?UTF-8?q?mcp-proxy=20=E4=B9=9F=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E7=94=A8=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mcp-proxy/config.json | 12 +++++++ mcp-proxy/deploy.yaml | 61 ++++++++++++++++++++++++++++++++++++ mcp-proxy/kustomization.yaml | 20 ++++++++++++ mcp-proxy/service.yaml | 10 ++++++ mcp-proxy/start.sh | 14 +++++++++ 5 files changed, 117 insertions(+) create mode 100644 mcp-proxy/config.json create mode 100644 mcp-proxy/deploy.yaml create mode 100644 mcp-proxy/kustomization.yaml create mode 100644 mcp-proxy/service.yaml create mode 100644 mcp-proxy/start.sh diff --git a/mcp-proxy/config.json b/mcp-proxy/config.json new file mode 100644 index 0000000..1ff10ea --- /dev/null +++ b/mcp-proxy/config.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://json.schemastore.org/claude-code-settings.json", + "mcpServers": { + "sequential-thinking": { + "command": "npx", + "args": [ + "-y", + "@modelcontextprotocol/server-sequential-thinking" + ] + } + } +} \ No newline at end of file diff --git a/mcp-proxy/deploy.yaml b/mcp-proxy/deploy.yaml new file mode 100644 index 0000000..44b1dfe --- /dev/null +++ b/mcp-proxy/deploy.yaml @@ -0,0 +1,61 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mcp-proxy +spec: + selector: + matchLabels: + app: mcp-proxy + template: + metadata: + labels: + app: mcp-proxy + spec: + volumes: + - name: config + configMap: + name: mcp-proxy + - name: tmp + emptyDir: + medium: Memory + containers: + - name: mcp-proxy + image: image + resources: + limits: + memory: "1Gi" + cpu: "1Gi" + requests: + memory: "512Mi" + cpu: "250m" + ports: + - containerPort: 8080 + command: + - /bin/sh + - /start.sh + env: + - name: NPM_CONFIG_REGISTRY + value: https://registry.npmmirror.com/ + volumeMounts: + - mountPath: /config.json + name: config + subPath: config.json + - mountPath: /start.sh + name: config + subPath: start.sh + livenessProbe: + httpGet: + port: 8080 + path: /status + initialDelaySeconds: 60 + periodSeconds: 10 + successThreshold: 1 + failureThreshold: 3 + timeoutSeconds: 5 + readinessProbe: + httpGet: + port: 8080 + path: /status + periodSeconds: 3 + successThreshold: 1 + timeoutSeconds: 5 \ No newline at end of file diff --git a/mcp-proxy/kustomization.yaml b/mcp-proxy/kustomization.yaml new file mode 100644 index 0000000..7e65683 --- /dev/null +++ b/mcp-proxy/kustomization.yaml @@ -0,0 +1,20 @@ +# yaml-language-server: $schema=https://json.schemastore.org/kustomization.json +kind: Kustomization +replicas: +- name: mcp-proxy + count: 1 +resources: +- deploy.yaml +- service.yaml +configMapGenerator: +- name: mcp-proxy + files: + - config.json + - start.sh +images: +- name: image + newName: ghcr.io/sparfenyuk/mcp-proxy + newTag: v0.12.0 +- name: node + newName: cr.wetofu.me/library/node + newTag: lts-alpine3.23 \ No newline at end of file diff --git a/mcp-proxy/service.yaml b/mcp-proxy/service.yaml new file mode 100644 index 0000000..326d218 --- /dev/null +++ b/mcp-proxy/service.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: mcp-proxy +spec: + selector: + app: mcp-proxy + ports: + - port: 8080 + targetPort: 8080 diff --git a/mcp-proxy/start.sh b/mcp-proxy/start.sh new file mode 100644 index 0000000..9a99a18 --- /dev/null +++ b/mcp-proxy/start.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories +apk add --no-cache npm + +which node +which npm +which npx + +catatonit -- mcp-proxy \ + --named-server-config /config.json \ + --host '0.0.0.0' \ + --port '8080' \ + --allow-origin '*' \ No newline at end of file