Skip to main content
Glama

Flutter MCP

by adamsmaka
MIT License
17

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 flutter-mcp start to getting real-time Flutter documentation in 20 seconds.

The Problem: Your AI is Stuck in 2021

😡 Without Flutter MCP

// User: "How do I use Riverpod to watch a future?" // AI generates (outdated): final userProvider = FutureProvider((ref) async { return fetchUser(); }); // WRONG! Missing autoDispose, family, etc.

Result: Deprecation warnings, confused debugging, time wasted on Google

✅ With Flutter MCP

// User: "How do I use @flutter_mcp riverpod to watch a future?" // AI generates (current v2.5.1): final userProvider = FutureProvider.autoDispose .family<User, String>((ref, userId) async { return ref.watch(apiProvider).fetchUser(userId); }); // Correct, modern, actually works!

Result: Code works immediately, you ship faster

🚀 Quick Start

Installation

Install directly from GitHub:

# Install from GitHub pip install git+https://github.com/adamsmaka/flutter-mcp.git # Run the server flutter-mcp start

That's it! No Redis, no configuration, no complexity. The server is now running with built-in caching.

📢 For MCP SuperAssistant Users: Use flutter-mcp start --transport http --port 8000 to enable HTTP transport!

Alternative Options

# Clone the repository git clone https://github.com/adamsmaka/flutter-mcp.git cd flutter-mcp # Create virtual environment python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install in development mode pip install -e . # Run the server flutter-mcp start

Docker images will be available once the project is published to Docker Hub/ghcr.io.

NPM package will be available once published to npm registry.

# Download for your platform curl -L https://github.com/adamsmaka/flutter-mcp/releases/latest/flutter-mcp-macos -o flutter-mcp chmod +x flutter-mcp ./flutter-mcp

No Python, no pip, just download and run!

Requirements

  • Python 3.10+ (for pip install)
  • 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:

{ "mcpServers": { "flutter-mcp": { "command": "flutter-mcp", "args": ["start"], "env": {} } } }

Or install from source:

{ "mcpServers": { "flutter-mcp": { "command": "/path/to/flutter-mcp/venv/bin/flutter-mcp", "args": ["start"], "env": {} } } }

Replace /path/to/flutter-mcp with your actual installation path.

Restart Claude Desktop after saving.

Option 1: Install from GitHub

Claude Code automatically manages MCP servers. Install the package:

pip install git+https://github.com/adamsmaka/flutter-mcp.git

To enable Flutter MCP specifically for your Flutter project:

  1. First, install Flutter MCP:
# Clone and install locally git clone https://github.com/adamsmaka/flutter-mcp.git cd flutter-mcp python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e .
  1. Create a .mcp.json file in your Flutter project root with the full path to flutter-mcp:
{ "mcpServers": { "flutter-mcp": { "command": "/path/to/flutter-mcp/venv/bin/flutter-mcp", "args": ["start"] } } }

Replace /path/to/flutter-mcp with the actual path where you cloned the repository.

Alternative: If you installed via pip globally:

{ "mcpServers": { "flutter-mcp": { "command": "python3", "args": ["-m", "flutter_mcp", "start"] } } }
  1. Run Claude Code in your project directory:
cd your-flutter-project claude

Important: Don't use the --dangerously-skip-permissions flag when running Claude Code, as it prevents MCP servers from being loaded.

With this setup, Flutter MCP will automatically provide documentation for all packages in your pubspec.yaml whenever you use Claude Code in this project.

In Settings → MCP Servers, add:

{ "flutter-mcp": { "command": "flutter-mcp", "args": ["start"] } }

MCP SuperAssistant requires HTTP transport. Configure it with:

  1. Start the server with HTTP transport:
flutter-mcp start --transport http --port 8000
  1. In MCP SuperAssistant, add a new server:
    • Name: Flutter MCP
    • URL: http://localhost:8000
    • Type: HTTP MCP Server
  2. The server will now be available in your MCP SuperAssistant client.

In your .continuerc.json:

{ "models": [ { "provider": "claude", "mcp_servers": { "flutter-mcp": { "command": "flutter-mcp", "args": ["start"] } } } ] }

3. Start the Server (Optional for Claude Desktop)

# Run in foreground (see logs) flutter-mcp start # Run in background flutter-mcp start --daemon # Check status flutter-mcp status # Run with HTTP transport (for MCP SuperAssistant) flutter-mcp start --transport http --port 8000 # Run with SSE transport flutter-mcp start --transport sse --port 8080 # Custom host binding flutter-mcp start --transport http --host 0.0.0.0 --port 3000

Transport Options:

  • --transport stdio (default) - 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!

Mention any Flutter/Dart package in your prompts, and Flutter MCP will automatically provide real-time documentation:

"How do I implement infinite scroll with infinite_scroll_pagination?" "Show me dio interceptors for auth tokens" "What's the difference between bloc and riverpod?"

💡 Pro tip: For explicit package documentation, use @flutter_mcp package_name:

"Explain @flutter_mcp freezed code generation" "Show me all @flutter_mcp get_it service locator patterns"

📚 Available Tools

Flutter MCP provides 5 powerful tools for AI assistants:

1. get_flutter_docs

Fetches official Flutter/Dart API documentation.

{ "tool": "get_flutter_docs", "arguments": { "class_name": "Container", "library": "widgets" } }

2. get_pub_package_info

Gets complete package information including README from pub.dev.

{ "tool": "get_pub_package_info", "arguments": { "package_name": "provider" } }

3. search_flutter_docs

Intelligently searches across Flutter/Dart documentation.

{ "tool": "search_flutter_docs", "arguments": { "query": "material.AppBar" } }

4. process_flutter_mentions

Processes @flutter_mcp mentions in text for context injection.

{ "tool": "process_flutter_mentions", "arguments": { "text": "I need help with @flutter_mcp riverpod state management" } }

5. health_check

Monitors the health of all scrapers and services.

{ "tool": "health_check", "arguments": {} }

🎯 Features

  • 📦 Real-Time Documentation: Fetches the latest docs for any pub.dev package on-demand
  • 🚀 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

💡 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

  1. MCP Integration: Your AI assistant automatically detects when you're asking about Flutter/Dart packages
  2. Smart Detection: No special syntax required - just mention package names naturally
  3. Lightning Cache: First request fetches from pub.dev (1-2 seconds), subsequent requests are instant
  4. Context Injection: Documentation is seamlessly added to your AI's knowledge before it responds
  5. 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

Speed up your workflow by pre-caching frequently used packages:

flutter-mcp cache add provider riverpod bloc dio freezed
# Check server status flutter-mcp status # View server logs flutter-mcp logs # Stop the server flutter-mcp stop # Run with debug logging DEBUG=true flutter-mcp start
# List cached packages flutter-mcp cache list # Clear specific package cache flutter-mcp cache remove dio # Clear all cache flutter-mcp cache clear # Export cache stats flutter-mcp cache stats

For production or team use:

# Run the server docker run -d -p 8000:8000 --name flutter-mcp ghcr.io/flutter-mcp/flutter-mcp:latest # Check logs docker logs -f flutter-mcp

🛠️ Troubleshooting

This error means the system cannot find the flutter-mcp command. Solutions:

  1. Use full path in .mcp.json:
{ "mcpServers": { "flutter-mcp": { "command": "/path/to/flutter-docs-mcp/venv/bin/flutter-mcp", "args": ["start"] } } }
  1. Use Python module directly:
{ "mcpServers": { "flutter-mcp": { "command": "python3", "args": ["-m", "flutter_mcp", "start"] } } }
  1. Install from GitHub:
pip install git+https://github.com/adamsmaka/flutter-mcp.git # Then use the original config
  1. Check if Python 3.10+ is installed: python3 --version
  2. Verify installation: python3 -m flutter_mcp --version
  3. Check logs in Claude Code for specific errors
  4. Try running manually: flutter-mcp serve to see error messages
  • 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:

  1. Claude Desktop: Uses STDIO transport (default)
    • No port/URL needed
    • Configured via claude_desktop_config.json
  2. MCP SuperAssistant: Requires HTTP transport
    • Start with: flutter-mcp start --transport http --port 8000
    • Connect to: http://localhost:8000
  3. Custom clients: May need SSE transport
    • Start with: flutter-mcp start --transport sse --port 8080
    • SSE endpoint: http://localhost:8080/sse

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

📱 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.

→ Read our Contributing Guide

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

🚀 Coming Soon

We're continuously improving Flutter MCP! On our roadmap:

  • 📚 Stack Overflow integration for common Flutter questions
  • 🏷️ Version-specific documentation (e.g., @flutter_mcp riverpod:2.0.0)
  • 🎯 IDE extensions for even deeper integration
  • 🌍 Offline mode for airplane coding

Want to help build these features? Join us!

❤️ Spread the Word

Help other Flutter developers discover AI superpowers:

Add the badge to your project:

[![Flutter MCP](https://img.shields.io/badge/Enhanced%20by-Flutter%20MCP-blue)](https://github.com/adamsmaka/flutter-mcp)

📄 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
  • Installation - Currently available via GitHub (PyPI/npm packages coming soon)
  • BeautifulSoup - Robust HTML parsing
  • httpx - Modern async HTTP client

Related MCP Servers

  • -
    security
    A
    license
    -
    quality
    Serves as a guardian of development knowledge, providing AI assistants with curated access to latest documentation and best practices.
    Last updated -
    4
    87
    52
    TypeScript
    MIT License
  • 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
    3
    JavaScript
  • -
    security
    F
    license
    -
    quality
    A 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
  • A
    security
    A
    license
    A
    quality
    A 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 -
    62
    103
    JavaScript
    MIT License
    • Linux
    • 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/adamsmaka/flutter-mcp'

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