# mcp-graphql

> MCP Server

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.

## Overview

- **Category:** AI
- **Language:** TypeScript
- **Stars:** 407
- **Forks:** 9
- **Owner:** blurrah
- **GitHub:** https://github.com/blurrah/mcp-graphql
- **Created:** 2024-12-21T14:05:45+00:00
- **Updated:** 2025-03-28T07:32:05+00:00
- **Source:** https://model-context-protocol.com/servers/graphql-model-context-protocol-server-api

## Setup

## Setup

**Installing via Smithery:**

To install GraphQL MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mcp-graphql):

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

**Installing Manually:**

It can be manually installed to Claude:
```json
{
    "mcpServers": {
        "mcp-graphql": {
            "command": "npx",
            "args": ["mcp-graphql", "--endpoint", "http://localhost:3000/graphql"]
        }
    }
}
```

## Tools

## Available Tools

1. **introspect-schema**: This tool retrieves the GraphQL schema, using either a local schema file or an introspection query.
2. **query-graphql**: Execute GraphQL queries against the endpoint; mutations are disabled by default unless `--enable-mutations` is specified.
3. **graphql-schema**: The server exposes the GraphQL schema as a resource that clients can access, based on either a local schema file or an introspection query.
