@letoribo/mcp-graphql-enhanced 2.1.6 → 2.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -9
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
# mcp-graphql-enhanced
|
|
2
|
-
[](https://smithery.ai/server/@letoribo/mcp-graphql-enhanced)
|
|
3
2
|
[](https://glama.ai/mcp/servers/@letoribo/mcp-graphql-enhanced)
|
|
4
3
|
An **enhanced MCP (Model Context Protocol) server for GraphQL** that fixes real-world interoperability issues between LLMs and GraphQL APIs.
|
|
5
4
|
> Drop-in replacement for `mcp-graphql` — with dynamic headers, robust variables parsing, and zero breaking changes.
|
|
@@ -7,7 +6,7 @@ An **enhanced MCP (Model Context Protocol) server for GraphQL** that fixes real-
|
|
|
7
6
|
- ✅ **Dynamic headers** — pass `Authorization`, `X-API-Key`, etc., via tool arguments (no config restarts)
|
|
8
7
|
- ✅ **Robust variables parsing** — fixes `“Query variables must be a null or an object”` error
|
|
9
8
|
- ✅ **Filtered introspection** — request only specific types (e.g., `typeNames: ["Query", "User"]`) to reduce LLM context noise
|
|
10
|
-
- ✅ **Full MCP compatibility** — works with **Claude Desktop**, **Cursor**, **Glama
|
|
9
|
+
- ✅ **Full MCP compatibility** — works with **Claude Desktop**, **Cursor**, **Glama**
|
|
11
10
|
- ✅ **Secure by default** — mutations disabled unless explicitly enabled
|
|
12
11
|
## 🔍 Filtered Introspection (New!)
|
|
13
12
|
Avoid 50k-line schema dumps. Ask for only what you need:
|
|
@@ -24,7 +23,7 @@ npx @modelcontextprotocol/inspector \
|
|
|
24
23
|
|
|
25
24
|
| Environment Variable | Description | Default |
|
|
26
25
|
|----------|-------------|---------|
|
|
27
|
-
| `ENDPOINT` | GraphQL endpoint URL | `
|
|
26
|
+
| `ENDPOINT` | GraphQL endpoint URL | `https://mcp-neo4j-discord.vercel.app/api/graphiql` |
|
|
28
27
|
| `HEADERS` | JSON string containing headers for requests | `{}` |
|
|
29
28
|
| `ALLOW_MUTATIONS` | Enable mutation operations (disabled by default) | `false` |
|
|
30
29
|
| `NAME` | Name of the MCP server | `mcp-graphql-enhanced` |
|
|
@@ -105,12 +104,6 @@ The server provides two main tools:
|
|
|
105
104
|
This uses either the local schema file, a schema file hosted at a URL, or an introspection query.
|
|
106
105
|
Filtered introspection (typeNames) is only available when using a live GraphQL endpoint (not with SCHEMA file or URL).
|
|
107
106
|
2. **query-graphql**: Execute GraphQL queries against the endpoint. By default, mutations are disabled unless `ALLOW_MUTATIONS` is set to `true`.
|
|
108
|
-
## Installation
|
|
109
|
-
#### Installing via Smithery
|
|
110
|
-
To install GraphQL MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@letoribo/mcp-graphql-enhanced):
|
|
111
|
-
```bash
|
|
112
|
-
npx -y @smithery/cli install @letoribo/mcp-graphql-enhanced --client claude
|
|
113
|
-
```
|
|
114
107
|
## Security Considerations
|
|
115
108
|
Mutations are disabled by default to prevent unintended data changes. Always validate HEADERS and SCHEMA inputs in production. Use HTTPS endpoints and short-lived tokens where possible.
|
|
116
109
|
## Customize for your own server
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,QAAA,MAAQ,SAAS,KAAuD,CAAC;AACzE,QAAA,MAAQ,oBAAoB,KAAyD,CAAC;AACtF,QAAA,MAAQ,KAAK,KAAgC,CAAC;AAC9C,QAAA,MAAM,CAAC,KAAyB,CAAC;AACjC,QAAA,MAAQ,wBAAwB,KAAwC,CAAC;AACzE,QAAA,MACC,kBAAkB,OAClB,qBAAqB,OACrB,uBAAuB,OACvB,eAAe,KACyB,CAAC;AAG1C,QAAA,MAAM,UAAU,WAIf,CAAC;AAKF,QAAA,MAAM,SAAS,KAqBb,CAAC;AAEH,QAAA,MAAM,GAAG,KAA+B,CAAC;AAEzC,QAAA,MAAM,MAAM,KAIV,CAAC;AA+BH,UAAU,oBAAoB;IAC5B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,QAAA,MAAQ,SAAS,KAAuD,CAAC;AACzE,QAAA,MAAQ,oBAAoB,KAAyD,CAAC;AACtF,QAAA,MAAQ,KAAK,KAAgC,CAAC;AAC9C,QAAA,MAAM,CAAC,KAAyB,CAAC;AACjC,QAAA,MAAQ,wBAAwB,KAAwC,CAAC;AACzE,QAAA,MACC,kBAAkB,OAClB,qBAAqB,OACrB,uBAAuB,OACvB,eAAe,KACyB,CAAC;AAG1C,QAAA,MAAM,UAAU,WAIf,CAAC;AAKF,QAAA,MAAM,SAAS,KAqBb,CAAC;AAEH,QAAA,MAAM,GAAG,KAA+B,CAAC;AAEzC,QAAA,MAAM,MAAM,KAIV,CAAC;AA+BH,UAAU,oBAAoB;IAC5B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAsKD,iBAAe,IAAI,kBAOlB"}
|
package/dist/index.js
CHANGED
|
@@ -70,6 +70,8 @@ server.resource("graphql-schema", new URL(env.ENDPOINT).href, async (uri) => {
|
|
|
70
70
|
});
|
|
71
71
|
server.tool("introspect-schema", "Introspect the GraphQL schema. Optionally filter to specific types.", {
|
|
72
72
|
typeNames: z.array(z.string()).optional().describe("e.g., [\"Query\", \"User\"]"),
|
|
73
|
+
endpoint: z.string().optional(),
|
|
74
|
+
headers: z.string().optional(),
|
|
73
75
|
descriptions: z.boolean().optional().default(true),
|
|
74
76
|
directives: z.boolean().optional().default(true),
|
|
75
77
|
}, async ({ typeNames, descriptions = true, directives = true }) => {
|
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"repository": "github:letoribo/mcp-graphql-enhanced",
|
|
16
16
|
"main": "dist/index.js",
|
|
17
|
+
"module": "src/index.ts",
|
|
17
18
|
"types": "dist/index.d.ts",
|
|
18
19
|
"bin": {
|
|
19
20
|
"mcp-graphql-enhanced": "dist/index.js"
|
|
@@ -49,5 +50,5 @@
|
|
|
49
50
|
"ts-node": "^10.9.2",
|
|
50
51
|
"typescript": "5.8.3"
|
|
51
52
|
},
|
|
52
|
-
"version": "2.1.
|
|
53
|
+
"version": "2.1.7"
|
|
53
54
|
}
|