GraphMCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GraphMCPWho commented on Grace Hopper's posts?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GraphMCP
An MCP server that speaks GraphQL. Instead of exposing one tool per endpoint, GraphMCP gives AI agents a single typed query surface: the agent reads the schema, then composes exactly the query it needs — nested relations in one call, only the fields it wants.
Ships with a mock blog dataset (users → posts → comments) so you can try it the moment you clone it.
Why
Concern | Tool-per-endpoint MCP server | GraphMCP |
Tool count | Grows with the API (tool explosion) | 4 fixed tools |
Over-fetching | Full payloads → wasted tokens | Agent selects only needed fields |
Related data | One round trip per relation | Nested selections, single call |
Discoverability | Prose tool descriptions | Typed schema (SDL) with doc strings |
Self-correction | Errors only after execution | Pre-flight |
Related MCP server: anyapi-mcp-server
Quickstart
Requires Python 3.10+.
git clone https://github.com/<you>/GraphMCP.git
cd GraphMCP
python -m venv .venv
# Windows
.venv\Scripts\python.exe -m pip install -e ".[dev]"
.venv\Scripts\python.exe -m pytest -q # verify: 12 tests
# macOS / Linux
.venv/bin/python -m pip install -e ".[dev]"
.venv/bin/python -m pytest -qInteracting with it
Option 1 — MCP Inspector (fastest way to poke at the mock data)
npx @modelcontextprotocol/inspector .venv/Scripts/python.exe -m graphmcp.serverOpens a browser UI where you can list the tools, read the graphql://schema
resource, and run queries by hand.
Option 2 — VS Code agent mode
.vscode/mcp.json is preconfigured. Open the repo in VS Code,
start the graphmcp server from the MCP view, then ask Copilot agent mode things
like "Who commented on Grace Hopper's posts?" and watch it discover the schema
and compose queries.
Option 3 — Any MCP client (Claude Desktop, etc.)
{
"mcpServers": {
"graphmcp": {
"command": "/absolute/path/to/GraphMCP/.venv/bin/python",
"args": ["-m", "graphmcp.server"],
"env": { "GRAPHMCP_ALLOW_MUTATIONS": "1" }
}
}
}(On Windows the command is ...\GraphMCP\.venv\Scripts\python.exe.)
What the server exposes
Kind | Name | Purpose |
Resource |
| The SDL, loadable as context up front |
Tool |
| Same SDL for clients that prefer tools over resources |
Tool |
| Parse + validate + measure depth without executing |
Tool |
| Read-only execution; mutations rejected |
Tool |
| Writes, only when |
Example: query the mock data
query($role: Role) {
users(role: $role) {
name
posts(limit: 2) {
title
comments { author { name } text }
}
}
}with variables {"role": "ADMIN"} returns, in one round trip:
{"data": {"users": [{"name": "Ada Lovelace", "posts": [{"title": "...", "comments": [...]}]}]}}Example: write to the mock data
mutation($input: CreatePostInput!) {
createPost(input: $input) { id published }
}with {"input": {"authorId": "u3", "title": "Hello", "body": "..."}}.
The store is in-memory — restart the server and you're back to the seed data.
Configuration
Env var | Default | Effect |
| off | Set to |
|
| Max query nesting depth (fragment-cycle safe) |
Other rails: graphql_query hard-rejects mutations, subscriptions are always
rejected, and all errors come back as standard GraphQL {message, locations, path}
shapes that models know how to read and repair.
How it's built
flowchart LR
Agent["AI agent (MCP client)"] -- "MCP stdio" --> Tools
subgraph GraphMCP["GraphMCP server"]
direction TB
Tools["Tools: graphql_query / graphql_validate / graphql_mutate / graphql_schema"]
Schema["Resource: graphql://schema (SDL)"]
Engine["Engine: parse → gate ops → validate → depth-check → execute"]
Resolvers["Resolvers"]
end
Tools --> Engine --> Resolvers --> Store[("In-memory mock store<br/>(swap for DB / REST fan-out / services)")]
Agent -. "reads schema" .-> SchemaEach layer is independently swappable:
src/graphmcp/data.py — in-memory mock dataset. Replace with any real backend.
src/graphmcp/schema.py — SDL with doc strings (they travel to the model) + resolver wiring.
src/graphmcp/engine.py — execution pipeline with safety rails; no MCP dependency.
src/graphmcp/server.py — thin MCP wiring: tools, resource, instructions.
Roadmap ideas
Swap
data.pyfor a real datasource (SQL, REST fan-out, microservices) — the classic GraphQL gateway pattern, now agent-facing.Per-field auth, query cost analysis, timeouts, result-size caps.
Persisted-query allowlists for high-trust deployments.
GraphQL subscriptions mapped onto MCP notifications.
Contributions and issues welcome.
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
- Alicense-qualityFmaintenanceA 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 contextLast updated6047MIT
- Alicense-qualityDmaintenanceA universal MCP server that connects any REST API to AI assistants via OpenAPI or Postman specifications. It enables dynamic tool creation with GraphQL-style field selection and automatic schema inference for efficient data retrieval.Last updated95Inno Setup
- AlicenseAqualityDmaintenanceAn MCP server that powers AI agents with indexed blockchain data from The Graph.Last updated3MIT
- Alicense-qualityDmaintenanceA generic MCP server that converts .graphql query files into tools for Claude, enabling interaction with any GraphQL API without coding.Last updatedMIT
Related MCP Connectors
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
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/NarglesCS/GraphMCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server