MCP for Flutter
Flutter MCP servers: tools are not architecture
An MCP server connects your AI agent to a running Flutter project, so it can analyze code, resolve symbols and run tests instead of guessing. Useful, but incomplete. This page covers what the Dart and Flutter MCP server gives you and what it cannot.
What a Flutter MCP server actually does
MCP, the Model Context Protocol, is an open standard that lets an AI client call external tools. A Flutter MCP server is a small process your agent talks to over stdio, exposing the Dart and Flutter toolchain as callable actions.
The official server is the Dart and Flutter MCP server from the Dart team, launched with dart mcp-server. The community also ships alternatives, such as the flutter-mcp-toolkit, which adds a feedback loop into a running app for tapping widgets and taking snapshots. For most projects the official server is the starting point.
With the official server connected, an agent can:
- Analyze the project and surface errors and warnings.
- Resolve symbols to confirm an element exists and fetch its signature.
- Run tests and read the results.
- Search pub.dev for a package and reason about version constraints.
- Manage dependencies in pubspec.yaml.
- Format code with the same formatter as dart format.
How to configure the MCP server per client
The command is the same everywhere, only the config file changes. The server runs as a local stdio process started with dart mcp-server.
Generic MCP client (Cursor, Claude Desktop, most editors)
{
"mcpServers": {
"dart": {
"command": "dart",
"args": ["mcp-server"]
}
}
}Claude Code, from the terminal
claude mcp add dart -- dart mcp-serveropencode, in opencode.json
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"dart": {
"type": "local",
"command": ["dart", "mcp-server"]
}
}
}VS Code and GitHub Copilot, in .vscode/mcp.json
{
"servers": {
"dart": {
"command": "dart",
"args": ["mcp-server"]
}
}
}For a shared team setup, commit the config file so every clone gets the server. Claude Code supports project scope through .mcp.json, and Cursor reads a project-level .cursor/mcp.json. Setup guides for each client live in the Dart and Flutter MCP server repository and the Flutter docs.
Why MCP tools alone are not enough
Here is the failure mode. With the MCP server connected, you ask the agent to add a settings screen. The agent analyzes the project, finds the existing code, and writes a screen. It analyzes clean. The tests pass. It is still wrong.
It reached for setState where the project uses Riverpod v3, or placed the screen in a features/settings folder with its own folder layout, or hand-rolled a navigation call that bypasses GoRouter. The tools told the agent the code compiles. Nothing told it the code should look like the rest of the project.
MCP closes the reach gap. It does not close three others:
- Architecture: Which state management, which routing, which folder layout. MCP servers do not carry project opinions.
- Feature method: The proven sequence for integrating a paywall or push notifications, beyond the generic steps a framework skill gives.
- Conventions: Naming, imports and the patterns you banned, which only live in the repository's own instructions.
Those three are exactly what an AGENTS.md file holds. The healthy setup is MCP and AGENTS.md together: the server gives the agent tools, and AGENTS.md tells it how your project works. Flutter Agent Kit ships the second part, and it works with any MCP client.
The setup: MCP tools plus AGENTS.md
Flutter Agent Kit does not ship an MCP server, and it does not need to. Configure the Dart and Flutter MCP server for the client you use, then add the kit's AGENTS.md and feature skills. The MCP server gives the agent live reach, and the kit gives it the architecture and the feature method.
- MCP server: Analyzer, symbols, tests, pub.dev and dependency edits, from the official Dart toolchain.
- AGENTS.md: The kit's stack decisions, directory conventions and banned patterns, read on every task.
- Feature skills: Application-level workflows for auth, paywalls, push, AI chat and the rest, loaded only when a task needs them.
Frequently asked questions
Does Flutter Agent Kit ship an MCP server?
No. Use the official Dart and Flutter MCP server from the Dart team for tool access. Flutter Agent Kit provides the AGENTS.md context layer and the feature skills that sit above it, and works with any MCP-compatible client.
Which MCP clients work with the Dart and Flutter MCP server?
Any client that supports the MCP standard and tools or resources. That includes Cursor, Claude Code, opencode, GitHub Copilot in VS Code, Gemini CLI and Antigravity. The server launches over stdio with the dart mcp-server command.
Is a Flutter MCP server enough without project rules?
For reading the project, yes. For writing code that fits it, no. MCP tools do not know your state management, routing or conventions, so generated code can analyze cleanly and still be inconsistent with the codebase. AGENTS.md carries those decisions.
Get Flutter Agent Kit
Flutter Agent Kit ships an AGENTS.md file the agent always loads, on-demand docs and feature skills, so the setup above comes preconfigured for €99.99 one-time with lifetime updates.