---
title: "GraphQL to MCP: queries and mutations become tools | FluxOS MCP"
description: "Import your GraphQL API's schema by introspection and publish an MCP server: each query and mutation becomes a tool, with arguments sent as variables."
url: "https://www.fluxosmcp.com/en/servidor-mcp/graphql"
lang: "en-US"
---

GraphQL

# Your GraphQL API as an MCP server

FluxOS MCP reads the schema by introspection and proposes one MCP tool for each field of `Query` and `Mutation`. It builds the GraphQL document for each tool; the assistant only supplies the arguments.

[Talk to us](mailto:contato@fluxosmcp.com) [Documentation for this source](https://www.fluxosmcp.com/en/docs/origens/graphql)

## How the source becomes MCP tools

| In the schema              | In the MCP tool                                                             |
| -------------------------- | --------------------------------------------------------------------------- |
| Query field                | Read tool.                                                                  |
| Mutation field             | Write tool, flagged as destructive in MCP and unchecked by default.         |
| Field name and description | Name in snake\_case and the tool description.                               |
| Arguments                  | Properties of the input schema. Input objects are expanded up to 3 levels.  |
| Return type                | Automatic field selection: scalar fields and nested objects up to 2 levels. |

Step by step

## From the source to an MCP server in four steps

1. ### Register the system
Type GraphQL, the endpoint address and a credential, if the endpoint requires authentication.
2. ### Read the schema
FluxOS MCP runs the introspection query against the endpoint, or you paste the introspection result as JSON.
3. ### Choose the tools
Check the operations and pick the argument that identifies the client. An operation without one can only be published as global.
4. ### Publish the MCP server
Pick or create the target server, publish it and generate a key for each client, with limits and the tools each key may call.

In every server

## What the MCP server already includes

### Per-client isolation

Every call carries who the client is. Each tool filters by the identifier of the key's owner, which the assistant cannot choose or change.

### Keys with limits

Per-minute and per-day limits, tools allowed per key, rotation with a grace period and instant revocation.

### Metered usage

Calls, errors and rejections by day, key and tool. That same metering checks the plan's included calls and, when it applies, the overage.

## Limits and things to watch

- `Subscription` is not imported.
- If the server refuses introspection, use the pasted result or a file.
- Field selection on the return type is automatic. For deeper fields or a subset, adjust the workflow on the canvas.
- Each call has a 60-second time limit.

## Going deeper

- [Documentation for this source](https://www.fluxosmcp.com/en/docs/origens/graphql)
- [Tutorial: turn a public GraphQL API into an AI tool](https://www.fluxosmcp.com/en/blog/tutorial-turn-a-public-graphql-api-into-an-ai-tool)

## Other sources

- [OpenAPI and REST APIs](https://www.fluxosmcp.com/en/servidor-mcp/openapi): Each operation in the spec becomes an MCP tool.
- [SQL database](https://www.fluxosmcp.com/en/servidor-mcp/banco-de-dados-sql): PostgreSQL, MySQL and SQL Server: tools per table, with no SQL to write.
- [SOAP and WSDL](https://www.fluxosmcp.com/en/servidor-mcp/soap): Legacy services with a WSDL become tools, with JSON responses.
- [Postman and cURL](https://www.fluxosmcp.com/en/servidor-mcp/postman-e-curl): No OpenAPI? Each request in the collection or each command becomes a tool.
- [Undocumented API (HAR)](https://www.fluxosmcp.com/en/servidor-mcp/api-sem-documentacao): Record a HAR file in the browser and get one tool per API call.

Frequently asked questions

## Questions about this source

What if introspection is disabled in production?

Run the introspection where it is allowed and paste the JSON result into the import, or upload it as a file. The tools are created in the same way.

Does the AI assistant write the GraphQL query?

No. FluxOS MCP builds the GraphQL document for each tool and sends the arguments as variables, never inside the query text.

Can I choose which fields the tool returns?

The initial selection is automatic. To change it, open the tool on the canvas and adjust the workflow's GraphQL block.

## Publish your first MCP server

Connect the system, choose the tools and hand each client a key with limits.

[ Talk to us ](mailto:contato@fluxosmcp.com) [Log in](https://app.fluxosmcp.com/entrar)
