MCP Servers

模型上下文协议服务器、框架、SDK 和模板的综合目录。

MCP server by alfredobs97

创建于 2/25/2026
更新于 about 4 hours ago
Repository documentation and setup instructions

Dart Docs MCP Server

A local Model Context Protocol (MCP) server that provides an AI agent with the ability to fetch documentation context for Dart and Flutter packages from pub.dev.

Features

  • Fetches package metadata from pub.dev API.
  • Automatically discovers the package's GitHub repository.
  • Extracts the main README.md.
  • Extracts the example directory contents, specifically example/README.md and the entire example/lib folder, to give the AI agent concrete usage examples.

Installation

Via Homebrew (macOS & Linux)

You can install the dart-docs-mcp globally without needing the Dart SDK installed:

brew tap alfredobs97/tap
brew install dart-docs-mcp

This will make the dart-docs-mcp command available globally.

Running Locally (Development)

To run the server locally, simply execute:

dart run bin/dart_docs_mcp.dart

This starts the MCP Server on standard input/output (stdio), which is standard for MCP clients (like Claude, Gemini CLI, or Google Antigravity).

Using Docker (No installation required)

If you don't want to install Dart or FVM locally, you can use Docker.

For Development/Testing:

This runs the server using dart run, which is faster for iterating as it doesn't require a full AOT compilation.

docker build --target dev -t dart-docs-mcp:dev .
docker run -i dart-docs-mcp:dev

For Production:

This builds a minimal image with a native AOT-compiled binary.

docker build --target runtime -t dart-docs-mcp:latest .
docker run -i dart-docs-mcp:latest

Tools Exposed

  • get_package_docs: Given a package_name (Dart or Flutter package), it returns the compiled context consisting of the README and example files.

Adding to an MCP Client

Example for Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "dart_docs_mcp": {
      "command": "dart-docs-mcp",
      "args": []
    }
  }
}

Example for Gemini CLI

You can configure the MCP server in Gemini CLI either globally (~/.gemini/settings.json) or at the project level (.gemini/settings.json). Add the following inside your settings file:

{
  "mcpServers": {
    "dart_docs_mcp": {
      "command": "dart-docs-mcp",
      "args": []
    }
  }
}

Tip: You can also add it without manually editing the file by using the Gemini CLI configuration command:

gemini mcp add local stdio dart_docs_mcp --command dart-docs-mcp

Example for Google Antigravity IDE

Google Antigravity allows you to easily connect local MCP servers directly through its user interface:

  1. Open Antigravity and go to the Agent session window.
  2. Click the "..." (Options) dropdown menu at the top of the editor's side panel.
  3. Select MCP Servers and then choose Manage MCP.
  4. Click on View Config and paste your JSON configuration into the editor:
{
  "mcpServers": {
    "dart_docs_mcp": {
      "command": "dart-docs-mcp",
      "args": []
    }
  }
}
  1. Save the configuration and click the Refresh button. The get_package_docs tool will now be natively available to your Antigravity AI agents to fetch Dart and Flutter package context on demand.

Testing

Run unit tests via:

dart test
快速设置
此服务器的安装指南

安装命令 (包未发布)

git clone https://github.com/alfredobs97/dart_docs_mcp
手动安装: 请查看 README 获取详细的设置说明和所需的其他依赖项。

Cursor 配置 (mcp.json)

{ "mcpServers": { "alfredobs97-dart-docs-mcp": { "command": "git", "args": [ "clone", "https://github.com/alfredobs97/dart_docs_mcp" ] } } }