Phation

Phationは、コーディングエージェントにモーションのルールと、実際のReact + Motionインタラクションのライブラリを提供します。エージェントは感覚をもとにインタラクションを検索し、正確なスプリング値とタイミング値を確認し、Claude Code、Cursor、Codex、Windsurf、VS Code向けのPhation Standardをインストールして、ページのモーションをフレームごとに評価できます。

ドキュメント

The same add-to-cart prompt: generic AI output scores 41/100, the same agent with the Phation skill scores 100/100

Phation

Give your AI taste in motion.
Ready-made interactions and motion rules for your coding agent, so the motion it writes is right the first time, not the fifth.

phation.app · npm · MCP tools · Standard

pnhathuy09/phation MCP server


Ask an agent to "animate the add-to-cart flow" and you usually get hard cuts, linear easing, numbers that swap instead of roll, and nothing for reduced motion. Phation gives the agent two things:

  • The Phation Standard: a short set of motion rules (springs, curves, durations, stagger, accessibility) that the agent loads in every session.
  • A library of real interactions it can search, read and drop into your project: React + Motion components with their exact spring and timing values.

It runs as a free CLI, and with Phation Pro as an MCP server for Claude Code, Cursor, Codex, Windsurf and VS Code. A few components are free and MIT, in components/.

Install

# Free: the CLI
npx phation search "price counter"
npx phation add buy-morph          # a free component, no key needed

# Pro: the MCP server (Claude Code)
claude mcp add phation -e PHATION_KEY=<license-key> -- npx -y phation mcp

# Pro: Cursor · Windsurf · VS Code (MCP config)
{ "command": "npx", "args": ["-y", "phation", "mcp"], "env": { "PHATION_KEY": "<license-key>" } }

Node 18 or newer.

The Phation Standard

Install the rules once per project. Every animation your agent writes then uses the same curves, springs, durations and accessibility handling.

npx phation init claude     # .claude/skills/phation/SKILL.md + a pointer block in CLAUDE.md
npx phation init cursor     # .cursor/rules/phation.mdc
npx phation init codex      # a marked section in AGENTS.md (your own content is kept)
npx phation init windsurf   # .windsurf/rules/phation.md
npx phation init vscode     # .github/instructions/phation.instructions.md
npx phation init all

npx phation standard springs   # print one section

Re-running init updates only Phation's own files and the block between the phation:start / phation:end markers. The rules are in data/standard.

A taste of what is inside: one spring family for the whole product.

SpringStiffness · dampingUse for
snap420 · 32Controls
pop400 · 20Things appearing
soft170 · 22Surfaces
follow420 · 34The pointer
bounce160 · 14Celebrations

MCP tools

The MCP server is part of Phation Pro. Without a key it still starts and lists its tools, and each call answers with how to get a license.

ToolWhat it does
get_standardThe Phation Standard: the core rules, or one section
install_standardWrites the rules into the project for the agent you use
search_motionsFinds interactions by what they should do or feel like ("calm bottom sheet", "make the price feel alive")
list_motionsEvery interaction, optionally for one category
get_motionSpec, MOTION values, dependencies and media of one interaction (about 200 tokens)
add_motionWrites the component into your project
animate_uiAnimates your own screens: maps each part of a .jsx/.tsx file to a motion recipe under one Feel
audit_motionRecords a page frame by frame and scores its motion: layout jumps, low contrast, missing reduced motion

Outputs are kept small on purpose: a typical "add a rolling price to the cart" task costs about 2.8k tokens end to end.

CLI

npx phation list [category]          # browse
npx phation search <words>           # find by intent
npx phation show <slug>              # spec + MOTION values
npx phation init <agent>             # install the Standard
npx phation add <slug>               # write the component into src/motion (free entries: no key)
npx phation add --from "<studio link>"   # Pro: with the values you tuned in the Studio
npx phation audit <url> [--do click:#buy]   # Pro: score the motion of a page
npx phation animate <file|folder>    # Pro: plan motion for your own screens

Free components

These ship with their full source under MIT. Use them, change them, ship them.

ComponentWhat it does
buy-morphBuy button that folds into a spinner, lands a check, then opens back into its label
hold-redeemHold to redeem: the fill grows while pressed and drains if you let go early
scroll-text-revealEach character brightens from grey to white as the paragraph scrolls up
nav-letter-rollNav links whose letters roll up one by one on hover

Each one needs react and motion. Add one with npx phation add <slug>, or copy the file.

Free and Pro

FreePro
The Phation Standard and init for every agentThe MCP server
list, search, show: specs and MOTION valuesadd for every component in the library
The free components, with source (MIT)audit and animate
Explore and tune every interaction live at phation.app

This repository contains the CLI, the MCP server, the Standard and the free components. It ships no Pro component source: with a license, add fetches it from phation.app. Plans are at phation.app/pricing.

npx phation login <license-key>    # saved to ~/.config/phation/license.json
# or, for CI and agent configs: PHATION_KEY=<license-key>
npx phation whoami

License

The code in this repository is MIT, including the free components. The Phation name and logo, the media, and the Pro components are not; see NOTICE.md.

Made by Pham Huy.