{"id":23626416,"url":"https://github.com/blurrah/mcp-graphql","last_synced_at":"2025-04-09T21:01:27.166Z","repository":{"id":269400982,"uuid":"906651184","full_name":"blurrah/mcp-graphql","owner":"blurrah","description":"Model Context Protocol server for GraphQL","archived":false,"fork":false,"pushed_at":"2025-04-02T18:07:30.000Z","size":228,"stargazers_count":60,"open_issues_count":1,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T19:23:32.364Z","etag":null,"topics":["ai","llm","mcp","mcp-server","modelcontextprotocol"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/blurrah.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-21T14:05:45.000Z","updated_at":"2025-04-02T18:07:33.000Z","dependencies_parsed_at":"2024-12-23T10:23:59.302Z","dependency_job_id":"d9147d81-8506-4751-831c-6fe01095e193","html_url":"https://github.com/blurrah/mcp-graphql","commit_stats":null,"previous_names":["blurrah/mcp-graphql"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blurrah%2Fmcp-graphql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blurrah%2Fmcp-graphql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blurrah%2Fmcp-graphql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/blurrah%2Fmcp-graphql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/blurrah","download_url":"https://codeload.github.com/blurrah/mcp-graphql/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111883,"owners_count":21049577,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","llm","mcp","mcp-server","modelcontextprotocol"],"created_at":"2024-12-27T22:54:02.526Z","updated_at":"2025-04-09T21:01:27.093Z","avatar_url":"https://github.com/blurrah.png","language":"TypeScript","readme":"# mcp-graphql\n\n[![smithery badge](https://smithery.ai/badge/mcp-graphql)](https://smithery.ai/server/mcp-graphql)\n\nA Model Context Protocol server that enables LLMs to interact with GraphQL APIs. This implementation provides schema introspection and query execution capabilities, allowing models to discover and use GraphQL APIs dynamically.\n\n\u003ca href=\"https://glama.ai/mcp/servers/4zwa4l8utf\"\u003e\u003cimg width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/4zwa4l8utf/badge\" alt=\"mcp-graphql MCP server\" /\u003e\u003c/a\u003e\n\n## Usage\n\nRun `mcp-graphql` with the correct endpoint, it will automatically try to introspect your queries.\n\n### Environment Variables (Breaking change in 1.0.0)\n\n\u003e **Note:** As of version 1.0.0, command line arguments have been replaced with environment variables.\n\n| Environment Variable | Description | Default |\n|----------|-------------|---------|\n| `ENDPOINT` | GraphQL endpoint URL | `http://localhost:4000/graphql` |\n| `HEADERS` | JSON string containing headers for requests | `{}` |\n| `ALLOW_MUTATIONS` | Enable mutation operations (disabled by default) | `false` |\n| `NAME` | Name of the MCP server | `mcp-graphql` |\n| `SCHEMA` | Path to a local GraphQL schema file (optional) | - |\n\n### Examples\n\n```bash\n# Basic usage with a local GraphQL server\nENDPOINT=http://localhost:3000/graphql npx mcp-graphql\n\n# Using with custom headers\nENDPOINT=https://api.example.com/graphql HEADERS='{\"Authorization\":\"Bearer token123\"}' npx mcp-graphql\n\n# Enable mutation operations\nENDPOINT=http://localhost:3000/graphql ALLOW_MUTATIONS=true npx mcp-graphql\n\n# Using a local schema file instead of introspection\nENDPOINT=http://localhost:3000/graphql SCHEMA=./schema.graphql npx mcp-graphql\n```\n\n## Resources\n\n- **graphql-schema**: The server exposes the GraphQL schema as a resource that clients can access. This is either the local schema file or based on an introspection query.\n\n## Available Tools\n\nThe server provides two main tools:\n\n1. **introspect-schema**: This tool retrieves the GraphQL schema. Use this first if you don't have access to the schema as a resource.\nThis uses either the local schema file or an introspection query.\n\n2. **query-graphql**: Execute GraphQL queries against the endpoint. By default, mutations are disabled unless `ALLOW_MUTATIONS` is set to `true`.\n\n## Installation\n\n### Installing via Smithery\n\nTo install GraphQL MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/mcp-graphql):\n\n```bash\nnpx -y @smithery/cli install mcp-graphql --client claude\n```\n\n### Installing Manually\n\nIt can be manually installed to Claude:\n```json\n{\n    \"mcpServers\": {\n        \"mcp-graphql\": {\n            \"command\": \"npx\",\n            \"args\": [\"mcp-graphql\"],\n            \"env\": {\n                \"ENDPOINT\": \"http://localhost:3000/graphql\"\n            }\n        }\n    }\n}\n```\n\n## Security Considerations\n\nMutations are disabled by default as a security measure to prevent an LLM from modifying your database or service data. Consider carefully before enabling mutations in production environments.\n\n## Customize for your own server\n\nThis is a very generic implementation where it allows for complete introspection and for your users to do whatever (including mutations). If you need a more specific implementation I'd suggest to just create your own MCP and lock down tool calling for clients to only input specific query fields and/or variables. You can use this as a reference.\n","funding_links":[],"categories":["Developer Tools","API Integration MCP Servers","サーバー実装","📚 Projects (1974 total)","MCP 服务器精选列表","Legend","🤖 AI/ML","MCP Servers","APIs and HTTP Requests","Other Tools and Integrations","Table of Contents"],"sub_categories":["API Tools","🛠️ \u003ca name=\"other-tools-and-integrations\"\u003e\u003c/a\u003eその他のツールと統合","MCP Servers","🛠️ 其他实用工具与集成","🛠️ \u003ca name=\"other-tools-and-integrations\"\u003e\u003c/a\u003eOther Tools and Integrations","🛠️ Other Tools and Integrations","Developer Tools","Databases"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblurrah%2Fmcp-graphql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblurrah%2Fmcp-graphql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblurrah%2Fmcp-graphql/lists"}