Auto-updating MCP server for Flet documentation and packages
Project description
Flet MCP Server
Model Context Protocol that serves official Flet resources to AI agents.
Flet MCP Server dynamically fetches and serves official Flet documentation, controls, packages, and ecosystem resources for AI agents and MCP-compatible clients.
Features
- GitHub Tree Sync: Maps documentation in real-time from the Flet repository.
- Intelligent Caching: Uses
diskcachefor fast responses with 24-hour TTL. - Smart Search: Fuzzy matching, keyword aliases, and direct path search over documentation.
- Ecosystem Discovery: Finds and verifies official and community Flet packages via PyPI metadata.
- AI-Optimized: Tool definitions designed for LLM understanding with clear usage guidance.
- Configurable: Supports custom Flet repo/branch via environment variables.
- Resource Safe: Shared HTTP client with proper lifecycle management and graceful shutdown.
Tools Included
1. list_flet_controls
List all available Flet UI controls.
2. search_flet_docs(query)
Search the documentation index with fuzzy matching and keyword aliases.
3. get_flet_doc(doc_path)
Get raw Markdown for a specific doc file.
4. list_official_packages()
List official Flet extension packages from the monorepo.
5. search_flet_ecosystem(query)
Search for verified community Flet components on GitHub.
6. get_package_details(package_name)
Fetch version, type classification, and installation info from PyPI.
Client Configuration Examples
๐ VSCode
Add this to your .vscode/mcp.json:
{
"servers": {
"flet-mcp-server": {
"command": "uvx",
"args": ["flet-mcp-server"]
}
}
}
๐ Antigravity / Cascade
Add this to your mcp_config.json:
{
"mcpServers": {
"flet-mcp-server": {
"command": "uvx",
"args": ["flet-mcp-server"]
}
}
}
๐ค Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"flet-mcp-server": {
"command": "uvx",
"args": ["flet-mcp-server"]
}
}
}
๐ป Cursor / Windsurf
In your IDE's MCP settings, add a new server:
- Name: Flet MCP
- Type: Command
- Command:
uvx flet-mcp-server
๐ป OpenCode
Add this to your ~/.opencode/opencode.json or project-level .opencode/opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"flet-mcp": {
"type": "local",
"command": ["uvx", "flet-mcp-server"],
"enabled": true
}
}
}
For authenticated GitHub API access (higher rate limits), set GITHUB_TOKEN in your environment:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"flet-mcp": {
"type": "local",
"command": ["uvx", "flet-mcp-server"],
"enabled": true,
"env": {
"GITHUB_TOKEN": "your-github-token"
}
}
}
}
Environment Variables
| Variable | Default | Description |
|---|---|---|
FLET_MCP_CACHE_DIR |
/tmp/flet-mcp-cache |
Directory for persistent cache storage |
GITHUB_TOKEN |
(none) | GitHub personal access token for higher API rate limits |
FLET_REPO |
flet-dev/flet |
GitHub repository to fetch docs from |
FLET_BRANCH |
main |
Branch or tag to fetch docs from |
Development
Directory Structure
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
โ โโโ __init__.py
โ โโโ exceptions.py
โ โโโ http.py
โ โโโ main.py
โ โโโ server.py
โโโ tests/
โ โโโ test_fetcher.py
โโโ LICENSE
โโโ README.md
โโโ pyproject.toml
โโโ uv.lock
Install
git clone https://github.com/Nwokike/flet-mcp-server.git
cd flet-mcp-server
uv sync
Test
uv run pytest
Lint
uv run ruff check .
Changelog
v0.2.0
- Smart Search: Added fuzzy matching, keyword alias index, and multi-strategy search (direct > alias > fuzzy)
- Shared HTTP Client: Single
httpx.AsyncClientwith proper lifecycle management via server lifespan - Custom Exceptions:
DocNotFoundError,PackageNotFoundError,FetchError,TreeFetchErrorfor better error handling - Configurable Repo/Branch:
FLET_REPOandFLET_BRANCHenvironment variables for version pinning - Robust Control Parsing: Set-based deduplication with safer path parsing
- Concurrent Verification: Batched PyPI verification with semaphore-based rate limiting for ecosystem search
- Graceful Shutdown: Server lifespan handler cleans up HTTP connections
- Better Error Handling: All tools catch and format errors gracefully for LLM consumption
- Mocked Tests: Full test suite with mocked HTTP responses for fast, reliable CI
- OpenCode Support: Added OpenCode MCP configuration example to README
- Expanded Fallback: Added
flet,flet-cli,flet-desktop,flet-webto fallback package list
v0.1.1
- Initial release with 6 MCP tools
- GitHub Tree API integration with diskcache
- PyPI verification for ecosystem packages
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flet_mcp_server-0.2.0.tar.gz.
File metadata
- Download URL: flet_mcp_server-0.2.0.tar.gz
- Upload date:
- Size: 80.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cab9f1d074a5f181815816ba6ddc4504601e0f3d19768de371d8953ecf31c16a
|
|
| MD5 |
8d703ed86ba3f27f746cc082182816b7
|
|
| BLAKE2b-256 |
727c041d3cbcd9ffd257e61735878a44a4816b1e472cbe774e6412f4aa0e58f7
|
Provenance
The following attestation bundles were made for flet_mcp_server-0.2.0.tar.gz:
Publisher:
publish.yml on Nwokike/flet-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flet_mcp_server-0.2.0.tar.gz -
Subject digest:
cab9f1d074a5f181815816ba6ddc4504601e0f3d19768de371d8953ecf31c16a - Sigstore transparency entry: 1586508455
- Sigstore integration time:
-
Permalink:
Nwokike/flet-mcp-server@54735ba3db9b53a01ef8d447e8c009c697c1aa29 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Nwokike
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54735ba3db9b53a01ef8d447e8c009c697c1aa29 -
Trigger Event:
release
-
Statement type:
File details
Details for the file flet_mcp_server-0.2.0-py3-none-any.whl.
File metadata
- Download URL: flet_mcp_server-0.2.0-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f323f585aafa0628d2188e4cbed90f84c7d590a506733bbc5295d406812cc570
|
|
| MD5 |
2b853d8c568037b127bee40884174dc8
|
|
| BLAKE2b-256 |
66cee87a6347cd93f4da3d934069a4778433429e384a8c09bd678edb985f23b4
|
Provenance
The following attestation bundles were made for flet_mcp_server-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Nwokike/flet-mcp-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flet_mcp_server-0.2.0-py3-none-any.whl -
Subject digest:
f323f585aafa0628d2188e4cbed90f84c7d590a506733bbc5295d406812cc570 - Sigstore transparency entry: 1586508466
- Sigstore integration time:
-
Permalink:
Nwokike/flet-mcp-server@54735ba3db9b53a01ef8d447e8c009c697c1aa29 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Nwokike
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54735ba3db9b53a01ef8d447e8c009c697c1aa29 -
Trigger Event:
release
-
Statement type: