Skip to main content
Glama

Pub.dev MCP Server

by devqxi

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 install -g @devqxi/pubdev-mcp-server

From Source

git clone https://github.com/devqxi/pubdev-mcp-server.git cd pubdev-mcp-server npm install npm run build npm run start

⚙️ Configuration

Claude Desktop

  1. 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
  2. Add:
{ "mcpServers": { "pubdev": { "command": "npx", "args": ["@devqxi/pubdev-mcp-server"] } } }
  1. Restart Claude Desktop.

Local Build Example:

{ "mcpServers": { "pubdev": { "command": "node", "args": ["/path/to/pubdev-mcp-server/dist/pubdev-mcp.js"] } } }

Other MCP Clients:

npx @devqxi/pubdev-mcp-server

🛠 Available Tools

ToolDescriptionKey Parameters
get_package_infoRetrieve package metadata, stats, dependencies, publisherspackageName
search_packagesSearch with filters and sortingquery, sort, page
check_package_updatesCheck if updates are availablepackageName, currentVersion
get_package_versionsGet version historypackageName, limit
get_documentation_changesGet README, changelog, examples, API docspackageName, version, docType
compare_package_versionsCompare dependencies & changes between versionspackageName, 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

git clone https://github.com/devqxi/pubdev-mcp-server.git cd pubdev-mcp-server npm install npm run build npm run start

Test with MCP Inspector:

npx @modelcontextprotocol/inspector npx @devqxi/pubdev-mcp-server

🌐 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

  1. Fork & branch (git checkout -b feature/amazing-feature)
  2. Install deps (npm install)
  3. Build & test (npm run build && npm test)
  4. Commit & push (git commit -m 'Add feature' && git push)
  5. 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
Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

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.

  1. ✨ Features
    1. 📦 Installation
      1. NPM (Recommended)
      2. From Source
    2. ⚙️ Configuration
      1. Claude Desktop
    3. 🛠 Available Tools
      1. 📖 Example Commands
        1. 💻 Development
          1. 🌐 API Reference
            1. 🛡 Error Handling
              1. 🤝 Contributing
                1. 📜 License
                  1. 📢 Support
                    1. 🆕 Changelog

                      Related MCP Servers

                      • A
                        security
                        F
                        license
                        A
                        quality
                        Enables interaction with the Flutter SDK by providing tools to analyze and apply fixes to Dart and Flutter files.
                        Last updated -
                        2
                        7
                        JavaScript
                      • -
                        security
                        F
                        license
                        -
                        quality
                        Enables AI assistants to search documentation of packages and services to find implementation details, examples, and specifications.
                        Last updated -
                        Python
                        • Linux
                        • Apple
                      • -
                        security
                        F
                        license
                        -
                        quality
                        Enables AI assistants to search for documentation of packages and services, providing implementation details, examples, and specifications through a specialized API.
                        Last updated -
                        9
                        2
                        JavaScript
                      • A
                        security
                        A
                        license
                        A
                        quality
                        A 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 -
                        8
                        38
                        Python
                        MIT License
                        • Apple

                      View all related MCP servers

                      MCP directory API

                      We provide all the information about MCP servers via our MCP API.

                      curl -X GET 'https://glama.ai/api/mcp/v1/servers/devqxi/pubdev-mcp-server'

                      If you have feedback or need assistance with the MCP directory API, please join our Discord server