@letoribo/mcp-graphql-enhanced 2.1.5 → 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 CHANGED
@@ -1,5 +1,4 @@
1
1
  # mcp-graphql-enhanced
2
- [![Smithery](https://smithery.ai/badge/@letoribo/mcp-graphql-enhanced)](https://smithery.ai/server/@letoribo/mcp-graphql-enhanced)
3
2
  [![Glama](https://glama.ai/mcp/servers/@letoribo/mcp-graphql-enhanced/badge)](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**, and **Smithery**
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 | `http://localhost:4000/graphql` |
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
@@ -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;AAoKD,iBAAe,IAAI,kBAOlB"}
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
@@ -15,8 +15,8 @@ const getVersion = () => {
15
15
  // Check for deprecated command line arguments
16
16
  checkDeprecatedArguments();
17
17
  const EnvSchema = z.object({
18
- NAME: z.string().default("mcp-graphql"),
19
- ENDPOINT: z.preprocess((val) => (typeof val === 'string' ? val.trim() : val), z.string().url("ENDPOINT must be a valid URL (e.g., https://example.com/graphql)")).default("http://localhost:4000/graphql"),
18
+ NAME: z.string().default("mcp-graphql-enhanced"),
19
+ ENDPOINT: z.preprocess((val) => (typeof val === 'string' ? val.trim() : val), z.string().url("ENDPOINT must be a valid URL (e.g., https://example.com/graphql)")).default("https://mcp-neo4j-discord.vercel.app/api/graphiql"),
20
20
  ALLOW_MUTATIONS: z
21
21
  .enum(["true", "false"])
22
22
  .transform((value) => value === "true")
@@ -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.5"
53
+ "version": "2.1.7"
53
54
  }