mcp-graphql

mcp-graphql

1

mcp-graphql is designed to enable interaction between large language models and GraphQL APIs, providing capabilities for schema introspection and query execution. It includes features like endpoint configuration and security measures to control mutation operations.

mcp-graphql

A Model Context Protocol server that enables large language models (LLMs) to interact with GraphQL APIs. This server offers schema introspection and query execution capabilities, allowing models to dynamically discover and use GraphQL APIs.

Usage

  • Run mcp-graphql with the correct endpoint for automatic query introspection.

Command Line Arguments

  • --endpoint: GraphQL endpoint URL (default: http://localhost:4000/graphql).
  • --headers: JSON string for request headers.
  • --enable-mutations: Allows mutation operations (default: disabled).
  • --name: Name of the MCP server.
  • --schema: Path to a local GraphQL schema file.

Available Tools

  1. introspect-schema: Retrieves the GraphQL schema.
  2. query-graphql: Executes GraphQL queries against the endpoint.

Resources

  • graphql-schema: Server exposes the GraphQL schema as an accessible resource.

Installation

Installing via Smithery

  • Use npx -y @smithery/cli install mcp-graphql --client claude to install.

Installing Manually

  • Includes command example for manual installation.