executeGraphQLOperation
Executes an arbitrary GraphQL query or mutation against the target API. Use introspectGraphQLSchema first to understand the available operations.
Introspect a GraphQL API's schema, then run any query or mutation against it — whatever endpoint you point it at.
LABSCO SUMMARY
Introspection is what makes the second tool usable: without it a model guesses field names and gets back a syntax error it cannot diagnose. Worth knowing that executeGraphQLOperation runs mutations too, so whatever the token you configure is allowed to do is the actual boundary.
A bridge between an MCP client and one GraphQL API. It fetches the schema by introspection so the model can see what exists, then executes whatever operation you write against the same endpoint.
Node. The endpoint URL is required. A bearer token is optional and only needed if the API authenticates.
One command — npx -y mcp4gql
USE CASES
Pull the schema by introspection and read what types and operations exist before writing anything.
Read the schema, compose the query with variables, and run it in the same conversation.
Run the mutation directly, scoped by whatever the configured token is permitted to do.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
executeGraphQLOperationExecutes an arbitrary GraphQL query or mutation against the target API. Use introspectGraphQLSchema first to understand the available operations.
introspectGraphQLSchemaFetches the schema of the target GraphQL API using introspection. Returns the schema in JSON format.
BEFORE YOU INSTALL
2 tools when we connected.
AUTH_TOKEN in your environment
Both documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 2 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npx -y mcp4gql{
"mcpServers": {
"mcp4gql": {
"command": "npx",
"type": "stdio",
"args": [
"-y",
"mcp4gql"
],
"env": {
"GRAPHQL_ENDPOINT": "<YOUR_GRAPHQL_ENDPOINT>",
"AUTH_TOKEN": "<YOUR_AUTH_TOKEN>"
}
}
}
}{
"mcpServers": {
"mcp4gql": {
"command": "npx",
"args": [
"-y",
"mcp4gql"
],
"env": {
"GRAPHQL_ENDPOINT": "<YOUR_GRAPHQL_ENDPOINT>",
"AUTH_TOKEN": "<YOUR_AUTH_TOKEN>"
}
}
}
}