mcp-bridge
mcp-bridge
Docker で MCP サーバを起動し、内部で llama.cpp の OpenAI 互換 API を呼び出す構成です。
セットアップ
.env.exampleを.envにコピーMCP_API_TOKENを 32 文字以上のランダム値に設定echo "MCP_API_TOKEN=$(openssl rand -hex 32)" >> .env必要に応じて
LLAMA_CPP_SERVER_URLをリモートの llama.cpp に向ける
Related MCP server: SwiftOpenAI MCP Server
起動
docker compose up -d --build停止
docker compose down接続先
MCP エンドポイント:
http://localhost:8000/mcpトランスポート:
streamable-http
接続確認
認証が有効になっているため、Bearer トークンが必要です。 401 が返る場合は未認証、406 が返る場合は到達確認としては正常です (MCP エンドポイントは Accept ヘッダー前提のため)。
# 未認証 -> 401
curl -i http://localhost:8000/mcp
# 認証あり -> 406 (到達OK)
curl -i -H "Authorization: Bearer $MCP_API_TOKEN" http://localhost:8000/mcpClaude 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 \
--header "Authorization: Bearer $MCP_API_TOKEN"設定確認
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_URLLLAMA_CPP_SERVER_MODELLLAMA_CPP_SERVER_TIMEOUTMCP_API_TOKEN(必須・32文字以上)MAX_INPUT_CHARS(既定:200000)
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseBqualityFmaintenanceA 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.412MIT
- AlicenseNot gradedqualityCmaintenanceA 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 npm7MIT
- FlicenseNot gradedqualityDmaintenanceA 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.-
- FlicenseNot gradedqualityDmaintenanceBridges 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-