Model Context Protocol Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Provides containerization capabilities for the MCP server, allowing for consistent deployment across environments using Docker images.

  • Enables deployment and management of the MCP server on Kubernetes clusters, with support for scaling, health checks, and configuration management through Kubernetes resources.

  • Supports running the MCP server on Node.js runtime environments, allowing developers to build and extend MCP functionality using Node.js ecosystem.

模型上下文协议 (MCP) 服务器

此存储库包含 Azure Kubernetes 服务 (AKS) 上 MCP 服务器的 Kubernetes 部署配置。

先决条件

  • Azure CLI
  • 库布克特尔
  • Docker
  • Node.js 18+

项目结构

. ├── k8s/ │ ├── deployment.yaml # Kubernetes deployment configuration │ ├── service.yaml # Kubernetes service configuration │ └── configmap.yaml # Kubernetes configmap for environment variables ├── src/ # Source code directory ├── Dockerfile # Container build configuration ├── package.json # Node.js dependencies └── tsconfig.json # TypeScript configuration

部署步骤

  1. 构建 Docker 镜像:
docker build -t mcp-server:latest .
  1. 将映像推送到 Azure 容器注册表 (ACR):
az acr login --name <your-acr-name> docker tag mcp-server:latest <your-acr-name>.azurecr.io/mcp-server:latest docker push <your-acr-name>.azurecr.io/mcp-server:latest
  1. 应用 Kubernetes 清单:
kubectl apply -f k8s/
  1. 验证部署:
kubectl get pods kubectl get services

配置

可以通过 ConfigMap( k8s/configmap.yaml )中定义的环境变量来配置应用程序。

健康检查

该应用程序公开了一个/health端点,用于 Kubernetes 健康检查。

监控

  • 可以通过 Azure Monitor 监视资源使用情况
  • 可以通过kubectl logs获取应用程序日志

安全

  • 该应用程序使用HTTPS
  • CORS 配置用于安全的跨域请求
  • 实施速率限制以防止滥用
  • Helmet.js 用于安全标头

缩放

默认情况下,部署配置了 3 个副本。您可以使用以下方式进行扩展或缩减:

kubectl scale deployment mcp-server --replicas=<number>
-
security - not tested
F
license - not found
-
quality - not tested

用于模型上下文协议的 Kubernetes 部署服务器,可实现与可配置环境变量的安全通信、运行状况监视以及在 Azure Kubernetes 服务上的可扩展部署。

  1. Prerequisites
    1. Project Structure
      1. Deployment Steps
        1. Configuration
          1. Health Checks
            1. Monitoring
              1. Security
                1. Scaling
                  ID: p1578zb7bw