MCP gives a compatible development client a structured way to call tools. The local Dart and Flutter MCP server exposes project-aware tooling; it is not an AI model and does not add a chatbot to your shipped application.
Verify the SDK command first
Use the same SDK and project directory as your editor. Open a new terminal and check:
dart --version
dart mcp-server --help
flutter analyze
flutter test
If the MCP command is unavailable, review the selected SDK before editing client configuration. With Flutter installed, prefer its matching Dart SDK rather than adding an unrelated standalone installation just to make one command resolve.
Configure a compatible client
Many clients use a mcpServers configuration with a local stdio command:
{
"mcpServers": {
"dart": {
"command": "dart",
"args": ["mcp-server"]
}
}
}
The file location and root key are client-specific. For example, VS Code uses a workspace .vscode/mcp.json with a servers object. Do not paste several configuration variants into the same file. Follow the supported client instructions linked from the
Flutter AI setup guide
.
Start or reload the server from the client. A stdio MCP process exchanges protocol messages over its input/output stream; launching it manually and waiting for normal console output does not establish a connection to your assistant.
Establish an observable connection
Open the intended Flutter workspace. Ask the assistant to identify the project root and list the Dart/Flutter tools it can access. Then request a read-only analyzer summary, including the file, line and diagnostic. Compare one result with the terminal output from your baseline.
Available tools depend on SDK and client capabilities. Runtime inspection also needs a suitable running debug session. An empty tool list is a configuration problem, not a reason to assume the assistant inspected the app.
Make one change and verify it
Use a precise task such as: “Fix the missing label on this IconButton, preserve the current action, and run the relevant widget test.” Review the diff, confirm the reported command actually ran, and compare the result with the original failure. Keep unrelated formatting or package upgrades out of that change.
The MCP server can help an assistant use diagnostics and tests. Your project still owns the acceptance criteria. Treat tool arguments and access to files as part of the development client’s permissions.
Troubleshoot the connection
Check the executable path visible to the client, project trust settings, the configuration schema and the client’s server log. A terminal PATH and the PATH inherited by a desktop editor can differ. Test the command in the same environment before changing package versions.
Exercise
Introduce a small analyzer issue in a disposable branch, ask for a diagnosis and verify the fix with flutter analyze. The video below demonstrates a related interactive-testing package; Marionette MCP is separate from this SDK server and is not required for the configuration shown here.