flutter-motion-kit
Enables AI coding assistants to search, retrieve, and reuse validated Flutter animations with documented pitfalls, directly integrable into Claude Code or Cursor.
README
Flutter Motion Kit
A collection of previewable Flutter animations, each annotated with its pitfalls (with sources and confidence), and reusable from Claude Code / Cursor in one click (MCP).
🎛 Live interactive playground: motion.markxian.cn · 📚 Verified catalog: motion.markxian.cn/gallery
One-click connect (remote MCP · zero install)
Hosted on a Cloudflare Worker — add one URL and go, content updates take effect instantly:
Claude Code
claude mcp add --transport http flutter-motion https://mcp.markxian.cn/mcp
Cursor / VS Code — import with one button:
Prefer offline/local (npx, no hosting)? See Connect Claude Code (local) below.
One structured source, three outputs:
content/animations/<id>/{meta.yaml, main.dart, bad.dart} ← single source of truth
│ scripts/build-catalog.mjs (schema validation + aggregation)
▼
catalog.json
├──▶ Site (Astro): real running Flutter web previews (self-hosted) + code + pitfalls + [Copy for AI]
└──▶ MCP server: search / get / list_pitfalls, callable directly by AI coding assistants
Why this isn't just another snippet blog
"Best practices" shouldn't rest on someone's word — they should be provable + sourced + machine-verified:
- Every pitfall carries a
source+confidence(official-docs/measured/author-experience…) — an honest signal of how strong the basis is, returned to the AI alongside the code. - CI gate: every
main.dartmust passdart format+flutter analyze(very_good_analysis) +flutter build web; if it doesn't, it isn't included. - Reproducible: every entry self-hosts a real running Flutter web preview (compiled by
npm run previews, not a screen recording);bad.dartdemonstrates the wrong way for side-by-side comparison. - Anti-rot: every entry records
verifiedOn, and CI re-runs monthly to catch deprecations in new Flutter releases.
Quick start
npm install
# 1) Build the catalog (validate schema → catalog.json)
npm run catalog
# 2) Build the self-hosted previews (compile each main.dart into runnable Flutter web)
# Requires a local Flutter (auto-detects fvm; outputs to site/public/preview/, gitignored)
npm run previews
# 3) Run the site locally (embeds the running previews + copy buttons)
npm run site:dev
# 4) Build and connect the MCP server
npm run mcp:build
Connect Claude Code (one-click reuse)
Once published to npm, anyone can connect with zero install:
claude mcp add flutter-motion -- npx -y flutter-motion-mcp
Local dev build:
npm run mcp:build
claude mcp add flutter-motion -- node /abs/path/to/flutter-motion-kit/mcp/dist/index.js
Then, right in Claude Code: "find a Flutter list-entrance animation and add it to my page" — it calls search_flutter_animation → get_animation and lands the verified code + pitfalls.
MCP tools
| Tool | Purpose |
|---|---|
search_flutter_animation |
Search animations by keyword/category (returns summaries) |
get_animation |
Return full code + pitfalls + sources by id |
list_pitfalls |
Pull the pitfall list for an AI to self-check after writing |
list_categories |
Browse categories |
Deploy the remote MCP (Cloudflare Worker)
cd worker
npm i -g wrangler && wrangler login
cp wrangler.toml.example wrangler.toml # real config stays out of the repo (gitignored)
# Create the KV namespace (connection counter) and put the printed id into your local wrangler.toml
wrangler kv namespace create STATS
wrangler kv namespace create STATS --preview
npm run deploy # rebuilds the catalog and bundles + deploys
After deploy: /stats shows the live connection count, /mcp is the MCP endpoint, / shows connect hints.
On the site side: cp site/.env.example site/.env and set PUBLIC_MCP_ORIGIN to your Worker endpoint (this .env is also kept out of the repo).
Private deploy config:
worker/wrangler.toml,site/.env, and.dev.varsare all gitignored — your KV id / account / subdomain never appear in the public repo, which only keeps*.exampleplaceholders. To avoid exposing even the account subdomain, bind a custom domain to the Worker (see the comments inwrangler.toml.example).
Stats: each
initializecounts one connection (an approximate KV counter — good enough for a live badge). For exact de-duplication, upgrade to a Durable Object / Analytics Engine.
Layout
content/animations/ # single source of truth (one directory per animation)
schema/ # JSON Schema for meta.yaml
scripts/ # build-catalog (aggregate) / build-previews (self-hosted previews) / sync-gists (DartPad, optional)
site/ # interactive playground at / + verified gallery at /gallery (Astro)
mcp/ # MCP server (TypeScript)
.github/workflows/ # verify: schema + analyze + format + build
Contributing
Please run through the quality checklist in CONTRIBUTING.md before adding a new animation. Corrections via issue/PR are welcome — being publicly correctable is exactly what makes this more trustworthy than a blog.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。