MCP (Model Context Protocol) servers for Dart/Flutter development.
This package provides the following MCP servers:
File system operations with restricted access to allowed paths:
list-content- Recursively list files and directoriesread-file- Read a single file with line numbersread-files- Read multiple filessearch-text- Search for text patterns in filescreate-directory- Create directoriescreate-file- Create new filesedit-file- Edit existing files (overwrite, insert, or replace lines)extract- Extract lines from one file and insert into another
Git version control operations with SSH/GPG signing support:
status- Show working tree statusbranch-create- Create a new branchbranch-list- List all branchesbranch-switch- Switch to a branchmerge- Merge a branch into current branchadd- Stage files for commitcommit- Commit staged changes (supports SSH and GPG signing)stash- Stash current changesstash-list- List all stashesstash-apply- Apply a stashstash-pop- Apply and remove a stashtag-create- Create a new tagtag-list- List all tagslog- Show commit historydiff- Show changessigning-status- Check SSH/GPG signing configuration
The Git MCP auto-detects the enclosing git repository by walking upward from the --project-dir until a .git entry is found. This means you can point --project-dir at any sub-directory of a monorepo and git operations work transparently — no configuration is required.
Path-based access control (the git: list in jhsware-code.yaml) stays anchored at the project directory. Even though git runs from the parent repo root, you can only stage and commit files inside your project's allowed paths.
If no .git is found all the way up to the filesystem root, the server returns a clear error: No git repository found. Searched for a .git directory starting at "<projectDir>" and walking up to the filesystem root without success. Run "git init" here or in a parent directory.
Task and step management for AI-assisted development:
- Task operations:
add-task,show-task,update-task,list-tasks - Step operations:
add-step,show-step,update-step - Memory:
show-task-memory,update-task-memory - Backlog items:
add-item,show-item,update-item,list-items - Slates:
add-slate,show-slate,update-slate,list-slates - Timeline:
log-commit,log-merge,get-timeline,get-audit-trail - Parent task pattern with sub-task references
Code indexing for quick and token efficient exploration:
index- Index code filessearch- Search indexed codebrowse- Browse code structurediff- Show changes since last index
Run Dart programs with polling for long-running processes:
analyze- Rundart analyzetest- Rundart testrun- Rundart runformat- Rundart formatpub-get- Rundart pub getget_output- Poll for process outputlist_sessions- List active sessionscancel- Cancel a running session
Run Flutter programs via FVM with polling:
analyze- Runfvm flutter analyzetest- Runfvm flutter testrun- Runfvm flutter runbuild- Runfvm flutter buildget_output- Poll for process outputlist_sessions- List active sessionscancel- Cancel a running session
URL fetching with HTML to Markdown conversion:
fetch- Fetch URL content with optional Markdown conversionfetch-links- Extract links from a URLfetch-and-transform- Fetch and convert HTML content
All MCP servers share a common CLI argument format:
dart run packages/<server>/bin/<server>_mcp.dart \
--project-dir=/path/to/project1 \
--project-dir=/path/to/project2 \
--planner-data-root=/path/to/data \
--prompts-file=/path/to/prompts.yaml--project-dir=PATH- Path to a project directory (required, can be repeated for multi-project sessions)--planner-data-root=PATH- Root directory for planner/code-index data (required for planner and code_index)--prompts-file=PATH- Path to prompts YAML file (optional)--help, -h- Show help message
Database paths are automatically inferred from --planner-data-root:
- Planner:
[planner-data-root]/projects/[project-dir-name]/db/planner.db - Code Index:
[planner-data-root]/projects/[project-dir-name]/db/code_index.db
Each project directory can contain a jhsware-code.yaml configuration file that specifies allowed paths per tool:
filesystem:
allowed_paths:
- packages
- test
- README.md
- pubspec.yaml
git:
allowed_paths:
- .
code-index:
allowed_paths:
- packagesAll tool operations require a project_dir parameter that must match one of the registered --project-dir values. This enables multi-project sessions where each tool invocation specifies which project it operates on.
# Clone the repository
git clone https://github.com/jhsware/dart_dev_mcp.git
cd dart_dev_mcp
# Get dependencies for all packages
cd packages/shared_libs && dart pub get && cd ../..
cd packages/planner && dart pub get && cd ../..
cd packages/code_index && dart pub get && cd ../..
cd packages/filesystem && dart pub get && cd ../..
cd packages/git && dart pub get && cd ../..
cd packages/dart_runner && dart pub get && cd ../..
cd packages/flutter_runner && dart pub get && cd ../..Use the claude.sh script to launch Claude with the MCP servers:
./claude.sh --project-dir=/path/to/project --planner-data-root=/path/to/dataThe file system and git MCP servers only allow access to paths specified in each project's jhsware-code.yaml configuration file. This prevents unauthorized access to sensitive files.
All tool invocations require a valid project_dir parameter that must match a registered project directory, providing isolation between projects in multi-project sessions.
# Run tests for a package
dart test packages/planner
dart test packages/filesystem
# Analyze code
dart analyze packages/shared_libs
dart analyze packages/planner
# Format code
dart format packages/MIT