模型上下文提供服务器模板

MCP服务器模板是一个用于构建和运行模型上下文提供服务的容器化解决方案,支持通过Podman或Docker运行。

  • by redhat-community-ai-tools
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 maorfr/mcp-server-template

使用说明

mcp服务器模板

MCP(ModelContextProvider)服务器模板


在当地建设

要使用Podman在本地构建容器映像,请运行:

podman build -t mcp-server-template:latest .

这将创建一个名为的本地映像 mcp-server-template:latest 您可以使用它来运行服务器。

使用Podman或Docker运行

使用Podman运行的示例配置:

{
  "mcpServers": {
    "mcp-server": {
      "command": "podman",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e", "API_BASE_URL",
        "-e", "API_KEY",
        "-e", "MCP_TRANSPORT",
        "localhost/mcp-server-template:latest"
      ],
      "env": {
        "API_BASE_URL": "https://api.example.com",
        "API_KEY": "REDACTED",
        "MCP_TRANSPORT": "stdio"
      }
    }
  }
}