Skip to main content
Glama

mcp-bridge

这是一个在 Docker 中启动 MCP 服务器,并在内部调用 llama.cpp 的 OpenAI 兼容 API 的配置。

启动

docker compose up -d --build

Related MCP server: SwiftOpenAI MCP Server

停止

docker compose down

连接地址

  • MCP 端点: http://localhost:8000/mcp

  • 传输方式: streamable-http

连接确认

即使返回 406,作为连通性确认也是正常的。 这是因为 MCP 端点需要 Accept 标头。

curl -i http://localhost:8000/mcp

Claude Code 设置

Claude Code 的 MCP 由 ~/.claude.json 管理。

若要在本地范围(仅限特定项目)手动设置, 请将 client-config.example.json 的格式应用到 ~/.claude.json 中。

推荐:通过 CLI 添加

claude mcp add --transport http local-agent-helper http://localhost:8000/mcp

设置确认

claude mcp list
claude mcp get local-agent-helper

补充说明

  • 添加 --scope user 可在所有项目中使用。

  • 使用 --scope project 时,配置将保存到项目根目录下的 .mcp.json 中。

环境变量

可以将 .env.example 复制为 .env 后使用。

  • MCP_TRANSPORT (默认: streamable-http)

  • FASTMCP_HOST (默认: 0.0.0.0)

  • FASTMCP_PORT (默认: 8000)

  • LLAMA_CPP_SERVER_URL

  • LLAMA_CPP_SERVER_MODEL

  • LLAMA_CPP_SERVER_TIMEOUT

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    F
    maintenance
    A lightweight bridge that wraps OpenAI's built-in tools (like web search and code interpreter) as Model Context Protocol servers, enabling their use with Claude and other MCP-compatible models.
    4
    12
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A universal server that enables MCP-compatible clients (like Claude Desktop, Cursor, VS Code) to access OpenAI's APIs for chat completions, image generation, embeddings, and model listing through a standardized interface.
    17 npm
    7
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that bridges MCP clients with local LLM services, enabling seamless integration with MCP-compatible applications through standard tools like chat completion, model listing, and health checks.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Bridges MCP tool calls with OpenAI-compatible HTTP endpoints, allowing MCP clients to forward chat completion requests through a unified FastAPI server that returns responses with MCP-specific headers.
    1
    -