MCP Catalogs
Home

mcp-graphql

by blurrah·385·Score 47

MCP server enabling LLMs to interact with GraphQL APIs through schema introspection and query execution.

developer-toolsai-llmweb-scraping
58
Forks
14
Open issues
8 mo ago
Last commit
2d ago
Indexed

Overview

This MCP server provides a robust interface for Large Language Models to interact with GraphQL APIs. It automatically attempts to introspect GraphQL schemas and execute queries, with mutation operations disabled by default for security. The server can work with local schema files, remote schema URLs, or perform runtime introspection queries, making it flexible for various GraphQL implementations.

Try asking AI

After installing, here are 5 things you can ask your AI assistant:

you:Enabling AI assistants to query GraphQL APIs without custom implementation
you:Allowing language models to discover and interact with unknown GraphQL services
you:Providing secure read-only access to GraphQL endpoints for AI applications
you:Are GraphQL mutations enabled by default?
you:Can I use a local schema file instead of introspection?

When to choose this

Choose mcp-graphql when you need to connect LLMs to GraphQL APIs and want schema introspection capabilities with controlled query access.

When NOT to choose this

Don't choose this if you need advanced authentication mechanisms beyond basic headers, or if you're working with non-GraphQL REST APIs.

Tools this server exposes

2 tools extracted from the README
  • introspect-schema

    Retrieves the GraphQL schema using introspection or local/schema file.

  • query-graphql

    Execute GraphQL queries against the endpoint.

Comparable tools

rest-api-mcpapi-mcpgraphql-client

Installation

Installing via Smithery

npx -y @smithery/cli install mcp-graphql --client claude

Installing Manually (Claude Desktop)

Add the following to your Claude Desktop configuration:

{
    "mcpServers": {
        "mcp-graphql": {
            "command": "npx",
            "args": ["mcp-graphql"],
            "env": {
                "ENDPOINT": "http://localhost:3000/graphql"
            }
        }
    }
}

Environment Variables

  • ENDPOINT: GraphQL endpoint URL (default: http://localhost:4000/graphql)
  • HEADERS: JSON string containing headers for requests
  • ALLOW_MUTATIONS: Enable mutation operations (disabled by default)
  • NAME: Name of the MCP server
  • SCHEMA: Path to a local GraphQL schema file or URL (optional)

FAQ

Are GraphQL mutations enabled by default?
No, mutations are disabled by default as a security measure to prevent LLMs from modifying your database or service data. You must explicitly enable them by setting ALLOW_MUTATIONS=true.
Can I use a local schema file instead of introspection?
Yes, you can specify a local schema file path using the SCHEMA environment variable, or provide a URL to a remote schema file.

Compare mcp-graphql with

GitHub →

Last updated · Auto-generated from public README + GitHub signals.