This is worth reading correctly: a generic GraphQL-to-MCP bridge, captured while pointed at a public countries schema, so the continent and language tools are an artefact of the example rather than the product. Point it at your own endpoint and the tool list becomes yours. That design has a real advantage over hand-wrapping an API — the tools cannot drift from the schema, because they are the schema — and a real cost, which is that a large graph produces a large tool list riding along in every turn. Worth checking the query count before attaching it to something substantial.
A generator rather than a fixed integration: it reads a GraphQL endpoint's schema and exposes each query as its own tool, with the return type stated.
- One tool per GraphQL query, each carrying its signature and return type — so the model sees the shape rather than having to introspect.
- The tool list is whatever the pointed-at schema contains, which means a new query on the server becomes a new tool without touching this.
- The probed instance was pointed at a countries and languages schema, exposing continent, country and language queries with their list and singular forms.
A GraphQL endpoint to point it at — the tool surface is derived from whatever schema that endpoint serves.
One command — npx graphql-to-mcp https://countries.trevorblades.com/graphql
