GraphQL

GraphQL

Comprehensive GraphQL API integration that automatically exposes each GraphQL query as a separate tool.

19
Stars
2
Forks
0
Releases

Overview

MCP GraphQL implements the Model Context Protocol (MCP) to provide a standardized interface for interacting with GraphQL APIs. It automatically exposes every GraphQL query as a distinct MCP tool, with tool inputs that mirror the corresponding GraphQL query parameters. The JSON schema for tool inputs is generated dynamically from query parameters, and no separate schema definition is required—only the API URL and credentials. The server currently supports GraphQL queries (mutations are planned for future releases) and offers configurable authentication (Bearer, Basic, or custom headers) and automatic handling of complex GraphQL types. When a tool is invoked, the server translates the tool call parameters into a GraphQL query, executes it against the target API, and returns the results to the MCP client. If you don't provide predefined queries, the server can introspect the GraphQL schema and auto-generate queries up to a configurable max-depth, though this may produce voluminous responses. For production usage, supplying your own named operations via a queries file or string is recommended, with each operation automatically exposed as an MCP tool.

Details

Owner
drestrepom
Language
Python
License
Updated
2025-12-07

Features

Per-GraphQL-query MCP tools

Exposes each GraphQL query as a distinct MCP tool.

Parameter-to-query mapping

Tool inputs automatically map to the corresponding GraphQL query parameters.

Dynamic JSON schema generation

Generates a JSON schema for tool inputs from GraphQL query parameters.

No external schema required

No separate schema definition is needed; only API URL and credentials.

Query-focused support

Currently supports GraphQL queries; mutations planned for future releases.

Configurable authentication

Supports Bearer, Basic, and custom headers for authentication.

Automatic handling of complex types

Automatically handles complex GraphQL types in tool inputs and results.

Auto-generation via introspection

If no predefined queries are provided, it introspects the schema and builds queries up to max-depth (default 5).

Audience

DevelopersExpose GraphQL queries as MCP tools to enable seamless, query-driven interaction with GraphQL APIs via MCP clients.
MCP integratorsIntegrate GraphQL-backed data sources into MCP-based automation and tooling workflows.

Tags

GraphQLMCPper-query toolsdynamic JSON schemano schema requiredauthenticationGraphQL introspectionPython