home / mcp / flutter mcp server

Flutter MCP Server

Real-time Flutter/Dart documentation and pub.dev package data for AI assistants with on-demand, version-aware results.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "adamsmaka-flutter-mcp": {
      "url": "http://localhost:8000"
    }
  }
}

Flutter MCP is a local, real-time server that supplies up-to-date Flutter and Dart documentation and pub.dev package information to your AI assistants. It helps your AI generate accurate, version-aware code and package usage, dramatically reducing hallucinations and deprecated API issues.

How to use

You run Flutter MCP alongside your AI assistant clients to enable on-demand Flutter/Dart documentation. When your AI asks about a Flutter widget, package, or Dart API, Flutter MCP checks its local cache first and then fetches fresh docs from pub.dev as needed, returning precise, version-aware results that your AI can incorporate directly into code.

With the supported transport options, you can connect to your MCP server from different clients. For Claude Desktop, use the default STDIO transport. For MCP SuperAssistant or other HTTP-based clients, start the server with HTTP transport and connect to the provided URL.

How to install

# One-line usage (no installation required)
npx flutter-mcp

# Or install globally
npm install -g flutter-mcp
flutter-mcp

Configuration and transport options

Flutter MCP supports multiple transport modes. The default is STDIO for Claude Desktop and many MCP clients. You can switch to HTTP transport for MCP SuperAssistant or other HTTP-based clients.

# HTTP transport for MCP SuperAssistant
npx flutter-mcp --transport http --port 8000

# SSE transport for compatible clients
npx flutter-mcp --transport sse --port 8080

# Bind to a different host
npx flutter-mcp --transport http --host 0.0.0.0 --port 3000

Start and run commands you will use

For quick testing, you can start the server in STDIO mode or with HTTP transport. The following commands demonstrate the two common approaches.

# STDIO mode (default for Claude Desktop)
npx flutter-mcp

# HTTP transport (for MCP SuperAssistant)
npx flutter-mcp --transport http --port 8000

Examples of how to use the server with clients

Configure your client to point at the MCP server and let it request documentation by package name, widget, or Dart core identifiers. The server will return the most relevant API details, constructors, examples, and migration notes.

For Claude Code or other code-oriented clients, you can reference the same STDIO or HTTP endpoints depending on how you start the server, ensuring your AI can fetch docs for all packages declared in your Flutter project.

Security and privacy

Everything runs locally on your machine. No data leaves your device, and cached documentation is stored in a local SQLite database for fast access.

Troubleshooting

If the server cannot start or a client cannot connect, verify the correct transport mode is used for your client, and ensure the chosen port is not already in use. If you see missing dependencies on first run, Flutter MCP will install them automatically.

# Check for runtime issues quickly
DEBUG=true npx flutter-mcp

Notes

The server automatically detects Flutter/Dart content and fetches docs on demand. It supports version-specific documentation requests, including exact versions, ranges, and keywords like latest or stable.

Available tools

flutter_search

Universal search across Flutter/Dart docs and pub.dev with intelligent ranking. Returns multiple options for AI to choose from, including classes, libraries, packages, and concepts.

flutter_docs

Smart documentation fetcher that retrieves documentation for any Flutter/Dart identifier with automatic type detection. Supports widgets, libraries, packages, and core language elements.

flutter_status

Health check endpoint to monitor service health and cache statistics.

get_flutter_docs

Legacy tool to fetch Flutter docs; use flutter_docs instead.

get_pub_package_info

Legacy tool to fetch pub.dev package information; use flutter_docs instead.

search_flutter_docs

Legacy search tool; use flutter_search instead.

process_flutter_mentions

Legacy mention processor; still functional for backward compatibility.

health_check

Legacy health check tool; use flutter_status instead.

Flutter MCP Server - adamsmaka/flutter-mcp