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.

October 19, 2026
MCP ServerDevelopment Tools & DevOpsFlutter MCP Server
GitHub starsnpm versionnpm downloads

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

ToolPurposeCategory
flutter_searchSearch Flutter/Dart docs and pub.dev packagesDiscovery
flutter_docsFetch documentation for a widget, class, or packageDocumentation
flutter_statusCheck server health and cache statisticsDiagnostics

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 http for HTTP-based clients
  • --transport sse for Server-Sent Events clients
  • --port defaults to 8000
  • --host defaults to 127.0.0.1

Sources