mcp-graphql logo

mcp-graphql

by blurrah

mcp-graphql is a Model Context Protocol server that enables LLMs to interact with GraphQL APIs. It provides schema introspection and query execution capabilities, allowing models to discover and use GraphQL APIs dynamically.

View on GitHub

Last updated: N/A

What is mcp-graphql?

mcp-graphql is a server implementing the Model Context Protocol to allow LLMs to interact with GraphQL APIs. It facilitates dynamic discovery and usage of GraphQL APIs by LLMs.

How to use mcp-graphql?

Run mcp-graphql with the correct endpoint using environment variables to configure the GraphQL endpoint, headers, mutation permissions, server name, and schema path. Use the provided tools to introspect the schema and execute queries.

Key features of mcp-graphql

  • Schema introspection

  • GraphQL query execution

  • Mutation control (disabled by default)

  • Environment variable configuration

  • Local schema file support

Use cases of mcp-graphql

  • Enabling LLMs to query data from GraphQL APIs

  • Building intelligent agents that can interact with GraphQL services

  • Automating data retrieval from GraphQL endpoints

  • Integrating LLMs with existing GraphQL infrastructure

FAQ from mcp-graphql

What is the default GraphQL endpoint?

The default endpoint is http://localhost:4000/graphql.

How do I enable mutations?

Set the ALLOW_MUTATIONS environment variable to true.

Can I use a local schema file?

Yes, set the SCHEMA environment variable to the path of your local GraphQL schema file.

What are the available tools?

The server provides two main tools: introspect-schema and query-graphql.

Why are mutations disabled by default?

Mutations are disabled by default as a security measure to prevent LLMs from modifying your database or service data.