Lets agents introspect GraphQL schemas and run queries against GraphQL APIs.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add graphql --env ENDPOINT='<ENDPOINT>' -- npx mcp-graphql~/.codex/config.toml
[mcp_servers.graphql]
command = "npx"
args = ["mcp-graphql"]
env = { ENDPOINT = "<ENDPOINT>" }
# codex mcp add graphql --env ENDPOINT='<ENDPOINT>' -- npx mcp-graphql~/.cursor/mcp.json
{
"mcpServers": {
"graphql": {
"command": "npx",
"args": [
"mcp-graphql"
],
"env": {
"ENDPOINT": "<ENDPOINT>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"graphql": {
"type": "stdio",
"command": "npx",
"args": [
"mcp-graphql"
],
"env": {
"ENDPOINT": "<ENDPOINT>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"graphql": {
"command": "npx",
"args": [
"mcp-graphql"
],
"env": {
"ENDPOINT": "<ENDPOINT>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"graphql": {
"command": "npx",
"args": [
"mcp-graphql"
],
"env": {
"ENDPOINT": "<ENDPOINT>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"graphql": {
"command": "npx",
"args": [
"mcp-graphql"
],
"env": {
"ENDPOINT": "<ENDPOINT>"
}
}
}
}Environment variables
ENDPOINT
Replace the placeholders with your own credentials and keep them out of version control.