flutter-docs-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FLUTTER_DOCS_MCP_CACHE_DIR | No | Directory where the cache and search index are stored. Everything lives in one directory: ~/.cache/flutter-docs-mcp by default, overridable with FLUTTER_DOCS_MCP_CACHE_DIR. | ~/.cache/flutter-docs-mcp |
| FLUTTER_DOCS_MCP_POLITENESS_DISABLED | No | Set to 1 to disable the politeness layer. This single switch turns off robots.txt, the throttle, retries and conditional GET at once. Use it at your own risk: you take over responsibility for respecting each site's crawling rules, and you are far more likely to be rate-limited or blocked. There is no partial opt-out. | 0 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| health_checkA | Check that the server is up and report its version. |
| flutter_docsA | Fetch one Flutter / Dart SDK / pub.dev documentation page as clean markdown. Identifier forms (resolved in this order):
Args: identifier: one of the forms above. topic: optional section filter (e.g. "methods", "properties", "examples", "constructors") — keeps only the matching section plus the class title/description; if no section matches, the full content is returned with a "note" listing the available section headings. max_tokens: rough token budget for the returned markdown (1 token ≈ 4 chars); longer output is cut at a line boundary with a trailing note. Returns {"type", "identifier", "url", "title", "content", "truncated", "tokens", "source_tokens", "max_tokens", "cached"} — plus "truncation" (what was cut and why) whenever "truncated" is true, and an optional "note" — or {"error", "suggestion"} on failure. |
| flutter_searchA | Search Flutter and Dart SDK class names (plus enums/mixins/typedefs). Ranks the local search index by name similarity (exact > prefix > substring
Args: query: text to match against class names, e.g. "text field" or "ListView". limit: maximum number of results (default 8). Returns {"query", "count", "results": [{name, library, kind, url, score}], "index_stale"} or {"error", "suggestion"} when the index is unavailable. |
| pub_packageA | Fetch pub.dev package metadata plus its README as markdown. Args: package_name: exact pub.dev package name (case-sensitive), e.g. "dio". version: optional specific version, e.g. "5.4.0" (default: latest). max_tokens: rough token budget for the returned README (1 token ≈ 4 chars); longer output is cut at a line boundary with a trailing note. Returns {"name", "version", "description", "publisher", "likes", "pub_points",
"url", "readme", "truncated", "tokens", "source_tokens", "max_tokens",
"cached"} or {"error", "suggestion"} on failure. |
| flutter_mentionsA | Parse every @flutter_mcp mention in a text and resolve each one to its docs. Mention grammar (identifier forms are the same flutter_docs accepts):
A version constraint is answered from pub.dev's own list of published releases: an exact pin is returned when published, a range resolves to the newest release that satisfies it (pre-releases are excluded unless the constraint asks for one), and the constraint that was requested is always reported next to the version that was resolved. A version that does not exist is reported as missing with the nearest published releases — never replaced by a different version. Args: text: any text containing zero or more @flutter_mcp mentions. max_tokens: rough token budget for each mention's documentation payload (1 token ≈ 4 chars). Non-positive disables truncation. Returns {"mentions": n, "max_tokens": ..., "results": [...]} with exactly one entry per mention, in document order. Each entry carries "mention" (as written), "type" (flutter_class | dart_class | pub_package | not_found | error), the resolved "identifier" and "version", and the docs payload ("content", "truncated", "tokens", "source_tokens", "max_tokens", plus "truncation" when something was cut). Failures are per-mention {"type": "not_found" | "error", "error", "suggestion"} — one bad mention never removes or duplicates another mention's entry. |
| flutter_statusA | Health check: search index state, cache stats, and live API probes. The Probes api.flutter.dev and pub.dev with a light GET (10s timeout) and reports per-check status plus an overall verdict ("ok" / "degraded" / "error"). Never raises — individual failures only mark that check as error. Also returns a top-level "politeness" block with the politeness layer's counters: robots cache rows/fetches/hits, requests blocked by robots.txt, throttle waits and per-host delays, conditional GETs / 304 revalidations, 429 and transport retries, request budgets and whether the layer is disabled (FLUTTER_DOCS_MCP_POLITENESS_DISABLED). It is diagnostics only and never affects "overall". |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Two real overlaps exist: health_check and flutter_status are both described as health checks (up/version vs. index/cache/API probes), and flutter_docs accepts a 'pub:' form that fetches package description+README, duplicating pub_package's core output. Descriptions do clarify the differences (metadata vs. README, version vs. diagnostics), so it's workable but an agent could reasonably pick the wrong one.
All names are consistently snake_case with no verbs, but the prefixes vary by family (flutter_*, pub_*, plain health_check), which is defensible but not a single predictable pattern. Still readable and mostly uniform.
Six tools is well within a healthy scope for a docs server, and each maps to a distinct capability: discovery (flutter_search), fetch (flutter_docs, pub_package), batch resolution (flutter_mentions), and diagnostics (health_check, flutter_status).
The search-then-fetch workflow, package metadata, and batch mention resolution cover the core docs-retrieval lifecycle well. Minor gaps: no tool to rebuild/refresh the search index or clear the cache despite exposing index_stale and cache state.