The Pub.dev MCP Server enables AI assistants to interact with pub.dev to search, analyze, and retrieve comprehensive information about Dart and Flutter packages.
- Search Packages: Find packages using advanced filtering and sorting options (by popularity, likes, update time, etc.)
- Retrieve Package Information: Get detailed metadata, dependencies, statistics, and publisher information for specific packages
- Check for Updates: Verify if a package has available updates against a specified current version
- Access Version History: Fetch complete version history with release dates
- Retrieve Documentation: Access README, changelog, examples, and API documentation for any package version
- Compare Package Versions: Analyze differences in dependencies and other changes between two package versions
Provides tools for searching, analyzing, and retrieving detailed information about Dart packages from pub.dev, including package metadata, dependencies, version management, and documentation access.
Provides tools for searching, analyzing, and retrieving detailed information about Flutter packages from pub.dev, including package metadata, dependencies, version management, and documentation access.
Pub.dev MCP Server
A Model Context Protocol (MCP) server for pub.dev, the official package repository for Dart and Flutter.
It allows AI assistants to search, analyze, and retrieve detailed information about Dart/Flutter packages.
✨ Features
- 🔍 Package Search – Advanced filtering & sorting
- 📦 Package Information – Metadata, dependencies, statistics
- 🔄 Version Management – Check updates, compare versions, track history
- 📚 Documentation Access – README, changelog, examples, API docs
- ⚡ Caching – Built-in 5-minute intelligent cache
- 🛠 Dependency Analysis – Compare dependencies between versions
📦 Installation
NPM (Recommended)
From Source
⚙️ Configuration
Claude Desktop
- Locate your configuration file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Linux:
~/.config/Claude/claude_desktop_config.json
- Windows:
- Add:
- Restart Claude Desktop.
Local Build Example:
Other MCP Clients:
🛠 Available Tools
Tool | Description | Key Parameters |
---|---|---|
get_package_info | Retrieve package metadata, stats, dependencies, publishers | packageName |
search_packages | Search with filters and sorting | query , sort , page |
check_package_updates | Check if updates are available | packageName , currentVersion |
get_package_versions | Get version history | packageName , limit |
get_documentation_changes | Get README, changelog, examples, API docs | packageName , version , docType |
compare_package_versions | Compare dependencies & changes between versions | packageName , fromVersion , toVersion |
📖 Example Commands
- Search Packages
"Search for state management packages sorted by popularity" - Package Details
"Get information about the flutter_bloc package" - Check Updates
"Check if provider has updates from version 6.0.0" - Get Docs
"Get the changelog for dio version 4.0.0" - Compare Versions
"Compare dependencies between http 2.0.0 and 3.0.0"
💻 Development
Test with MCP Inspector:
🌐 API Reference
https://pub.dev/api/packages/{package}
https://pub.dev/api/search
https://pub.dev/api/packages/{package}/versions
https://pub.dev/packages/{package}/{version}/{doc-type}
🛡 Error Handling
- Graceful handling of network & API failures
- Clear errors for invalid/non-existent packages
- Built-in delays for respectful rate limiting
- Detailed validation messages for malformed requests
🤝 Contributing
- Fork & branch (
git checkout -b feature/amazing-feature
) - Install deps (
npm install
) - Build & test (
npm run build && npm test
) - Commit & push (
git commit -m 'Add feature' && git push
) - Open a Pull Request
📜 License
MIT – See LICENSE
📢 Support
🆕 Changelog
v1.0.0
- Initial release
- All major pub.dev API endpoints supported
- Caching & error handling implemented
- Full MCP protocol compliance
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
Enables AI assistants to search, analyze, and retrieve detailed information about Dart and Flutter packages from pub.dev. Supports package discovery, version management, dependency analysis, and documentation access.
- ✨ Features
- 📦 Installation
- ⚙️ Configuration
- 🛠 Available Tools
- 📖 Example Commands
- 💻 Development
- 🌐 API Reference
- 🛡 Error Handling
- 🤝 Contributing
- 📜 License
- 📢 Support
- 🆕 Changelog
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityEnables interaction with the Flutter SDK by providing tools to analyze and apply fixes to Dart and Flutter files.Last updated -27JavaScript
- -securityFlicense-qualityEnables AI assistants to search documentation of packages and services to find implementation details, examples, and specifications.Last updated -Python
- -securityFlicense-qualityEnables AI assistants to search for documentation of packages and services, providing implementation details, examples, and specifications through a specialized API.Last updated -92JavaScript
- AsecurityAlicenseAqualityA real-time server that provides Flutter/Dart documentation and pub.dev package information to AI assistants, ensuring they generate accurate and up-to-date Flutter code.Last updated -838PythonMIT License