---
title: "GraphQL | FluxOS MCP documentation"
description: "Import a GraphQL server through introspection and turn every query and mutation into an MCP tool, with the client argument filled in by the key."
url: "https://www.fluxosmcp.com/en/docs/origens/graphql"
lang: "en-US"
---

Documentation

# GraphQL

The FluxOS MCP dashboard is currently in Portuguese. Screen labels appear here as you will see them, with the English meaning alongside.

Use this source when the system exposes a GraphQL API. Each field of `Query` and `Mutation` in the schema becomes an MCP tool. `Subscription` is not imported.

## What gets imported

The schema, read through **introspection**: the types, the arguments of each field, and the return type. You can let FluxOS MCP query the endpoint or supply an introspection result you obtained yourself.

## What you need on hand

- The **GraphQL endpoint address** (the system’s base URL or the URL entered during the import), **or** the introspection result in JSON (`{"data":{"__schema":…}}`, `{"__schema":…}`, or the schema object), pasted or as a file.
- A **credential** if the endpoint requires authentication (Bearer token, username and password, or API key).
- The **argument that identifies the client** in the operations (for example `customerId`).
- Introspection enabled on the server, if you are going to use the URL. If the server refuses it, the import shows the server’s message; in that case use the pasted result.

## Step by step on screen

1. Under **Sistemas → Novo sistema** (Systems → New system), choose **GraphQL** and enter the endpoint’s base URL and the credential.
2. Under **Criar e importar** (Create and import), enter the URL in the **Endpoint GraphQL** field (the server runs the introspection query with a `POST` request), or use **Colar conteúdo** (Paste content) / **Enviar arquivo** (Upload file) with the introspection result. Click **Ler origem** (Read source).
![GraphQL source](https://www.fluxosmcp.com/_astro/41-graphql-origem.wvTbH5ha_Z2toVjS.webp)
3. Choose the tools, the client filter, and the destination server.
![Proposed GraphQL operations](https://www.fluxosmcp.com/_astro/40-graphql-ferramentas-propostas.GHSAFHWk_eQNgE.webp)

## How operations become MCP tools

| In the schema     | In the tool                                                                                          |
| ----------------- | ---------------------------------------------------------------------------------------------------- |
| Field name        | Name in snake\_case, up to 64 characters; duplicates get a suffix (customer, customer\_2)            |
| Field description | Description; without one, “Query GraphQL .” or “Mutation GraphQL .”, where <campo> is the field name |
| Query field       | **Read** tool                                                                                        |
| Mutation field    | **Write** tool, marked as destructive in MCP                                                         |
| Arguments         | Properties of the input schema; input objects (input) are expanded up to 3 levels deep               |

FluxOS MCP **builds the GraphQL document** for each tool and sends the arguments as `variables`, never inside the query text. The selection of return fields is automatic: simple fields and nested objects up to 2 levels deep, with at most 40 fields per level. Fields that require arguments are left out, and unions bring the simple fields of each possible type.

The tool returns the contents of `data`. If the server responds with `errors`, the tool fails and the server’s message (with the field path) goes back to the assistant.

### Client filter

Any scalar argument (`ID`, `String`, `Int`, `Float`, enum) can be the client filter. It disappears from the input schema and receives the identifier of the key’s client. For `Int` and `Float`, the identifier is converted to a number (and the call fails if it is not numeric). Lists and objects cannot be used as a filter.

## Limits and precautions

- **Only queries come selected.** Mutations appear deselected and as destructive.
- **Review the client filter.** The screen preselects the first option in the argument list. Operations with no client argument only publish as **Global**.
- **Automatic field selection.** If you need deeper fields or a subset, adjust the workflow on the canvas.
- **Size:** the introspection response read from the URL is limited to 64 MB, and execution has a 60-second timeout.
- **The credential only accompanies the introspection and the calls when the endpoint is on the same server as the system’s base URL.**
- We tested the importer with a sample schema (introspection from a file). We have not exercised it against a real GraphQL server.
