Skip to content

feat(mcp_dart_cli): enhance CLI with serve command, docs, and tests#55

Merged
leehack merged 7 commits intomainfrom
cli-update
Dec 19, 2025
Merged

feat(mcp_dart_cli): enhance CLI with serve command, docs, and tests#55
leehack merged 7 commits intomainfrom
cli-update

Conversation

@leehack
Copy link
Copy Markdown
Owner

@leehack leehack commented Dec 19, 2025

This pull request introduces significant improvements to the MCP Dart ecosystem, focusing on simplifying publishing workflows, enhancing the CLI tool, and fixing core transport logic. The most important changes are grouped below:

Publishing Workflow Modernization

  • Added a unified .github/workflows/publish.yml workflow for publishing both mcp_dart and mcp_dart_cli packages, supporting manual dispatch, dry runs, and automated tagging/releases.
  • Removed legacy workflows: .github/workflows/publish_core.yml and .github/workflows/publish_cli.yml are deleted in favor of the new unified workflow. [1] [2]

CLI Tool Enhancements

  • Major update to mcp_dart_cli with new commands: serve (run MCP server with stdio/HTTP and watch mode), doctor (project health and connectivity checks), and inspect (interact with MCP servers via command or HTTP). Extensive documentation and usage examples added. [1] [2] [3] [4] [5]
  • Added CONTRIBUTING.md to guide contributors on setup, testing, and code style for mcp_dart_cli.
  • Introduced build.yaml to enable brick bundling for CLI project scaffolding.
  • Provided a generated runner script supporting both stdio and HTTP transports for new MCP server projects.

Core Package Improvements

  • Fixed StdioClientTransport stderr handling: always uses ProcessStartMode.normal for proper piping; corrected logic so stderrMode: normal exposes stderr via getter, and stderrMode: inheritStdio pipes to parent process. [1] [2] [3] [4]
  • Updated documentation to promote CLI-based quick start and improved MCP server setup instructions.

Version Bumps and Documentation

  • Bumped mcp_dart version to 1.1.2 in docs and llms.txt, reflecting the latest fixes and features. [1] [2]
  • Updated changelogs for both mcp_dart and mcp_dart_cli packages with detailed summaries of new features and fixes. [1] [2]

These changes streamline publishing, improve developer experience with the CLI, and resolve a critical transport bug, making MCP Dart easier to use and contribute to.

- Always use ProcessStartMode.normal for proper stdin/stdout piping
- Fix inverted stderr mode logic: 'normal' now exposes stderr via getter
  without internal listening, 'inheritStdio' now pipes to parent stderr
- Update version to 1.1.2
- Add 'doctor' command to check project configuration and test connectivity
- Add 'inspect' command to interact with MCP servers:
  - List capabilities (tools, resources, prompts)
  - Execute tools, read resources, get prompts
  - Support local projects and external servers (stdio/HTTP)
  - Support sampling/createMessage requests from servers
- Add utility classes: McpConnection, InspectPrinter, InspectHandlers
- Update documentation with command usage examples
- Update version to 0.1.2
- Merge publish_core.yml and publish_cli.yml into single publish.yml
- Add workflow_dispatch trigger with package selection dropdown
- Auto-read version from pubspec.yaml (no manual input needed)
- Add tag existence check to fail early on duplicate releases
- Add dry_run option to test without publishing to pub.dev
- Auto-generate GitHub releases with release notes
- Replace inline code example with CLI-based quick start
- Add CLI commands table (create, serve, doctor, inspect)
- Show Claude Desktop configuration example
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.41%. Comparing base (8219c63) to head (e8137cd).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/src/client/stdio.dart 33.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #55      +/-   ##
==========================================
- Coverage   77.44%   77.41%   -0.03%     
==========================================
  Files          40       40              
  Lines        5068     5066       -2     
==========================================
- Hits         3925     3922       -3     
- Misses       1143     1144       +1     
Flag Coverage Δ
unittests 77.41% <33.33%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@leehack leehack merged commit c1a944d into main Dec 19, 2025
5 of 7 checks passed
@leehack leehack deleted the cli-update branch December 19, 2025 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant