Skip to main content
Glama

Flet MCP 서버

PyPI Version PyPI Downloads Python Versions License

공식 Flet 문서와 생태계 패키지를 GitHub 및 PyPI에서 직접 동적으로 가져오고, 캐싱하며, 제공하는 자동 업데이트 MCP(Model Context Protocol) 서버입니다.

주요 기능

  • GitHub 트리 동기화: 문서를 실시간으로 매핑합니다.

  • 지능형 캐싱: 빠른 응답을 위해 diskcache를 사용합니다.

  • 생태계 탐색: 공식 및 커뮤니티 Flet 패키지를 찾아 검증합니다.

  • AI 최적화: LLM이 이해하기 쉽도록 설계된 도구 정의를 제공합니다.

Related MCP server: MPC Docs Server

포함된 도구

1. list_flet_controls

사용 가능한 모든 Flet UI 컨트롤을 나열합니다.

2. search_flet_docs(query)

문서 인덱스를 검색합니다.

3. get_flet_doc(doc_path)

특정 문서의 원본 Markdown을 가져옵니다.

4. list_official_packages()

공식 Flet 확장 패키지를 나열합니다.

5. search_flet_ecosystem(query)

검증된 커뮤니티 Flet 구성 요소를 검색합니다.

6. get_package_details(package_name)

PyPI에서 버전 및 설치 정보를 가져옵니다.

클라이언트 구성 예시

🌌 Antigravity / Cascade

mcp_config.json에 다음을 추가하세요:

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

🤖 Claude Desktop

claude_desktop_config.json에 다음을 추가하세요:

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

💻 Cursor / Windsurf

IDE의 MCP 설정에서 새 서버를 추가하세요:

  • 이름: Flet MCP

  • 유형: Command

  • 명령어: uvx flet-mcp-server

개발

디렉토리 구조

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

설치

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

테스트

uv run pytest

라이선스

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