Apollo MCP Demo
Apollo MCP デモ
このフォルダーは、Apollo が MCP 用にデモンストレーションしているコアアーキテクチャを構築します。
通常の GraphQL API
その手前に配置された Apollo MCP サーバー
MCP ツールとなる GraphQL 操作の小さな許可リスト
このバージョンでは、GraphOS の認証情報なしでローカルで簡単に実行できるように、rover init --mcp ウィザードの代わりにスタンドアロンの Apollo MCP サーバーコンテナを使用しています。
開始されるもの
api:http://localhost:4001/で動作する小さな Apollo Servermcp:http://localhost:8000/mcpで動作する Apollo MCP サーバー
Related MCP server: mcp4gql
アーキテクチャ図
flowchart LR
subgraph LocalMachine["Local machine"]
Client["MCP client\nInspector / Codex / Cursor"]
subgraph Docker["docker compose"]
MCP["Apollo MCP Server\n:8000/mcp"]
API["Apollo GraphQL API\n:4001"]
end
Ops["graphql/operations/*.graphql\nApproved operations"]
Schema["graphql/api.graphql\nSchema snapshot"]
end
Client -->|"MCP over Streamable HTTP"| MCP
Ops -->|"tool definitions"| MCP
Schema -->|"schema metadata"| MCP
MCP -->|"GraphQL queries/mutations"| API
API -->|"GraphQL JSON response"| MCP
MCP -->|"MCP tool results"| Client実行方法
cd C:\Users\muham\Documents\apollo-mcp
npm install
docker compose up --build別のターミナルで、MCP サーバーを検査します:
npx @modelcontextprotocol/inspector次に、表示されたインスペクターの URL を開き、以下を選択します:
Transport Type:
Streamable HTTPURL:
http://127.0.0.1:8000/mcp
Connect をクリックし、次に List Tools をクリックします。
以下から派生した MCP ツールが表示されるはずです:
GetBooksGetBookByIdGetBooksByGenre
オプションのクライアント設定
mcp-remote を使用する MCP クライアントの場合、ローカル設定の形式は以下の通りです:
{
"mcpServers": {
"apollo-demo": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8000/mcp"
]
}
}
}実際に何が起きているのか
GraphQL API は依然として実際のデータサービスです。スキーマを把握し、フィールドを解決し、GraphQL クエリに対して JSON を返します。
Apollo MCP サーバーはその API を置き換えるものではありません。その手前に位置し、承認された GraphQL 操作を AI クライアントが発見して呼び出せる MCP ツールに変換します。
重要なファイルは以下の通りです:
mcp-config.yaml: GraphQL エンドポイントの場所、スキーマファイルの場所、許可された操作の場所、および MCP を HTTP 経由で公開する方法を Apollo MCP サーバーに伝えます。
graphql/api.graphql: Apollo MCP サーバーがツールを正しく記述できるように使用されるスキーマのスナップショットです。
graphql/operations/GetBooks.graphql: 1 つの MCP ツールとなる承認済みのクエリです。
src/server.mjs: 実際の GraphQL API 実装です。
docker-compose.yml: 両方のサービスを 1 つのローカルネットワーク上で同時に実行します。
リクエストの流れは以下の通りです:
MCP クライアントが
http://localhost:8000/mcpに接続します。Apollo MCP サーバーが
.graphql操作ファイルに基づいてツールをアドバタイズします。クライアントが引数を指定してそれらのツールのいずれかを呼び出します。
Apollo MCP サーバーがそのツール呼び出しを基盤となる GraphQL 操作に変換します。
Apollo MCP サーバーがその GraphQL リクエストを
http://api:4001/に送信します。GraphQL API がクエリを実行し、データを返します。
Apollo MCP サーバーが結果を MCP 形式で MCP クライアントに返します。
リクエストフロー図
sequenceDiagram
autonumber
participant C as MCP Client
participant M as Apollo MCP Server
participant O as Operation Files
participant G as GraphQL API
C->>M: Connect to http://localhost:8000/mcp
M->>O: Load approved .graphql operations
O-->>M: GetBooks / GetBookById / GetBooksByGenre
M-->>C: Advertise MCP tools
C->>M: Invoke tool with arguments
M->>M: Convert tool call to GraphQL operation
M->>G: Send GraphQL request to http://api:4001/
G-->>M: Return GraphQL JSON data
M-->>C: Return MCP-formatted tool resultなぜここにルーターがないのか
Apollo Router は以下の場合に役立ちます:
フェデレーションされたスーパーグラフを提供している場合
Apollo の GraphOS 管理ランタイムを使用したい場合
または、GraphQL と MCP を Apollo Runtime にバンドルしたい場合
既存の GraphQL API が 1 つあるシンプルなローカルデモの場合、Apollo のデプロイメントドキュメントでは、そのエンドポイントに対してスタンドアロンの Apollo MCP サーバーコンテナを直接使用することがサポートされています。このプロジェクトではそれを使用しています。
ソース
Apollo MCP サーバークイックスタート: https://www.apollographql.com/docs/apollo-mcp-server/quickstart
Apollo MCP サーバー設定リファレンス: https://www.apollographql.com/docs/apollo-mcp-server/command-reference
Apollo MCP サーバーデプロイドキュメント: https://www.apollographql.com/docs/apollo-mcp-server/deploy
Apollo MCP サーバーデバッグドキュメント: https://www.apollographql.com/docs/apollo-mcp-server/debugging
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceA MCP server that exposes GraphQL schema information to LLMs like Claude. This server allows an LLM to explore and understand large GraphQL schemas through a set of specialized tools, without needing to load the whole schema into the context7047MIT
- AlicenseAqualityDmaintenanceGraphQL MCP Server that acts as a bridge allowing MCP clients (like Cursor or Claude Desktop) to interact with target GraphQL APIs through standard tools for schema introspection and operation execution.2153MIT
- AlicenseAqualityAmaintenanceA generic MCP (Model Context Protocol) server that bridges any GraphQL API to Claude Code. It introspects your GraphQL schema and exposes each query and mutation as an individual tool, letting Claude interact with your API directly.2521MIT
- AlicenseNot gradedqualityDmaintenanceA generic MCP server that converts .graphql query files into tools for Claude, enabling interaction with any GraphQL API without coding.MIT
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
MCP server for AI access to Swagger by SmartBear.
MCP server for AI access to SmartBear tools, including BugSnag, Reflect, Swagger, PactFlow, QTM4J.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mabdullah679/apollo-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server