by drestrepom
MCP GraphQL is a Model Context Protocol (MCP) server that bridges GraphQL APIs, automatically exposing each GraphQL query as a separate MCP tool. It simplifies the integration of GraphQL services with MCP-compatible clients, enabling seamless communication and consumption of GraphQL APIs.
MCP GraphQL is a Model Context Protocol (MCP) server designed to facilitate interaction with GraphQL APIs. It acts as a bridge, automatically exposing each GraphQL query as a separate MCP tool, enabling MCP-compatible clients to seamlessly communicate with GraphQL services.
Installation:
uv
(recommended): No specific installation is needed; use uvx
to directly run mcp-graphql
.pip
: pip install mcp-graphql
pip install .
Usage:
uvx
: uvx mcp-graphql --api-url="https://api.example.com/graphql" --auth-token="your-token"
pip
installation: mcp-graphql --api-url="https://api.example.com/graphql" --auth-token="your-token"
serve
from mcp_graphql
and use asyncio.run(serve(api_url, auth_headers))
.Configuration for Claude.app:
Add mcpServers
configuration to your Claude settings, specifying the command and arguments for mcp-graphql
using uvx
, Docker, or pip
installation.
An MCP (Model Context Protocol) server that enables interaction with GraphQL APIs.
MCP GraphQL is a tool that implements the Model Context Protocol (MCP) to provide a standardized interface for interacting with GraphQL APIs. It automatically exposes each GraphQL query as a separate MCP tool, allowing MCP-compatible clients to seamlessly communicate with GraphQL services.
When using uv
no specific installation is needed. We will
use uvx
to directly run mcp-graphql.
Alternatively you can install mcp-graphql
via pip:
pip install mcp-graphql
git clone https://github.com/your-username/mcp_graphql.git
cd mcp_graphql
pip install .
Using uvx:
uvx mcp-graphql --api-url="https://api.example.com/graphql" --auth-token="your-token"
Using pip installation:
mcp-graphql --api-url="https://api.example.com/graphql" --auth-token="your-token"
or
python -m mcp_graphql --api-url="https://api.example.com/graphql" --auth-token="your-token"
--api-url
: GraphQL API URL (required)--auth-token
: Authentication token (optional)--auth-type
: Authentication type, default is "Bearer" (optional)--auth-headers
: Custom authentication headers in JSON format (optional)Example with custom headers:
mcp-graphql --api-url="https://api.example.com/graphql" --auth-headers='{"Authorization": "Bearer token", "X-API-Key": "key"}'
import asyncio
from mcp_graphql import serve
auth_headers = {"Authorization": "Bearer your-token"}
api_url = "https://api.example.com/graphql"
asyncio.run(serve(api_url, auth_headers))
Add to your Claude settings:
"mcpServers": {
"graphql": {
"command": "uvx",
"args": ["mcp-graphql", "--api-url", "https://api.example.com/graphql"]
}
}
"mcpServers": {
"graphql": {
"command": "docker",
"args": ["run", "-i", "--rm", "mcp/graphql", "--api-url", "https://api.example.com/graphql"]
}
}
"mcpServers": {
"graphql": {
"command": "python",
"args": ["-m", "mcp_graphql", "--api-url", "https://api.example.com/graphql"]
}
}
MCP GraphQL automatically:
When a tool is called, the server:
# Create virtual environment using uv
uv venv
# Install dependencies
uv sync
ruff check .
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions are welcome. Please feel free to submit a Pull Request or open an Issue.
Please log in to share your review and rating for this MCP.
Discover more MCP servers with similar functionality and use cases
by zed-industries
Provides real-time collaborative editing powered by Rust, enabling developers to edit code instantly across machines with a responsive, GPU-accelerated UI.
by cline
Provides autonomous coding assistance directly in the IDE, enabling file creation, editing, terminal command execution, browser interactions, and tool extension with user approval at each step.
by continuedev
Provides continuous AI assistance across IDEs, terminals, and CI pipelines, offering agents, chat, inline editing, and autocomplete to accelerate software development.
by github
Enables AI agents, assistants, and chatbots to interact with GitHub via natural‑language commands, providing read‑write access to repositories, issues, pull requests, workflows, security data and team activity.
by block
Automates engineering tasks by installing, executing, editing, and testing code using any large language model, providing end‑to‑end project building, debugging, workflow orchestration, and external API interaction.
by RooCodeInc
An autonomous coding agent that lives inside VS Code, capable of generating, refactoring, debugging code, managing files, running terminal commands, controlling a browser, and adapting its behavior through custom modes and instructions.
by lastmile-ai
A lightweight, composable framework for building AI agents using Model Context Protocol and simple workflow patterns.
by firebase
Provides a command‑line interface to manage, test, and deploy Firebase projects, covering hosting, databases, authentication, cloud functions, extensions, and CI/CD workflows.
by gptme
Empowers large language models to act as personal AI assistants directly inside the terminal, providing capabilities such as code execution, file manipulation, web browsing, vision, and interactive tool usage.