MCP Server ๐ค
Start the MCP (Model Context Protocol) server for AI assistant integration with very_good mcp.
This command relies on the Dart MCP Server. This is an experimental package and may change or become unstable without notice. Use it with caution at your own risk.
Usageโ
very_good mcp [arguments]
-h, --help Print this usage information.
Run "very_good help" to see global options.
The MCP server exposes Very Good CLI functionality through the Model Context Protocol, allowing AI assistants to interact with the CLI programmatically. This enables automated project creation, testing, and package management through MCP-compatible tools.
Configurationโ
- Claude Desktop
- Claude Code
- Cursor
- VS Code / GitHub Copilot
- Windsurf
- Antigravity
Add to claude_desktop_config.json:
{
"mcpServers": {
"very_good_cli": {
"command": "very_good",
"args": ["mcp"]
}
}
}
Add to .claude/settings.json:
{
"mcpServers": {
"very_good_cli": {
"command": "very_good",
"args": ["mcp"]
}
}
}
Add to .cursor/mcp.json:
{
"mcpServers": {
"very_good_cli": {
"command": "very_good",
"args": ["mcp"]
}
}
}
Add to .vscode/mcp.json:
{
"servers": {
"very_good_cli": {
"command": "very_good",
"args": ["mcp"],
"type": "stdio"
}
}
}
Add to ~/.windsurf/mcp.json:
{
"mcpServers": {
"very_good_cli": {
"command": "very_good",
"args": ["mcp"]
}
}
}
Add to ~/.gemini/antigravity/mcp_config.json:
{
"mcpServers": {
"very_good_cli": {
"command": "very_good",
"args": ["mcp"]
}
}
}
Available Toolsโ
The MCP server exposes the following tools to AI assistants:
createโ
Create new Dart or Flutter projects from any of the available templates.
See the create command for more details.
testโ
Run tests with optional coverage and optimization. Supports both dart test and flutter test via a dart parameter.
See the test command for more details.
packages_getโ
Install or update Dart/Flutter package dependencies.
See the get packages command for more details.
packages_check_licensesโ
Check packages for license compliance.
See the check licenses command for more details.
Failure Payloadsโ
A tool call that fails returns isError: true with a single text content holding a JSON payload, so an agent can pick a recovery strategy without parsing the command output:
| Field | Description |
|---|---|
status | partial_failure when the command printed output before failing, otherwise failure. |
failureType | The bucket of the failure, which tells whether a retry can help. |
failureReason | The specific cause of the failure. |
attemptedAction | The tool, the command it ran, and the directory and arguments of the call when given. |
reason | A human-readable failure cause, such as failed with exit code 70. |
test | test failures only: what the test run recorded. See Test results. |
partialResults | The output the command printed before failing, when any. |
alternativeApproaches | Recovery suggestions for the failureReason. |
Failure types and reasonsโ
failureType | failureReason | Cause | Retry can help |
|---|---|---|---|
business | test_failure | A test failed, or a test file failed to load. Takes precedence over coverage_below_threshold. | No |
business | coverage_below_threshold | The tests passed, but their coverage is below min_coverage. | No |
business | tool_crash | The command failed or threw without reporting a more specific cause. | Unlikely |
transient | tool_crash | The tool exited unexpectedly, left no coverage report behind, or hit a network error. | Yes |
validation | invalid_input | An argument, or the project it points to, was invalid. | No |
validation | usage_error | The command line built from the arguments was rejected. | No |
permission | permission_denied | The process could not read or write a file it needed. | No |
timeout | timeout | The run exceeded timeout_seconds and was stopped. | No |
Test resultsโ
A test failure carries a test object whenever the run recorded a result:
results: thepassed,failedandskippedtest counts, thedurationMsthe tests ran for, and thefailingTestswith theirfile,nameand a single-lineerror. A test file that failed to load is listed asloading <file>. Only the first 20 failing tests are listed; a reader can tell the list was capped by comparing its length againstfailed.coverage: for acoverage_below_thresholdfailure only, theactualandrequiredcoverage percentages and theuncoveredLinesgrouped perfile. Only the first 20 lines of the first 20 files are listed;uncoveredLinesTruncatedistruewhen lines were left out.
In a recursive run, counts and durations add up across packages, and file paths are relative to directory. A run stopped by timeout_seconds reports the tests that finished, with a durationMs of 0.
A failing test:
{
"status": "partial_failure",
"failureType": "business",
"failureReason": "test_failure",
"attemptedAction": { "tool": "test", "command": "very_good test" },
"reason": "failed with exit code 70.",
"test": {
"results": {
"passed": 1,
"failed": 1,
"skipped": 0,
"durationMs": 1751,
"failingTests": [
{
"file": "test/counter_test.dart",
"name": "counter increments",
"error": "Expected: <2> Actual: <1>"
}
]
}
},
"partialResults": "โฆ",
"alternativeApproaches": ["โฆ"]
}
Unmet coverage:
{
"status": "partial_failure",
"failureType": "business",
"failureReason": "coverage_below_threshold",
"attemptedAction": {
"tool": "test",
"command": "very_good test --coverage --min-coverage 100",
"arguments": { "coverage": true, "min_coverage": "100" }
},
"reason": "failed with exit code 70.",
"test": {
"results": {
"passed": 1,
"failed": 0,
"skipped": 0,
"durationMs": 1508,
"failingTests": []
},
"coverage": {
"actual": 33.33333333333333,
"required": 100.0,
"uncoveredLines": [{ "file": "lib/counter.dart", "lines": [7, 8] }],
"uncoveredLinesTruncated": false
}
},
"partialResults": "โฆ",
"alternativeApproaches": ["โฆ"]
}
A crashed test tool, which reports no test results when no test ran:
{
"status": "partial_failure",
"failureType": "transient",
"failureReason": "tool_crash",
"attemptedAction": {
"tool": "test",
"command": "very_good test --coverage",
"arguments": { "coverage": true }
},
"reason": "failed with exit code 69.",
"partialResults": "โฆ\nThe test runner exited without writing the coverage of . It may have crashed; a retry may succeed.",
"alternativeApproaches": ["โฆ"]
}
A timeout, which carries the results recorded before the run was stopped:
{
"status": "partial_failure",
"failureType": "timeout",
"failureReason": "timeout",
"attemptedAction": {
"tool": "test",
"command": "very_good test",
"arguments": { "timeout_seconds": 120 }
},
"reason": "timed out after 120 seconds.",
"test": {
"results": {
"passed": 12,
"failed": 0,
"skipped": 0,
"durationMs": 0,
"failingTests": []
}
},
"partialResults": "โฆ",
"alternativeApproaches": ["โฆ"]
}