# Build with an AI assistant

> Connect the Fledge MCP server to your coding assistant: it learns how Fledge data works, follows the rules of the API and tests requests before it writes code.

Do you write your integration with an AI coding assistant, such as Claude Code, Cursor or GitHub Copilot? Then connect the [Fledge MCP server](https://docs.fledge.nl/en/mcp/connect) to it first. We strongly recommend it: the assistant then knows how Fledge works, instead of guessing from the field names.

## What the assistant gets

|  |  |
| --- | --- |
| **Knowledge of the data** | The [skills](https://docs.fledge.nl/en/mcp/skills) explain each subject: how the tables relate, what users mean by their words, and which filters give wrong results. For example which rows are history, and what makes an order line open. |
| **The rules of the API** | The skill `fledge-api-development`: read only what you need, page, cache, retry, reuse the token, and don't build a copy of Fledge. The same rules as [Good practice](https://docs.fledge.nl/en/api/good-practice), so the assistant follows them in its code and checks your code against them. |
| **The schema, with notes** | `describe_entity` gives the fields, keys and relations of an entity set, with notes from people who know the data. |
| **Tested requests** | The `query` tool checks a request against the schema and runs it on your data. Every result has the request URL, so the code starts from a request that works. |

## Set it up

1. Create an API key, as in [Getting started](https://docs.fledge.nl/en/api/getting-started#1-create-an-api-key). The MCP server uses the same kind of key as the API.
2. Add the MCP server to your coding assistant: see [Connect an AI assistant](https://docs.fledge.nl/en/mcp/connect) for Claude Code and VS Code. Other assistants work when they can send a header to a remote MCP server.
3. Tell the assistant what to build. It reads the skill for the subject and the API rules before it writes code. To be sure, start with: "Read the Fledge skills for this first."

> **Good to know:** The MCP server only reads. Your code writes through the API itself, see [Writing data](https://docs.fledge.nl/en/api/writing-data). The assistant still uses the skills and `describe_entity` to find the right entity set and fields to write to.

> **Important:** The assistant reads real data with the key: the same data its user sees in Fledge. Give it the key of a user with only the administrations and licenses the integration needs.

---

Source: https://docs.fledge.nl/en/api/ai-assistant
