MCP 安装
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 文档
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 83 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。;检出高风险片段:pipe_curl_to_shell
---
name: flutter-mcp-toolkit-setup
description: Verify the flutter-mcp-toolkit install, run doctor preflight, troubleshoot connection issues. Us…
category: 文档
runtime: 无特殊运行时
---
# flutter-mcp-toolkit-setup 输出预览
## PART A: 任务判断
- 适用问题:PRD、RFC、README、项目说明或知识库整理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“When to use / Verify install / Run doctor”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于PRD、RFC、README、项目说明或知识库整理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“When to use / Verify install / Run doctor”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、会按任务需要访问外部网络、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/path` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“When to use / Verify install / Run doctor”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: flutter-mcp-toolkit-setup
description: Verify the flutter-mcp-toolkit install, run doctor preflight, troubleshoot connection issues. Us…
category: 文档
source: tomevault-io/skills-registry
---
# flutter-mcp-toolkit-setup
## 什么时候使用
- 把项目文档方向的常用动作沉淀成 Agent 可调用的技能 适合处理README、PRD、RFC、教程和知识库文档,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的…
- 面向PRD、RFC、README、项目说明或知识库整理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「When to use / Verify install / Run doctor」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "flutter-mcp-toolkit-setup" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> When to use / Verify install / Run doctor
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 会按任务需要访问外部网络
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} When to use
Use this skill when:
- First-time install:
flutter-mcp-toolkitis not yet on PATH. doctor --jsonreturns any check with"status": "fail".- MCP server fails to connect or tools return
vm_not_connected/connect_failed. - Visual capture or toolkit-bridge commands are returning unexpected errors.
Verify install
flutter-mcp-toolkit --version
Expected output: version string (e.g. flutter-mcp-toolkit 3.0.0).
If you get command not found, the binary is not on PATH:
# Binary is built to mcp_server_dart/build/ inside the repo
export PATH="$PATH:/path/to/mcp_flutter/mcp_server_dart/build"
# Or rebuild from source
cd /path/to/mcp_flutter && make build
Then verify with flutter-mcp-toolkit --version.
Run doctor
Always run doctor before any VM-dependent command:
flutter-mcp-toolkit doctor --json
Flags: --target <ws_uri> (test a specific URI), global --vm-service-uri <ws_uri> (same as --target when omitted on doctor), --timeout-ms <n> (default: 2500).
# Global URI works for doctor (same as validate-runtime)
flutter-mcp-toolkit --vm-service-uri 'ws://127.0.0.1:8181/<token>/ws' doctor --json
Sample green output:
{
"summary": { "criticalFailures": 0 },
"checks": [
{ "id": "vm_target_reachable", "status": "pass", "critical": true },
{ "id": "mcp_toolkit_extensions", "status": "pass", "critical": true },
{ "id": "dynamic_registry_available", "status": "pass", "critical": false }
]
}
Triage: criticalFailures > 0 means VM/setup is blocked — not that every tool is broken. dynamic_registry_available: pass with vm_target_reachable: fail usually means a stale URI after hot restart; run discover_debug_apps and pass the new targetId.
Read error.descriptor (not top-level) for retry policy and exit codes. Each check includes fix_command — run it directly.
Recover by error code
binary_not_found
Binary missing or not on PATH. Rebuild and add to PATH:
cd /path/to/mcp_flutter && make build
export PATH="$PATH:/path/to/mcp_flutter/mcp_server_dart/build"
vm_not_connected
Flutter app not running, stale token after restart, or URI not resolved:
flutter-mcp-toolkit exec --name discover_debug_apps --args '{}'
flutter-mcp-toolkit exec --name status --args '{}'
flutter-mcp-toolkit doctor --json --target ws://127.0.0.1:8181/<new-token>/ws
After a successful auto re-attach, meta.recovery.reattachedTo shows the new endpoint.
connect_failed
Wrong port, app not started, or stale token. Pass explicit URI from app.debugPort.wsUri:
flutter-mcp-toolkit exec --name get_vm --args '{"connection":{"uri":"ws://127.0.0.1:8181/<token>/ws"}}'
connection_selection_required
Multiple debug targets detected. List with discover_debug_apps, then pass the chosen URI from details.availableTargets explicitly to get_vm.
hot_reload_failed
Dart compilation error or VM disconnected. Check errors, fix, then retry:
flutter-mcp-toolkit exec --name get_app_errors --args '{}'
visual_capture_unsupported
macOS screen recording permission not granted or unsupported platform:
flutter-mcp-toolkit permissions request --kind visual_capture
Connection issues (deeper troubleshooting)
Port conflicts: VM service defaults to 8181. Override if another process holds it:
flutter run --debug --host-vmservice-port=8182 -d macos
flutter-mcp-toolkit --dart-vm-port 8182 doctor --json
Use flutter run --machine and copy app.debugPort.wsUri when you need the exact websocket URI (recommended for validate-runtime and exec).
Flutter app not in debug mode: Release/profile builds don't expose the VM service. Always use flutter run --debug.
mcp_toolkit not initialized: Doctor's mcp_toolkit_extensions check will fail. Add before runApp — use flutter-mcp-toolkit codegen-init to generate the boilerplate (see CLI surface below). After adding, hot restart (not hot reload — binding init requires a full restart).
Multiple apps / wrong target: Pass --target with the exact websocket URI:
flutter-mcp-toolkit doctor --json --target ws://127.0.0.1:8181/<token>/ws
CLI surface
The binary is flutter-mcp-toolkit (built to mcp_server_dart/build/).
| Subcommand | Purpose | Minimal example |
|---|---|---|
exec |
Run a single named command against the VM | flutter-mcp-toolkit exec --name get_vm --args '{}' |
batch |
Run multiple commands in one call | flutter-mcp-toolkit batch --steps '[{"name":"get_vm"},{"name":"status"}]' |
schema |
Print the JSON schema for a named command | flutter-mcp-toolkit schema --name hot_reload_flutter |
capabilities |
List all registered capabilities | flutter-mcp-toolkit capabilities |
serve |
Start the MCP server (stdio transport) | flutter-mcp-toolkit serve |
snapshot create |
Capture and save a named snapshot | flutter-mcp-toolkit snapshot create --name baseline --args '{}' |
snapshot diff |
Diff two snapshots | flutter-mcp-toolkit snapshot diff --from baseline --to current |
bundle create |
Package a snapshot into a publishable bundle | flutter-mcp-toolkit bundle create --from-snapshot baseline --output ./out |
doctor |
Run preflight checks (VM + toolkit + registry) | flutter-mcp-toolkit doctor --json |
permissions status |
Check a permission (e.g. visual_capture) | flutter-mcp-toolkit permissions status --kind visual_capture |
permissions request |
Request a permission | flutter-mcp-toolkit permissions request --kind visual_capture |
permissions open-settings |
Open OS settings for a permission | flutter-mcp-toolkit permissions open-settings --kind visual_capture |
validate-runtime |
End-to-end VM + toolkit + capture smoke test | flutter-mcp-toolkit validate-runtime --target ws://127.0.0.1:8181/<token>/ws |
init <agent> |
Install skills + MCP server config for an AI agent | flutter-mcp-toolkit init claude-code |
codegen-init |
Add toolkit dependency and emit main.dart boilerplate |
flutter-mcp-toolkit codegen-init |
Global flags (before the subcommand): --dart-vm-port <n>, --dart-vm-host <host>, --vm-service-uri <ws_uri>, --log-level <level>, --dumps, -h/--help.
VM targeting: Global --vm-service-uri applies to doctor and validate-runtime when subcommand --target is omitted. If both are set and differ, --target wins (stderr warning).
validate-runtime screenshots: the first capture uses auto (often desktop_window on macOS). If that step fails with a retryable get_screenshots_failed, the CLI retries once with flutter_layer. On success, data.summary.captureFallbackUsed is true in the JSON envelope.
init <agent>
Install the flutter-mcp-toolkit skills + MCP server config for an AI agent.
Targets: claude-code | cursor | codex | cline | agents-skills | all.
flutter-mcp-toolkit init claude-code # install for Claude Code (project-scoped)
flutter-mcp-toolkit init cursor --scope user # install user-globally for Cursor
flutter-mcp-toolkit init all --mode cli # install for every detected agent in CLI mode
Mode auto-detects (MCP if registered, else CLI). Override with --mode mcp|cli|auto.
Alternative (skills only, open ecosystem): npx skills add Arenukvern/mcp_flutter -a cursor -y installs the same SKILL.md bundles via skills.sh; it does not write mcp.json — run init afterward or configure mcpServers manually. See AI agent overview.
codegen-init
From a Flutter project root, add flutter_mcp_toolkit as a dependency and emit
the boilerplate snippet for lib/main.dart.
cd my-flutter-app
flutter-mcp-toolkit codegen-init # runs `flutter pub add` + prints snippet
flutter-mcp-toolkit codegen-init --no-pub-add # snippet only, skip pub add
Reinstall / upgrade
The install script is idempotent — re-running it replaces the binary in place:
curl -fsSL https://raw.githubusercontent.com/Arenukvern/mcp_flutter/main/install.sh | bash
After reinstall, verify with flutter-mcp-toolkit --version.
Source: Arenukvern/mcp_flutter — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核