Offers Dart language documentation, enabling AI to generate accurate Dart code with proper syntax and current API methods
Provides real-time Flutter documentation and API information to AI assistants, ensuring accurate code generation with up-to-date widget information, constructor parameters, and API methods
Fetches package information from pub.dev, the Dart and Flutter package repository, providing README files and documentation for over 50,000 packages on demand
Flutter MCP: Give Your AI Real-Time Flutter Superpowers 🚀
A real-time MCP server providing Flutter/Dart documentation and pub.dev package info to AI assistants — supports ALL 50,000+ packages on demand.
Stop fighting with hallucinated widgets and deprecated APIs. Flutter MCP connects your AI assistant to real-time documentation, ensuring the Flutter code it generates actually works.
🎬 Demo
See it in action: From npx flutter-mcp
to getting real-time Flutter documentation in 20 seconds.
The Problem: Your AI is Stuck in 2021
😡 Without Flutter MCP
Result: Deprecation warnings, confused debugging, time wasted on Google
✅ With Flutter MCP
Result: Code works immediately, you ship faster
🚀 Quick Start
Installation
Get started in seconds with npm:
That's it! No Python setup, no configuration, no complexity. The server automatically installs dependencies and starts running.
📢 For MCP SuperAssistant Users: Use
npx flutter-mcp --transport http --port 8000
to enable HTTP transport!
Alternative Installation Methods
If you prefer using Python directly:
For development or customization:
For containerized deployments:
No Python, no pip, just download and run!
Requirements
- Node.js 16+ (for npm/npx)
- Python 3.10+ is auto-detected and used by the npm package
- That's it! Built-in SQLite caching means no external dependencies
2. Add to Your AI Assistant
Edit ~/Library/Application Support/Claude/claude_desktop_config.json
:
Or if you installed globally:
Restart Claude Desktop after saving. The server will automatically install dependencies on first run.
Create a .mcp.json
file in your Flutter project root:
Then run Claude Code in your project directory:
Flutter MCP will automatically provide documentation for all packages in your pubspec.yaml
.
Alternative: Global npm install
If you installed globally with npm install -g flutter-mcp
:
Important: Don't use the --dangerously-skip-permissions
flag when running Claude Code, as it prevents MCP servers from being loaded.
In Settings → MCP Servers, add:
MCP SuperAssistant requires HTTP transport. Configure it with:
- Start the server with HTTP transport:
- In MCP SuperAssistant, add a new server:
- Name: Flutter MCP
- URL:
http://localhost:8000
- Type: HTTP MCP Server
- The server will now be available in your MCP SuperAssistant client.
In your .continuerc.json
:
3. Start the Server (Optional for Testing)
Transport Options:
- Default (no flag) - STDIO for Claude Desktop and most MCP clients
--transport http
- For HTTP-based clients like MCP SuperAssistant--transport sse
- For Server-Sent Events based clients--port PORT
- Port for HTTP/SSE transport (default: 8000)--host HOST
- Host to bind to (default: 127.0.0.1)
Note: When configured in Claude Desktop, the server starts automatically using STDIO transport.
3. Use It!
Flutter MCP now features simplified tools following Context7's successful pattern - just 2 main tools instead of 5!
🎯 New Simplified Usage (Recommended)
The AI assistant can now use Flutter MCP more intelligently:
💫 Natural Language Support
Your AI will automatically detect Flutter/Dart content and fetch relevant docs:
🔧 Legacy Support
The @flutter_mcp
mentions still work for backward compatibility:
🎯 Version-Specific Documentation (NEW!)
Get documentation for specific package versions using familiar pub.dev syntax:
See Version Specification Guide for details.
📚 Available Tools
🎯 NEW: Simplified Tools (Context7-style)
Flutter MCP now provides just 2 main tools, making it easier for AI assistants to use:
1. flutter_search
- Universal Search
Search across Flutter/Dart documentation and pub.dev packages with intelligent ranking.
Returns multiple options for the AI to choose from, including Flutter classes, Dart libraries, pub packages, and concepts.
2. flutter_docs
- Smart Documentation Fetcher
Get documentation for any Flutter/Dart identifier with automatic type detection.
Supports various formats:
"Container"
- Flutter widget"material.AppBar"
- Library-qualified class"provider"
- pub.dev package"dart:async.Future"
- Dart core library
3. flutter_status
- Health Check (Optional)
Monitor service health and cache statistics.
📦 Legacy Tools (Deprecated but still functional)
The following tools are maintained for backward compatibility but internally use the new simplified tools:
get_flutter_docs
(Use flutter_docs
instead)
get_pub_package_info
(Use flutter_docs
instead)
search_flutter_docs
(Use flutter_search
instead)
process_flutter_mentions
(Still functional)
health_check
(Use flutter_status
instead)
🎯 Features
- ✨ NEW: Simplified Tools: Just 2 main tools instead of 5 - following Context7's successful pattern
- 📦 Real-Time Documentation: Fetches the latest docs for any pub.dev package on-demand
- 🎯 Version-Specific Docs: Request exact versions, ranges, or use keywords like
latest
/stable
- 🚀 Zero Configuration: Automatically detects packages from your
pubspec.yaml
- ⚡ Lightning Fast: Intelligent caching means instant responses after first fetch
- 🔒 100% Private: Runs locally - your code never leaves your machine
- 🎨 Smart Context: Provides constructors, methods, examples, and migration guides
- ♾️ Unlimited Packages: Works with all 50,000+ packages on pub.dev
- 🤖 AI-Optimized: Token limiting and smart truncation for efficient LLM usage
💡 How It Works
Flutter MCP is a local MCP server (think of it as a "RAG sidecar" for Flutter) built on the battle-tested Python MCP SDK. It enhances your AI with real-time documentation:
The Magic Behind the Scenes
- MCP Integration: Your AI assistant automatically detects when you're asking about Flutter/Dart packages
- Smart Detection: No special syntax required - just mention package names naturally
- Lightning Cache: First request fetches from pub.dev (1-2 seconds), subsequent requests are instant
- Context Injection: Documentation is seamlessly added to your AI's knowledge before it responds
- Privacy First: Everything runs locally - your code and queries never leave your machine
Performance Notes
- ⚡ First Query: 1-2 seconds (fetching from pub.dev)
- 🚀 Cached Queries: <50ms (from local SQLite cache)
- 💾 Cache Duration: 24 hours for API docs, 12 hours for packages
- 🧹 Auto-Cleanup: Expired entries cleaned on access
Error Handling
If documentation isn't available or a fetch fails, Flutter MCP gracefully informs your AI, preventing it from generating incorrect or hallucinated code based on missing information. Your AI will let you know it couldn't find the docs rather than guessing.
📊 What Gets Indexed
When you request a package, Flutter MCP extracts:
- ✅ API Documentation: Classes, methods, properties with full signatures
- ✅ Constructors: All parameters, named arguments, defaults
- ✅ Code Examples: From official docs and README files
- ✅ Migration Guides: Breaking changes and upgrade paths
- ✅ Package Metadata: Dependencies, platform support, versions
🛠️ Advanced Usage
Note: Cache is automatically managed by the server. Cached documentation expires after 24 hours (API docs) or 12 hours (packages).
For production or team use:
🛠️ Troubleshooting
This error means the system cannot find the flutter-mcp
command. Solutions:
- Use npx (recommended):
- Install globally first:
- Check Node.js installation:
- Check if Node.js 16+ is installed:
node --version
- Try running manually to see errors:
npx flutter-mcp
- The npm package will auto-install Python dependencies on first run
- Check if Python 3.8+ is available:
python3 --version
- View detailed logs:
DEBUG=true npx flutter-mcp
- Some very new packages might not have documentation yet
- Private packages are not supported
- Try using the package name exactly as it appears on pub.dev
Different MCP clients require different transport protocols:
- Claude Desktop: Uses STDIO transport (default)
- No port/URL needed
- Just use:
npx flutter-mcp
- MCP SuperAssistant: Requires HTTP transport
- Start with:
npx flutter-mcp --transport http --port 8000
- Connect to:
http://localhost:8000
- Start with:
- Custom clients: May need SSE transport
- Start with:
npx flutter-mcp --transport sse --port 8080
- SSE endpoint:
http://localhost:8080/sse
- Start with:
If connection fails:
- Verify the correct transport mode for your client
- Check if the port is already in use
- Try binding to all interfaces:
--host 0.0.0.0
- Ensure Node.js and npm are properly installed
📱 Client Configurations
Need help configuring your MCP client? We have detailed guides for:
- Claude Desktop
- MCP SuperAssistant
- Claude Code
- VS Code + Continue
- Custom HTTP/SSE clients
- Docker configurations
→ View all client configuration examples
🤝 Contributing
We love contributions! This is an open-source project and we welcome improvements.
Quick Ways to Contribute
- 🐛 Report bugs - Open an issue
- 💡 Suggest features - Start a discussion
- 📖 Improve docs - Even fixing a typo helps!
- 🧪 Add tests - Help us reach 100% coverage
- 🌐 Add translations - Make Flutter MCP accessible globally
- ⭐ Star the repo - Help others discover Flutter MCP
🚀 What's New & Coming Soon
Recently Released:
- ✅ Simplified Tools: Reduced from 5 tools to just 2 main tools (Context7-style)
- ✅ Smart Detection: Auto-detects Flutter widgets, Dart classes, and pub packages
- ✅ Token Limiting: Default 10,000 tokens with smart truncation
- ✅ Topic Filtering: Focus on specific sections (examples, constructors, etc.)
On our roadmap:
- 📚 Stack Overflow integration for common Flutter questions
- 🎯 Natural language activation: "use flutter docs" pattern
- 🌍 Offline mode for airplane coding
- 🚀 Hosted service option for teams
Want to help build these features? Join us!
❤️ Spread the Word
Help other Flutter developers discover AI superpowers:
Add the badge to your project:
📄 License
MIT © 2024 Flutter MCP Contributors
🏗️ Built With
- Python MCP SDK - The most popular MCP implementation (14k+ stars)
- FastMCP - High-level Python framework for MCP servers
- SQLite - Built-in caching with zero configuration
- npm/npx - Simple one-line installation and execution
- BeautifulSoup - Robust HTML parsing
- httpx - Modern async HTTP client
This server cannot be installed
local-only server
The server can only run on the client's local machine because it depends on local resources.
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.
Related MCP Servers
- AsecurityFlicenseAqualityEnables interaction with the Flutter SDK by providing tools to analyze and apply fixes to Dart and Flutter files.Last updated -23JavaScript
- -securityFlicense-qualityA custom server implementation that allows AI assistants to interact with GitLab repositories, providing capabilities for searching, fetching files, creating/updating content, and managing issues and merge requests.Last updated -JavaScript
- AsecurityAlicenseAqualityA Model Context Protocol server that connects Flutter apps with AI coding assistants like Cursor, Claude, and Cline, enabling AI-powered analysis of widget trees, navigation, and layout issues.Last updated -62132JavaScriptMIT License
- AsecurityAlicenseAqualityAn official AI Model Context Protocol server that enables AI assistants to interact with Dart project management by creating/managing tasks and documents through prompts and tools.Last updated -1575499TypeScriptMIT License