Registry / ai-ml / mcp-graphql-schema

mcp-graphql-schema

JSON →
library0.0.2jsnpmunverified

MCP server that exposes GraphQL schema information to LLMs like Claude. Current version 0.0.2, released in early 2025. Key differentiator: allows LLMs to explore, query, and search GraphQL schemas via MCP tools (list fields, get types, search) without manual schema copying. Integrates with Claude Desktop and Claude Code CLI.

npm install mcp-graphql-schema
INSTALL
IMPORT
SIG · MCP-GRAPHQL-SCHEMA
M
mcp-graphql-schema
ai-mljavascriptv0.0.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mcp-graphql-schema CLI
npx -y mcp-graphql-schema [schema_path]
npm install -g mcp-graphql-schema; mcp-graphql-schema
Package is designed as an MCP server, not a library. Use npx or install globally via npm.
Claude Desktop configuration
Edit claude_desktop_config.json with command and args.
Using require('mcp-graphql-schema')
No JavaScript/TypeScript API. Only configuration-based integration with Claude Desktop.
Claude Code CLI integration
claude mcp add graphql-schema npx -y mcp-graphql-schema [schema_path]
claude mcp add graphql-schema mcp-graphql-schema [schema_path]
Must specify command and args explicitly in claude mcp add.

Configures Claude Desktop to use mcp-graphql-schema with a specific schema file.

{ "mcpServers": { "GraphQL Schema": { "command": "npx", "args": ["-y", "mcp-graphql-schema", "/ABSOLUTE/PATH/TO/schema.graphqls"] } } }
Debug
Known issues
gotchaSchema path must be absolute in claude_desktop_config.json. Relative paths will fail.
fix
Use absolute path like /home/user/schema.graphqls
affects: >=0.0.0
gotchaPackage version 0.0.2 is very early; APIs may change without major version bump.
fix
Pin to exact version in npm or use npx -y specifying version.
affects: >=0.0.0 <0.1.0
gotchaNode.js >=16.0.0 required. Older versions will fail to run.
fix
Update Node.js to version 16 or later.
affects: >=0.0.0
gotchaThe server only loads one schema file; cannot dynamically switch schemas without restarting.
fix
Restart the MCP server with a different schema path.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'mcp-graphql-schema'
npx not installed or network issues
fix
Ensure npx is available (comes with npm 5.2+). Run: npm install -g npx
Error: ENOENT: no such file or directory, open 'schema.graphqls'
Relative path used in claude_desktop_config.json
fix
Use absolute path to the schema file.
Error: require() of ES Module not supported
Package is ESM-only but loaded with require()
fix
Use npx (CLI) instead of importing programmatically.
Upgrade
Version history
0.0.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
mcp-graphql-schema — npm install mcp-graphql-schema · libregistry