Experimental MCP server which exposes Dart development tool actions to clients.
WIP
To use this package, you will need to compile the bin/main.dart
script to exe and use the compiled path as the command in your MCP server config.
dart compile exe bin/main.dart
After compiling the binary, you can run the example dash chat bot to interact with it, from the root of this package, after compiling the binary, run:
dart ../dart_mcp/example/dash_client.dart --server bin/main.exe
--auto
flag.--raw
flag.Go to Cursor -> Settings -> Cursor Settings and select “MCP”.
Then, click “Add new global MCP server”. Put in the full path to the executable you created in the first step as the “command”.
If you are directly editing your mcp.json file, it should look like this:
{ "mcpServers": { "dart_mcp": { "command": "<path-to-compiled-exe>", "args": [] } } }
Each time you make changes to the server, you'll need to re-run dart compile exe bin/main.dart
and reload the Cursor window (Developer: Reload Window from the Command Pallete) to see the changes.
For local development, use the MCP Inspector.
Run the inspector with no arguments:
npx @modelcontextprotocol/inspector
Open the MCP Inspector in the browser and enter the path to the server executable in the “Command” field (e.g. /Users/me/path/to/ai/pkgs/dart_tooling_mcp_server/bin/main.exe
).
Click “Connect” to connect to the server and debug using the MCP Inspector.