Skip to content

GraphQL MCPTurn your GraphQL API into AI-ready tools

Every query becomes a read tool. Every mutation becomes a write tool. Claude, ChatGPT, Cursor, and any MCP client can call them instantly.

MCP (Model Context Protocol) lets AI agents call external tools. GraphQL MCP reads your schema and generates those tools automatically — no boilerplate, no manual definitions.

Your schema becomes AI tools

Your GraphQL schema

graphql
type Query {
  tasks(status: Status, priority: Priority): [Task!]!
  task(id: UUID!): Task
}

type Mutation {
  createTask(title: String!, priority: Priority): Task!
  deleteTask(id: UUID!): Boolean!
}

enum Status { TODO, IN_PROGRESS, DONE }
enum Priority { LOW, MEDIUM, HIGH, CRITICAL }

Generated MCP tools

text
tasks(status?, priority?) → [Task]
  List all tasks, filtered by status or priority.

task(id) → Task
  Get a single task by ID.

create_task(title, priority?) → Task
  Create a new task.

delete_task(id) → bool
  Delete a task by ID.

Types, descriptions, enums, and optionality are all preserved automatically.

From a Python schema

python
from graphql_mcp import GraphQLMCP

api = ...  # your Strawberry, Ariadne, Graphene, or graphql-api schema
server = GraphQLMCP.from_api(api, name="My API")
app = server.http_app()

From any existing GraphQL API

python
from graphql_mcp import GraphQLMCP

server = GraphQLMCP.from_remote_url("https://api.example.com/graphql")
app = server.http_app()

Works with

StrawberryAriadneGraphenegraphql-apiAny graphql-core schemaRemote GraphQL endpoints