Back to MCP directory
publicPublicdnsLocal runtime

Dynamic MCP Server Creator

动态MCP服务器管理服务,支持创建、运行和管理子MCP服务器

article

README

🚀 MCP 创建服务器

MCP 创建服务器是一个动态的 MCP 服务器管理服务,可创建、运行和管理模型上下文协议 (MCP) 服务器。该服务自身作为 MCP 服务器运行,还能启动并管理其他 MCP 服务器作为子进程,以此实现灵活的 MCP 生态系统。

🚀 快速开始

你可以通过以下步骤快速开启 MCP 创建服务器的使用之旅。

✨ 主要特性

  • 可动态创建和执行 MCP 服务器代码。
  • 当前仅支持 TypeScript ,未来版本计划支持 JavaScript 和 Python。
  • 能在子 MCP 服务器上执行工具。
  • 支持服务器代码更新和重启。
  • 可删除不必要的服务器。

📦 安装指南

注意:Docker 是运行此服务的推荐方式

Docker 安装(推荐)

# 构建 Docker 镜像
docker build -t mcp-create .

# 运行 Docker 容器
docker run -it --rm mcp-create

手动安装(仅限 TypeScript)

# 克隆仓库
git clone https://github.com/tesla0225/mcp-create.git
cd mcp-create

# 安装依赖项
npm install

# 构建
npm run build

# 运行
npm start

📚 详细文档

与 Claude Desktop 集成

在你的 Claude Desktop 配置文件(claude_desktop_config.json)中添加以下内容:

{
  "mcpServers": {
    "mcp-create": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp-create"]
    }
  }
}

可用工具

| 工具名称 | 描述 | 输入参数 | 输出 | |----------|------|---------|-----| | create-server-from-template | 从模板创建 MCP 服务器 | language: string | { serverId: string, message: string } | | execute-tool | 在服务器上执行工具 | serverId: string
toolName: string
args: object | 工具执行结果 | | get-server-tools | 获取服务器工具列表 | serverId: string | { tools: ToolDefinition[] } | | delete-server | 删除服务器 | serverId: string | { success: boolean, message: string } | | list-servers | 获取运行中的服务器列表 | 无 | { servers: string[] } |

💻 使用示例

基础用法

创建新服务器

{
  "name": "create-server-from-template",
  "arguments": {
    "language": "typescript"
  }
}

执行工具

{
  "name": "execute-tool",
  "arguments": {
    "serverId": "ba7c9a4f-6ba8-4cad-8ec8-a41a08c19fac",
    "toolName": "echo",
    "args": {
      "message": "Hello, dynamic MCP server!"
    }
  }
}

🔧 技术细节

  • 运行环境:Node.js 18 或更高版本。
  • 开发语言:TypeScript(必需)。
  • 依赖项
    • @modelcontextprotocol/sdk: MCP 客户端/服务器实现。
    • child_process(Node.js 核心模块):用于与子进程通信。
    • util(Node.js 核心模块):用于获取操作系统信息。

🔒 安全考虑

⚠️ 重要提示

  • 代码执行限制:仅允许通过受信任的模板创建和执行服务器代码。
  • 资源限制:通过 Docker 容器化技术对计算和内存资源进行隔离和限制。
  • 网络访问控制:默认情况下,容器内的服务无法访问外部网络。
  • 日志记录与监控:所有操作都会被记录,并可以通过日志分析工具进行监控。

📄 许可证

[此处应添加具体的许可证信息]

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client