Skip to main content
Glama
README.md
# mcpgql

**The GraphQL Overlord’s bridge to MCP.**

`mcpgql` is a CLI tool and a federated bridge connecting any GraphQL endpoint directly to the Model Context Protocol (MCP) ecosystem, built upon [mcp-graphql-enhanced](https://www.npmjs.com/package/@letoribo/mcp-graphql-enhanced).

---

## Why mcpgql?

- **Zero-Config Integration**: Seamlessly connect LLMs to your graph data.
- **No Environment Pollution**: Unlike standard setups, no environment variables need to be declared in your `claude_desktop_config.json`. All configuration (endpoints, headers, mutation toggles) is handled dynamically in your terminal gateway.
- **Federated Power**: Engineered to work flawlessly with `mcp-remote` for decentralized, multi-endpoint environments.
- **Real-time Mutations**: Full support for write operations (like `publishToDiscord`) directly from your AI agent.

## Quick Start

Run the bridge via the terminal command:
```
mcpgql
```
The interactive dialog will automatically guide you through setting up your endpoints and required environment variables:
```
--- Select Endpoints (Enter to confirm) ---
 [✓]  1. mcp
 [ ]  2. neo4j
 [ ]  3. github
--- Environment variables & Config ---
[NO] 4. Allow Mutations
[OK] 5. Headers (Loaded from: /home/mcpgql/headers.json)
[+]  6. Add New Endpoint

Enter number to toggle/edit (or Enter to proceed): 

1. Terminal (HTTP GraphQL Gateway)
2. MCP Inspector (stdio)
Select mode (1 or 2): 1
[INFO] Launching with ENDPOINT=https://mcp-discord.vercel.app/api/graphiql
[DEBUG] Executing: node /home/mcp-graphql-enhanced/dist/index.js

Press [r] to reconfigure endpoints/mode • Press [q] or [Ctrl+C] to quit

[BOOT] Initializing schema sync for: https://mcp-discord.vercel.app/api/graphiql
[WARN] Port 6274 is in use. Trying 6275...
[SYSTEM] Federated Bridge active on port 6275
📡 MCP Endpoint: http://localhost:6275/mcp
🎨 GraphiQL: http://localhost:6275/graphiql
```

## Integrate into Claude Desktop with a minimal configuration:
```
{
  "mcpServers": {
    "mcpgql": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://localhost:6274/mcp"
      ]
    }
  }
}
```
## Proof of Concept

- **Real-time Mutation**: Successfully executed complex GraphQL mutations (`publishToDiscord`) directly from the Claude interface.
- **Integration Log**: [View the live integration proof for this session](https://claude.ai/share/7053179e-8cd7-47b6-bd88-a1f43b28539f).
- **Success Status**: The integration verifies node querying and response transmission with 100% precision.