mcp-graphql

The mcp-graphql repository provides a Model Context Protocol server that enables LLMs to interact with GraphQL APIs by offering schema introspection and query execution capabilities, facilitating dynamic API usage.

118
9

mcp-graphql

smithery badge

A Model Context Protocol (MCP) server enabling LLMs to interact with GraphQL APIs. This implementation provides schema introspection and query execution, allowing models to dynamically discover and use GraphQL APIs.

Usage

Run mcp-graphql with the correct endpoint; it will automatically introspect your queries. Command-line arguments include --endpoint (GraphQL URL), --headers (JSON string for request headers), --enable-mutations (disabled by default), --name (MCP server name), and --schema (path to a local GraphQL schema file).

Resources

  • graphql-schema: The server exposes the GraphQL schema as a resource that clients can access.

Installation

Install via Smithery or manually by configuring the mcpServers section in your Claude setup.

Security Considerations

Mutations are disabled by default.

Customize for your own server

For specific needs, create a custom MCP to restrict tool calling to specific query fields and variables.

Repository

BL
blurrah

blurrah/mcp-graphql

Created

December 21, 2024

Updated

March 28, 2025

Language

TypeScript

Category

AI