Skip to main content
Glama

Servidor MCP de Flet

Versión de PyPI Descargas de PyPI Versiones de Python Licencia

Un servidor del Protocolo de Contexto de Modelo (MCP) con actualización automática que obtiene, almacena en caché y sirve dinámicamente la documentación oficial de Flet y los paquetes del ecosistema directamente desde GitHub y PyPI.

Características

  • Sincronización de árbol de GitHub: Mapea la documentación en tiempo real.

  • Caché inteligente: Utiliza diskcache para respuestas rápidas.

  • Descubrimiento del ecosistema: Encuentra y verifica paquetes oficiales y comunitarios de Flet.

  • Optimizado para IA: Definiciones de herramientas diseñadas para la comprensión de LLM.

Related MCP server: MPC Docs Server

Herramientas incluidas

1. list_flet_controls

Enumera todos los controles de interfaz de usuario de Flet disponibles.

2. search_flet_docs(query)

Busca en el índice de documentación.

3. get_flet_doc(doc_path)

Obtiene el Markdown sin procesar para un documento específico.

4. list_official_packages()

Enumera los paquetes de extensión oficiales de Flet.

5. search_flet_ecosystem(query)

Busca componentes comunitarios verificados de Flet.

6. get_package_details(package_name)

Obtiene información de versión e instalación desde PyPI.

Ejemplos de configuración del cliente

🌌 Antigravity / Cascade

Añade esto a tu mcp_config.json:

{
  "mcpServers": {
    "flet-mcp-server": {
      "command": "uvx",
      "args": ["flet-mcp-server"]
    }
  }
}

🤖 Claude Desktop

Añade esto a tu claude_desktop_config.json:

{
  "mcpServers": {
    "flet-mcp-server": {
      "command": "uvx",
      "args": ["flet-mcp-server"]
    }
  }
}

💻 Cursor / Windsurf

En la configuración MCP de tu IDE, añade un nuevo servidor:

  • Nombre: Flet MCP

  • Tipo: Comando

  • Comando: uvx flet-mcp-server

Desarrollo

Estructura de directorios

flet-mcp-server/
├── .github/
│   └── workflows/
│       ├── ci.yml
│       └── publish.yml
├── docs/
│   ├── ARCHITECTURE.md
│   └── CONTRIBUTING.md
├── src/
│   └── flet_mcp/
│       ├── services/
│       │   ├── github_docs.py
│       │   ├── packages.py
│       │   └── __init__.py
│       ├── main.py
│       ├── server.py
│       └── __init__.py
├── tests/
│   └── test_fetcher.py
├── LICENSE
├── README.md
├── pyproject.toml
└── uv.lock

Instalación

git clone https://github.com/Nwokike/flet-mcp-server.git
cd flet-mcp-server
uv sync

Prueba

uv run pytest

Licencia

MIT

Available Tools

16 tools
get_flet_docA
Read-only

Fetch the Markdown documentation for a specific Flet control or topic, paged to keep responses small. Long pages are cut off with a hint for the next offset — page through instead of dumping huge docs into the conversation.

Args: doc_path: The exact path of the doc file, usually obtained from search_flet_docs (e.g., 'website/docs/controls/dropdown/index.md'). offset: Line to start from (default 0; the response tells you the next offset). max_lines: Maximum lines to return per call (default 400).

Inputs: doc_path (required), offset, max_lines. Returns: result

get_flet_exampleA
Read-only

Fetch the full source of an official Flet example app (from search_flet_examples): pyproject.toml plus its Python files, bundled with a character budget so huge examples page gracefully.

Args: example_id: Example id from search_flet_examples (e.g., 'counter' or '7guis/flight_booker'). max_chars: Total character budget for the returned source (default 24000).

Inputs: example_id (required), max_chars. Returns: result

get_flet_versionA
Read-only

Report which flet version the source tools read, and from where. Call this first when a Flet API question matters — Flet changes faster than model training data, so the installed source is the only truth.

Inputs: no named parameters. Returns: error, source, flet_version, package_path

get_package_detailsA
Read-only

Fetch PyPI details, current version, and installation instructions for a specific Flet package.

Args: package_name: The exact name of the package on PyPI (e.g., 'flet-audio').

Inputs: package_name (required). Returns: result

inspect_flet_controlA
Read-only

Get the exact, current API of any Flet control straight from the installed source: every property with its type and default (inherited ones marked), events (on_*), deprecation warnings, the class hierarchy, and the full class source with per-property docstrings. ALWAYS use this before writing Flet UI code — control APIs in training data are often outdated.

Args: control_name: Public flet class name, e.g. 'Button', 'TextField', 'CupertinoSwitch', 'Page', 'View'.

Inputs: control_name (required). Returns: result

list_flet_apiA
Read-only

List every public name in the installed flet (the true flet.all), grouped by category: Material/Cupertino/Core controls, Services, Components & hooks, types. Use this to discover what exists in the CURRENT version before guessing control or API names.

Inputs: no named parameters. Returns: object

list_flet_controlsA
Read-only

Get a list of all Flet UI controls that have a documentation page. For the complete programmatic API surface of the installed version (including undocumented controls, services and hooks), use list_flet_api.

Inputs: no named parameters. Returns: result

list_official_packagesA
Read-only

Get a list of all official Flet extension packages (e.g. flet-audio, flet-video). Use this to see what official extra capabilities Flet supports outside the core library.

Inputs: no named parameters. Returns: result

read_flet_sourceA
Read-only

Read the actual installed source of a flet module (numbered lines). This is the ground truth when docs and training data disagree.

Args: module: Dotted module or path relative to the flet package, e.g. 'controls/material/button.py', 'flet.controls.page', 'controls/types'. symbol: Optional class or function to extract instead of the whole file (e.g. 'Button', 'Page', 'Button.style' or 'app'). max_lines: Line cap when reading a whole file (default 400).

Inputs: module (required), symbol, max_lines. Returns: result

search_flet_colorsA
Read-only

Search valid flet color constants (ft.Colors., incl. shades like AMBER_500, and ft.CupertinoColors.). Use this instead of guessing color names.

Args: query: Color name fragment, e.g. 'amber', 'teal', 'primary', 'error'. max_results: Maximum names to return (default 50).

Inputs: query (required), max_results. Returns: result

search_flet_docsA
Read-only

Search the official Flet documentation index for a specific topic or control. Always use this first to find the correct file path before calling get_flet_doc. Docs explain intent and cookbook patterns; use the source tools for exact APIs.

Args: query: The keyword to search for (e.g., 'dropdown', 'navigation', 'layout').

Inputs: query (required). Returns: result

search_flet_ecosystemA
Read-only

Search the open-source community for third-party Flet packages and components. Use this when the user wants to add a feature (e.g., 'calendar', 'table', 'auth') that might not be in the core Flet library.

Args: query: The keyword to search for (e.g., 'calendar').

Inputs: query (required). Returns: result

search_flet_examplesA
Read-only

Search the official Flet example apps in the flet repo (counter, todo, 7guis, routing, games, declarative components, …) by keyword. Each result is a runnable project; fetch its full source with get_flet_example. Reading a real example is the fastest way to learn correct Flet idioms for a pattern.

Args: query: Keywords describing the app or pattern (e.g., 'counter', 'todo', 'routing', 'drag', 'animation', 'form validation'). max_results: Maximum results (default 5).

Inputs: query (required), max_results. Returns: result

search_flet_iconsA
Read-only

Search valid flet icon names for ft.Icons.* / ft.CupertinoIcons.*. NEVER invent icon names — models consistently hallucinate them. This reads the icon database of the installed flet version.

Args: query: Icon name fragment, e.g. 'home', 'arrow_back', 'delete_outline'. icon_set: 'material' (ft.Icons, default) or 'cupertino' (ft.CupertinoIcons). max_results: Maximum names to return (default 50).

Inputs: query (required), icon_set, max_results. Returns: result

search_flet_sourceA
Read-only

Search the installed flet source code (every .py file in the flet package). Class and function definitions rank first, then assignments, then comments. Use this to find where anything is defined, which modules exist, or how a feature is actually implemented in the CURRENT version.

Args: query: Case-insensitive substring, e.g. 'Snackbar', 'on_route_change', 'adaptive', 'cupertino_switch'. max_results: Maximum matches to return (default 25).

Inputs: query (required), max_results. Returns: result

verify_flet_codeA
Read-only

Verify Flet code against the INSTALLED flet — ALWAYS call this before delivering Flet code to the user. Two passes: (1) static analysis for unknown controls, invalid constructor properties, enum typos, deprecated usage and undefined event handlers, each with line numbers and hints; (2) sandboxed execution that constructs the controls (app launchers are neutralized, nothing opens) and fires flet's own validators, catching errors that only appear at runtime (e.g. Slider(min > max)). Fix every diagnostic and re-verify until status == 'passed'.

Args: code: Complete, runnable Flet app code (a main(page) function plus ft.run(main) is ideal — main is invoked against a mock page). timeout_secs: Execution timeout for the sandbox (default 15, max 60).

Inputs: code (required), timeout_secs. Returns: checks, status, diagnostics, duration_ms, +2 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 16 tools

    Disambiguation5/5

    Every tool targets a distinct information source or action: verification, version, control API, installed source, docs, examples, icons, colors, packages, and ecosystem search. The search_* family is differentiated by explicit suffixes (source/docs/examples/ecosystem/icons/colors), and the two list tools explicitly state their different scopes.

    Naming Consistency4/5

    Tool names consistently follow a snake_case verb_noun pattern such as verify_flet_code, search_flet_docs, get_flet_doc, and list_flet_api. Minor deviations: list_official_packages and get_package_details omit the 'flet' prefix, and get_flet_doc/get_flet_example are singular while their search counterparts are plural.

    Tool Count4/5

    16 tools is slightly above the ideal 3-15 range, but the count is justified by the server's broad scope: code validation, API introspection, source reading, docs, examples, icons, colors, and package discovery. No tool feels redundant; each covers a distinct Flet knowledge need.

    Completeness5/5

    The surface covers the full workflow of writing correct Flet code: discovering controls and APIs, inspecting exact control signatures, verifying code against the installed version, looking up docs and examples, resolving icons and colors, and finding official or third-party packages. Discovery tools feed cleanly into fetch/read tools with no obvious dead ends.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers