|
| 1 | +--- |
| 2 | +sidebar_position: 4 |
| 3 | +--- |
| 4 | + |
| 5 | +# MCP Server 🤖 |
| 6 | + |
| 7 | +Start the MCP (Model Context Protocol) server for AI assistant integration with `very_good mcp`. |
| 8 | + |
| 9 | +:::warning |
| 10 | +This command relies on the [Dart MCP Server](https://docs.flutter.dev/ai/mcp-server). This is an experimental package and may change or become unstable without notice. Use it with caution at your own risk. |
| 11 | +::: |
| 12 | + |
| 13 | +## Usage |
| 14 | + |
| 15 | +```sh |
| 16 | +very_good mcp [arguments] |
| 17 | +-h, --help Print this usage information. |
| 18 | + |
| 19 | +Run "very_good help" to see global options. |
| 20 | +``` |
| 21 | + |
| 22 | +The MCP server exposes Very Good CLI functionality through the [Model Context Protocol](https://modelcontextprotocol.io/), allowing AI assistants to interact with the CLI programmatically. This enables automated project creation, testing, and package management through MCP-compatible tools. |
| 23 | + |
| 24 | +## Configuration |
| 25 | + |
| 26 | +import Tabs from '@theme/Tabs'; |
| 27 | +import TabItem from '@theme/TabItem'; |
| 28 | + |
| 29 | +<Tabs> |
| 30 | + <TabItem value="claude-desktop" label="Claude Desktop" default> |
| 31 | + |
| 32 | +Add to `claude_desktop_config.json`: |
| 33 | + |
| 34 | +```json |
| 35 | +{ |
| 36 | + "mcpServers": { |
| 37 | + "very_good_cli": { |
| 38 | + "command": "very_good", |
| 39 | + "args": ["mcp"] |
| 40 | + } |
| 41 | + } |
| 42 | +} |
| 43 | +``` |
| 44 | + |
| 45 | + </TabItem> |
| 46 | + <TabItem value="claude-code" label="Claude Code"> |
| 47 | + |
| 48 | +Add to `.claude/settings.json`: |
| 49 | + |
| 50 | +```json |
| 51 | +{ |
| 52 | + "mcpServers": { |
| 53 | + "very_good_cli": { |
| 54 | + "command": "very_good", |
| 55 | + "args": ["mcp"] |
| 56 | + } |
| 57 | + } |
| 58 | +} |
| 59 | +``` |
| 60 | + |
| 61 | + </TabItem> |
| 62 | + <TabItem value="cursor" label="Cursor"> |
| 63 | + |
| 64 | +Add to `.cursor/mcp.json`: |
| 65 | + |
| 66 | +```json |
| 67 | +{ |
| 68 | + "mcpServers": { |
| 69 | + "very_good_cli": { |
| 70 | + "command": "very_good", |
| 71 | + "args": ["mcp"] |
| 72 | + } |
| 73 | + } |
| 74 | +} |
| 75 | +``` |
| 76 | + |
| 77 | + </TabItem> |
| 78 | + <TabItem value="vscode" label="VS Code / GitHub Copilot"> |
| 79 | + |
| 80 | +Add to `.vscode/mcp.json`: |
| 81 | + |
| 82 | +```json |
| 83 | +{ |
| 84 | + "servers": { |
| 85 | + "very_good_cli": { |
| 86 | + "command": "very_good", |
| 87 | + "args": ["mcp"], |
| 88 | + "type": "stdio" |
| 89 | + } |
| 90 | + } |
| 91 | +} |
| 92 | +``` |
| 93 | + |
| 94 | + </TabItem> |
| 95 | + <TabItem value="windsurf" label="Windsurf"> |
| 96 | + |
| 97 | +Add to `~/.windsurf/mcp.json`: |
| 98 | + |
| 99 | +```json |
| 100 | +{ |
| 101 | + "mcpServers": { |
| 102 | + "very_good_cli": { |
| 103 | + "command": "very_good", |
| 104 | + "args": ["mcp"] |
| 105 | + } |
| 106 | + } |
| 107 | +} |
| 108 | +``` |
| 109 | + |
| 110 | + </TabItem> |
| 111 | +</Tabs> |
| 112 | + |
| 113 | +## Available Tools |
| 114 | + |
| 115 | +The MCP server exposes the following tools to AI assistants: |
| 116 | + |
| 117 | +### `create` |
| 118 | + |
| 119 | +Create new Dart or Flutter projects from any of the available [templates](/docs/category/templates). |
| 120 | + |
| 121 | +### `test` |
| 122 | + |
| 123 | +Run tests with optional coverage and optimization. Supports both `dart test` and `flutter test` via a `dart` parameter. |
| 124 | + |
| 125 | +See the [test command](/docs/commands/test) for more details. |
| 126 | + |
| 127 | +### `packages_get` |
| 128 | + |
| 129 | +Install or update Dart/Flutter package dependencies. |
| 130 | + |
| 131 | +See the [get packages command](/docs/commands/get_pkgs) for more details. |
| 132 | + |
| 133 | +### `packages_check_licenses` |
| 134 | + |
| 135 | +Check packages for license compliance. |
| 136 | + |
| 137 | +See the [check licenses command](/docs/commands/check_licenses) for more details. |
0 commit comments