Flutter MCP Server
Flutter MCP server provides AI models with real-time Flutter/Dart documentation and pub.dev package information for accurate, version-aware code generation.
Overview
The Flutter MCP Server is an open-source implementation of the Model Context Protocol (MCP) for the Dart and Flutter ecosystem. It acts as a bridge between AI assistants, developer tools, and automated workflows, enabling secure, programmable, and context-aware automation of Dart and Flutter development tasks. It provides AI agents with real-time Flutter/Dart documentation and pub.dev package information, helping to generate accurate and up-to-date Flutter code.
Community Server:
Maintained by adamsmaka and published to npm as flutter-mcp. It is not an official Flutter or Dart project.
Key Features
Real-time Documentation
Provides up-to-date Flutter/Dart documentation and pub.dev package info to AI assistants.
Version-Specific Docs
Request exact versions, ranges, or keywords like latest and stable using pub.dev syntax.
Local & Private
Runs locally with SQLite caching, so code and queries stay on your machine.
All pub.dev Packages
Works with all 50,000+ packages on pub.dev and auto-detects packages from your pubspec.yaml.
Available Tools
Quick Reference
| Tool | Purpose | Category |
|---|---|---|
flutter_search | Search Flutter/Dart docs and pub.dev packages | Discovery |
flutter_docs | Fetch documentation for a widget, class, or package | Documentation |
flutter_status | Check server health and cache statistics | Diagnostics |
Detailed Usage
flutter_searchβΆ
Searches Flutter/Dart documentation and pub.dev packages with intelligent ranking.
use_mcp_tool({
server_name: "flutter-docs",
tool_name: "flutter_search",
arguments: {
query: "state management",
limit: 10
}
});
flutter_docsβΆ
Fetches documentation for a widget, class, library, or pub.dev package. The identifier format is auto-detected.
use_mcp_tool({
server_name: "flutter-docs",
tool_name: "flutter_docs",
arguments: {
identifier: "Container",
topic: "examples",
max_tokens: 10000
}
});
Supported identifier formats include Container, material.AppBar, provider, and dart:async.Future.
flutter_statusβΆ
Health check that reports service status and cache statistics.
use_mcp_tool({
server_name: "flutter-docs",
tool_name: "flutter_status",
arguments: {}
});
Legacy Tools
These tools remain for backward compatibility but are deprecated in favor of the simplified tools: get_flutter_docs, get_pub_package_info, search_flutter_docs, process_flutter_mentions, and health_check.
Installation
The npm package requires Node.js 16+ and manages its Python dependency automatically.
{
"mcpServers": {
"flutter-docs": {
"command": "npx",
"args": ["flutter-mcp"]
}
}
}
For Claude Code, add .mcp.json in your Flutter project root with the same configuration. The server auto-detects packages from pubspec.yaml.
HTTP Transport:
For HTTP-based clients, start the server with npx flutter-mcp --transport http --port 8000.
Common Use Cases
1. Real-Time Documentation Lookup
Fetch current documentation so the AI does not rely on outdated training data:
use_mcp_tool({
server_name: "flutter-docs",
tool_name: "flutter_docs",
arguments: {
identifier: "provider",
topic: "examples"
}
});
2. Package Discovery
Search pub.dev and Flutter docs to compare libraries before choosing one:
use_mcp_tool({
server_name: "flutter-docs",
tool_name: "flutter_search",
arguments: {
query: "http client",
limit: 10
}
});
3. Version-Specific Answers
Ask about exact versions, ranges, or keywords such as @flutter_mcp riverpod:2.5.1, provider:stable, or dio:^5.0.0.
Connection Options
The server uses STDIO by default. For HTTP or SSE clients, start it manually:
npx flutter-mcp --transport http --port 8000
npx flutter-mcp --transport sse --port 8080
--transport httpfor HTTP-based clients--transport ssefor Server-Sent Events clients--portdefaults to8000--hostdefaults to127.0.0.1
Sources
Related Articles & Guides
Auth0 MCP Server
Auth0 MCP server enables AI models to interact with Auth0 identity and access management, including applications, APIs, actions, logs, and forms.
Accessibility Scanner MCP Server
Accessibility Scanner MCP servers enable AI models to perform WCAG compliance checks, capture annotated screenshots, and generate detailed accessibility reports.
AWS MCP Server
Interact with Amazon Web Services through your AI assistant using the AWS API MCP Server.