list_projectsRead-onlyList every project the calling user can see (owned + member-of + public).
Reference · MCP
The Athina MCP server lets external AI clients (Claude Desktop, Cursor, Codex, Zed) read your projects' design tokens and author components on your behalf. Each call is authenticated with a Personal Access Token and gated by the same row-level security the dashboard uses.
ath_pat_ and is shown only once.Every MCP-compatible client takes a similar JSON. For Claude Desktop on macOS, edit ~/Library/Application Support/Claude/claude_desktop_config.json. For Cursor it's Settings → MCP; for Codex the global ~/.codex/mcp.json. Replace the URL with your deployed host when going to production.
{
"mcpServers": {
"athina": {
"type": "http",
"url": "http://localhost:3000/api/mcp",
"headers": {
"Authorization": "Bearer ath_pat_..."
}
}
}
}Every request to /api/mcp must carry an Authorization: Bearer ath_pat_… header. The server hashes the token (SHA-256), looks up the owning user, then forges a short-lived Supabase JWT so standard RLS gates each tool call: you only see and modify projects you'd see and modify in the dashboard.
Scopes: Read-only tokens can call any tool tagged scope: read; calling a scope: edit tool returns an error before touching the database. Read & write tokens have no extra cap — RLS still blocks edits on projects where you're only a viewer.
Available to any token. Safe to expose to experimental agents.
list_projectsRead-onlyList every project the calling user can see (owned + member-of + public).
get_projectRead-onlyFetch a single project by id.
project_iduuidrequiredlist_design_tokensRead-onlyReturn every design token for a project — fonts, color categories with colors, spacing, icon sizes with icons. All entries include their stable `slug` (e.g. `--color-xp0hw7`) — that's the contract MCP-authored CSS must reference.
project_iduuidrequiredlist_pagesRead-onlyList pages in a project. `kind` filters to component-pages or work-pages; omit to get both.
project_iduuidrequiredkindstringlist_componentsRead-onlyList components in a project. Pass `page_id` to scope to one page. Returns metadata only — call `get_component` for HTML/CSS.
project_iduuidrequiredpage_idstringget_componentRead-onlyFetch a single component including its HTML and CSS source. CSS should reference token slugs (e.g. `var(--color-xp0hw7)`).
component_idstringrequiredlist_work_categoriesRead-onlyList work-page categories for a project.
project_iduuidrequiredlist_project_membersRead-onlyList members of a project (owner + invited collaborators).
project_iduuidrequiredRequire a Read & write token. RLS still gates per-project edit access.
upsert_component_codeRead & writeUpdate a component's HTML and/or CSS. Omit a field to leave it untouched. The preview iframe remounts automatically on save.
component_idstringrequiredhtmlstringcssstringcreate_componentRead & writeCreate a new component on a page. Optional `html`/`css` seed the body; both default to empty. The component is placed at the next available grid slot.
page_idstringrequirednamestringrequiredhtmlstringcssstringrename_componentRead & writeRename a component. Slug never changes.
component_idstringrequirednamestringrequireddelete_componentRead & writeDelete a component permanently. Comments anchored to it are also wiped.
component_idstringrequiredcreate_pageRead & writeCreate a component-page (kind=component, base components) or work-page (kind=work, design works). Pass `category_id` for work-pages to drop them in a specific group.
project_iduuidrequirednamestringrequiredkindstringrequiredcategory_iduuidrename_pageRead & writeRename a page. Slug never changes.
page_idstringrequirednamestringrequireddelete_pageRead & writeDelete a page (and every component on it).
page_idstringrequiredDesign tokens carry stable random slugs like --color-xp0hw7, --font-erjdzy, or --spacing-mi5mow. These slugs never change, even when the token is renamed — the dashboard's preview iframe injects them as CSS variables, so referencing them from component CSS keeps light / dark theme switching working automatically. Always use the slug; never inline a hex value.