An MCP server that provides tools for exploring Dart and Flutter package documentation, API surfaces, changelogs, type hierarchies, and source code from pub.dev
Dart Docs MCP demonstrates solid tool design with consistent naming (all verb-prefixed), comprehensive descriptions (avg 180+ chars), and proper JSON schemas with typed parameters. All 6 tools have input schemas and descriptions. Tool annotations (readOnlyHint) are correctly applied. However, output schemas are entirely missing, no tool declares what it returns, forcing LLMs to infer structure. Error handling is minimal; tools throw generic Exceptions without recovery guidance. Parameter descriptions are good but lack format constraints (e.g., version format for get_changelog). Cross-reference and search_package_code tools lack optional parameter documentation.
Maps a conceptual feature described in a package README to its actual implementation inside the repository .dart files.
Fetches the public API surface of a Dart or Flutter package from pub.dev using the pre-rendered Dartdoc index.json. Returns a concise listing of all public classes, enums, mixins, methods, constructors, and top-level functions — with all private symbols stripped. Use this to quickly understand a package's public API contract without reading full source files. Optionally filter to a specific class or enum by name.
Fetch the CHANGELOG.md for a Dart/Flutter package and return the specific entries between current and target versions. Use this to understand breaking changes and migration steps.
Fetch the README and example directory documentation for a Dart and/or Flutter package from pub.dev to provide context. Use this when you need documentation and examples for a pub.dev package dependency.
Reconstruct the inheritance and implementation tree of a remote Dart class (handles sealed, base, interface, and mixin modifiers). Use this to discover all subclasses, implementers, and mixin consumers of a type before writing exhaustive switch expressions or instantiating concrete variants. Especially critical for sealed classes in Dart 3, where exhaustive pattern matching requires knowing every direct subclass at compile time.
No output schemas documented for any tool. LLMs cannot infer return structure, forcing them to guess field names and types. This violates pattern:tool and pattern:response-shaper.
Error handling is minimal. Tools throw generic Exception() with no recovery guidance. Per pattern:recovery-guide, errors must tell LLMs what to do next (e.g., 'Package not found. Try search_packages() with a partial name.').
get_changelog accepts version strings (e.g., '1.0.0', '2.1.0') but lacks format constraints in parameter descriptions. Should specify semantic versioning format to prevent LLM hallucination of invalid versions.
Inferred effective spec: 2025-06-18+.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 53 | 2025-06-18+ | v2 |
Performs a case-insensitive keyword or regex search across the internal `lib/` source files of a pub.dev package. Returns file paths, 1-based line numbers, and a ±3-line context snippet for each match. Generated files (e.g. *.g.dart, *.freezed.dart) are excluded. Results are capped at 15 matches. Use this to inspect private implementation details that are not covered by the public API surface or README.
search_package_code caps results at 15 matches but does not document pagination or how to retrieve additional results. Per pattern:paginated-result, tools returning lists must support offset/limit and return total count.
cross_reference tool description is vague ('Maps a conceptual feature to implementation'). Lacks guidance on when to use it vs. search_package_code or get_api_surface. Should explain: 'Use this to find where a README feature is implemented in source code.'