pub-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pub-mcp show me the README and latest version of the http package"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pub-mcp π¦β¨
MCP (Model Context Protocol) server for pub.dev - Open Source. Enables LLMs and AI assistants to access Dart/Flutter package information from pub.dev.
β‘ Quick Start
Option 1: Install Globally
npm install -g pub-mcp
pub-mcpOption 2: Use npx (Recommended)
No installation required! Use directly in your MCP config:
{
"mcpServers": {
"pub-mcp": {
"command": "npx",
"args": ["-y", "pub-mcp"]
}
}
}Option 3: Local Installation
npm install pub-mcp
npx pub-mcpThat's it! Your MCP server is running on port 3000 (HTTP) and listening on stdio.
Related MCP server: Flutter Package MCP Server
π― Features
Feature | Description |
π Package Search | Search packages on pub.dev by query |
π¦ Package Info | Get metadata, versions, publisher info |
β Package Score | Pana points, likes, downloads, tags |
π Changelog | Package changelog for any version |
π Metrics | Comprehensive metrics (info + score + versions) |
π README | Package README with GitHub fallback |
π Dependencies | Package dependency tree |
π MCP Resources | Access packages as resources |
π Dual Transport | Stdio and Streamable HTTP |
πΎ LRU Caching | Built-in caching for performance |
β‘ Rate Limiting | Retry with exponential backoff |
π Structured Logging | Pino logger integration |
π Usage
Starting the Server
# Both transports (default - stdio + HTTP on port 3000)
pub-mcp
# Stdio only (for Claude Desktop, etc.)
pub-mcp --stdio
# HTTP only
pub-mcp --http
# HTTP on custom port
pub-mcp --http --port 8080
# Check version
pub-mcp --version
# Check API health
pub-mcp --healthConnecting AI Clients
Claude Desktop / VS Code / Cursor
Add to your MCP settings file:
Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.jsonVS Code:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/Model Context Protocol/mcp_settings.jsonCursor:
[project root]/.cursor/mcp.json
Option 1: npx (Recommended - no installation needed)
{
"mcpServers": {
"pub-mcp": {
"command": "npx",
"args": ["-y", "pub-mcp"]
}
}
}Option 2: Global installation
{
"mcpServers": {
"pub-mcp": {
"command": "pub-mcp",
"args": ["--stdio"]
}
}
}Option 3: Local installation
{
"mcpServers": {
"pub-mcp": {
"command": "node",
"args": ["./node_modules/pub-mcp/dist/cli.js", "--stdio"]
}
}
}Other MCP Clients
# Start HTTP server
pub-mcp --http
# Connect to http://localhost:3000/mcpπ§ Configuration
Environment variables (optional, can be set in .env):
Variable | Default | Description |
|
| HTTP server port |
|
| Cache TTL in seconds |
|
| Maximum cache items |
|
| Concurrent request limit |
|
| Retry attempts |
|
| pub.dev API URL |
|
| GitHub API URL |
| - | GitHub token for higher rate limits |
|
| Logging level |
π οΈ MCP Tools
Tool | Description | Parameters |
| π Search packages on pub.dev |
|
| π¦ Get package details |
|
| π Get all package versions |
|
| π Get package README |
|
| π Get package dependencies |
|
| β Get score & metrics |
|
| π Get package changelog |
|
| π Get comprehensive metrics |
|
π Get Readme Format
The get_readme tool supports a format parameter:
{
"name": "get_readme",
"arguments": {
"name": "http",
"format": "markdown" // "markdown" | "text" | "html"
}
}π MCP Resources
URI | Description |
| π¦ List of popular Dart/Flutter packages |
| π Package documentation and metrics |
π‘ Examples
π Search Packages
{
"name": "search_packages",
"arguments": {
"query": "http client",
"limit": 5
}
}Response:
{
"packages": [
{
"name": "http",
"description": "A composable, Future-based library for making HTTP requests.",
"latestVersion": "1.2.1"
},
{ "name": "dio", "description": "A powerful HTTP client for Dart.", "latestVersion": "5.4.0" }
],
"total": 2
}β Get Package Score
{
"name": "get_package_score",
"arguments": {
"name": "http"
}
}Response:
{
"grantedPoints": 160,
"maxPoints": 160,
"likeCount": 8425,
"downloadCount30Days": 8375591,
"tags": ["sdk:dart", "sdk:flutter", "topic:http", "topic:network"]
}π Get Package Metrics
{
"name": "get_package_metrics",
"arguments": {
"name": "provider"
}
}Response:
{
"info": {
"name": "provider",
"description": "A wrapper around InheritedNotifier...",
"latestVersion": "6.1.2",
"published": "2024-01-15T..."
},
"score": {
"grantedPoints": 160,
"maxPoints": 160,
"likeCount": 3200,
"downloadCount30Days": 1500000,
"tags": ["sdk:flutter", "is:flutter-friendly"]
},
"versionCount": 45,
"latestVersion": "6.1.2"
}ποΈ Development
# Clone and install
git clone https://github.com/testx1011/pub-mcp.git
cd pub-mcp
npm install
# Build
npm run build
# Development mode with watch
npm run dev
# Run tests
npm run test
# Watch mode for tests
npm run test:watch
# Lint code
npm run lint
# Format code
npm run formatπ License
MIT License - see LICENSE file.
π€ Contributing
Contributions are welcome! Please read our Contributing Guidelines first.
Available Tools
10 toolsget_changelogC
Get the changelog of a specific package version
Inputs: name (required), version.
get_dependenciesC
Get the dependencies of a package
Inputs: name (required), version.
get_exampleC
Get the example code of a package
Inputs: name (required), version.
get_package_infoC
Get detailed information about a specific package
Inputs: name (required).
get_package_metricsA
Get comprehensive metrics for a package (info + score + versions)
Inputs: name (required).
get_package_scoreC
Get package score and metrics (pana points, likes, downloads, tags)
Inputs: name (required).
get_package_versionsB
Get all available versions of a package
Inputs: name (required).
get_readmeC
Get the README content of a package
Inputs: name (required), format, version.
search_packagesC
Search for packages on pub.dev by query with optional filters
Inputs: query (required), sdk, limit, topic, +1 more.
search_similar_packagesB
Find packages similar to a given package or by tags
Inputs: name, tags, limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 10 tools
Most tools are clearly distinct (get_dependencies, get_changelog, get_example, get_readme, search_packages). However, get_package_score, get_package_metrics, and get_package_info overlap significantlyβget_package_metrics explicitly bundles info + score + versions, making it hard to know which tool to call for a simple lookup.
All tools follow a consistent snake_case verb_noun pattern (get_* and search_*). No mixed conventions or vague verbs.
10 tools is well-scoped for a pub.dev package-inspection server. Each operation maps to a distinct facet of package data, and none feels like filler.
The surface covers search, info, versions, score, metrics, dependencies, changelog, example, and readmeβa thorough read-only lifecycle. Minor gaps like retrieving a specific version's full metadata or publisher/ownership info are easily worked around.
Maintenance
Related MCP Connectors
Real-time package and vulnerability data (Python, npm, Cargo, Go, and more) for AI coding agents.
Check Dart/Flutter dependencies on pub.dev for updates and manage monitored projects.
Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.
Package intelligence for AI agents across npm, PyPI, crates.io and deps.dev. No API keys.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables 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.620 npm5MIT
- AlicenseAqualityDmaintenanceIntegrates the Pub.dev API with AI assistants to provide real-time Flutter package information, documentation, and trend analysis. It enables users to search for packages, compare versions, and evaluate quality scores through natural language commands.6MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and retrieve detailed package information from multiple package registries (NPM, crates.io, NuGet, PyPI, Go).MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching pub.dev for Dart and Flutter packages by keyword, returning matching package names and pagination URLs.75 npmMIT