mcp-bridge
Enables LLMs to use llama.cpp models via MCP protocol by bridging MCP requests to an OpenAI-compatible API.
README
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 に向ける
起動
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/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 \
--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)
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.