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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.