loading…
Search for a command to run...
loading…
This MCP server exposes approved GraphQL operations from an Apollo GraphQL API as AI-accessible tools. It sits between MCP clients and the GraphQL API, translat
This MCP server exposes approved GraphQL operations from an Apollo GraphQL API as AI-accessible tools. It sits between MCP clients and the GraphQL API, translating tool calls into GraphQL queries and returning results in MCP format.
This folder sets up the same core architecture Apollo demonstrates for MCP:
This version uses the standalone Apollo MCP Server container instead of the rover init --mcp wizard because it is simpler to run locally without GraphOS credentials.
api: a tiny Apollo Server on http://localhost:4001/mcp: Apollo MCP Server on http://localhost:8000/mcpflowchart 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
In a second terminal, inspect the MCP server:
npx @modelcontextprotocol/inspector
Then open the Inspector URL it prints, choose:
Streamable HTTPhttp://127.0.0.1:8000/mcpClick Connect, then List Tools.
You should see MCP tools derived from:
GetBooksGetBookByIdGetBooksByGenreFor MCP clients that use mcp-remote, the local config shape is:
{
"mcpServers": {
"apollo-demo": {
"command": "npx",
"args": [
"mcp-remote",
"http://127.0.0.1:8000/mcp"
]
}
}
}
The GraphQL API is still the real data service. It knows the schema, resolves fields, and returns JSON for GraphQL queries.
Apollo MCP Server does not replace that API. It sits in front of it and translates approved GraphQL operations into MCP tools that an AI client can discover and call.
The important files are:
The request flow is:
http://localhost:8000/mcp..graphql operation files.http://api:4001/.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 is useful when:
For a simple local demo with one existing GraphQL API, Apollo's own deployment docs support using the standalone Apollo MCP Server container directly against that endpoint. That is what this project uses.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"apollo-mcp-demo": {
"command": "npx",
"args": []
}
}
}