Skip to content

MCP tools reference

Every Specimo MCP tool and prompt, authentication with OAuth or tokens, and the typical agent loop.

Registry listing: mcp/server.json (official MCP Registry format); launch and directory steps in docs/launch/launch-kit.md.

Endpoint: POST {API_PUBLIC_URL}/mcp (Streamable HTTP, stateless, JSON responses). Auth: Authorization: Bearer adp_…, project-scoped. Two ways to get one:

  • OAuth (recommended). MCP clients that support the MCP authorization spec discover everything from the 401: WWW-Authenticate: … resource_metadata="<API>/.well-known/oauth-protected-resource" → AS metadata at <API>/.well-known/oauth-authorization-server → dynamic registration (POST /oauth/register, public client, https or loopback redirect URIs) → browser to /oauth/authorize (user signs in, picks the project and read / read-write) → POST /oauth/token with PKCE S256. Access tokens last 1 h; refresh tokens 30 days and rotate (reuse revokes the chain). POST /oauth/revoke (RFC 7009). Signed-in apps appear on the Connect page and can be revoked there.
  • Organizations on Business can restrict agents (Org settings → Agent policy): disallow manual tokens or signed-in apps, force read-only, cap manual-token lifetime. Policy applies on every request.
  • Service account token (Org → Service accounts, Pro): for CI and shared agents; explicit project grant, always expires, attributed to the service account and unaffected when people leave.
  • Manual token created in Project → Connect agent (CI, scripts, clients without OAuth). Doesn't expire until revoked.

Tokens may alias other tokens with W3C DTCG syntax: upsert_tokens with value: "{color.violet.500}". Use semantic tokens in screens; save_screen analysis lists primitiveTokens used directly.

Modes: set_token_modes { collections: [{ name: "theme", modes: ["light", "dark"] }] }, then per-token values via upsert_tokens modes: { "theme:dark": "#0b0b10" }.

Business states: mark markup with data-state="default|loading|empty|error|success"; save_screen analysis returns businessStates { present, missing[{state, why}] }.

Implementing in an app: export_tokens { format: "css" | "scss" | "tailwind" | "json" | "swift" | "compose" | "android" } returns ready-to-commit code.

Importing an existing app: run the import_from_codebase prompt in its repository. Pass source (file path) on upsert_tokens / upsert_component; those items wait for human review in Design system → Imported.

Read tools (any token)

ToolPurpose
get_project_contextStart here. Markdown: brand guidelines, all tokens as CSS vars, components and variants, screens with status, assets, authoring rules. Items from subscribed organization libraries are marked (library <name> <version>) and are read-only.
get_design_systemFull JSON: tokens, generated tokens CSS, components with variant HTML/CSS, assets with URLs.
get_componentOne component with all variants, a usage snippet and its usage docs (guidelines, do/don't examples, accessibility notes, related components).
get_componentOne component with all variants, a usage snippet and its approved code mappings per platform (code.web / code.ios / code.android).
get_code_mappingsApproved code mappings, open proposals and per-platform coverage (which components lack a mapping). Optional platform.
list_screensScreens with draft / approved / changes_pending status.
get_screenSource and analysis of a version (latest, approved or a number).
get_approved_screenApproved version ready to implement: source, composed standalone HTML, tokens/components used (each with its code mappings), guidance.
get_accessibility_reportLatest axe-core (WCAG 2.2 AA) audit of a screen version per viewport, with affected elements and fixes.
list_commentsReview comments pinned to elements (anchor path/label/text, version, discussion). Open by default.
list_change_requestsVisual change requests (elements picked in Inspect + notes, component/token context, ready prompt). Filter by status/screen.
get_design_driftDesign-system drift: score (0 = everything from tokens and components), drifting screens with what to fix, unused tokens/components, weekly trend, and a ready fix prompt.
get_visual_qaLatest visual QA runs of a screen version (default approved): mismatch %, regions with the design element under each, fix prompt.
list_localesString catalogs: default (source) locale, coverage per locale, keys screens use.
propose_token_changesPropose token values as a change set that people preview live (?changes=<id>) and apply after review; returns the impact (alias tokens, screens, components).
get_journeysDocumented journeys and flow notes; name returns one journey as markdown (steps, labels, notes, goals, edge cases, analytics events).
list_mock_dataMock data sets: variants with item counts, screens using them, data keys without a set; key returns one set's JSON. Preview with ?data=<variant>.
list_marketsMarket variants: profiles (country, currency, locale), legal copy blocks, the data-legal keys screens use and which each market is missing. Preview with ?market=<key>.
get_stringsOne locale's strings plus the used keys it is missing (with source text and screens); missingOnly for translating.
check_focus_orderKeyboard focus order: every Tab stop in order plus issues — positive tabindex, interactive-looking elements not reachable with Tab, invisible focusables, Tab jumping back up the page, focus traps (found by pressing Tab headlessly).
check_layout_stressRender a screen headlessly with pseudo-locale text (+40 %), RTL and/or a catalog locale; returns truncated/clipped/overflowing elements (with string key and component), horizontal page scroll and physical left/right CSS. Also textScale (100–200 %, like iOS Dynamic Type / Android font scale) and reducedMotion (reports animationsIgnoringReducedMotion).
get_deprecationsDeprecated tokens/components with replacement and sunset, screens (latest/approved) still using each, and a migration prompt.
search_iconsSearch the icon library by name/tag/category; returns names, tags, where used and a <ds-icon> snippet (optional SVG).
get_flowPrototype flow: screens with routes, links between them, start screen, and links to screens that don't exist yet.
list_assetsAssets with asset:<name> refs and URLs.
get_authoring_guideRules for writing screens/components.

Write tools (read/write tokens)

ToolPurpose
upsert_tokens / delete_tokensManage design tokens in bulk.
upsert_component / delete_componentManage components (each update is a new component version).
update_component_docsReplace a component's usage docs: guidelines and accessibility notes (markdown), do/don't examples (variant + label, or an html snippet, with a note), related component keys. No new component version.
propose_code_mappingPropose where a component lives in code on web / ios / android: path, import, props per variant. A person with the approve permission accepts it in Design system → Code; re-proposing replaces your open proposal.
upsert_stringsMerge { key: text } into a locale (null removes; creates the locale; the first one becomes the default). Screens reference keys with data-i18n / data-i18n-attr.
upsert_journeyCreate or replace a named journey: ordered steps { screen, label, note }.
add_flow_noteSticky note on a screen (or the whole flow): kind note / goal / edge_case / analytics / question.
upsert_mock_dataCreate or merge a mock data set { key, variants: { typical, empty, long, many } }; derive: true fills missing variants from typical. Bound with data-repeat / data-empty / data-bind.
upsert_marketCreate or update a market profile by key (country ISO 3166, currency ISO 4217, BCP 47 locale). Legal copy is written by legal reviewers in the app, never by agents.
deprecate_itemDeprecate a token or component (kind, name, optional replacement, sunset YYYY-MM-DD, note) or restore: true. Deleting items approved screens still use is refused (409 in_use_by_approved); only admins can force it in the UI.
upsert_iconsAdd/update up to 200 SVG icons (name, svg, category, tags, keepColors). Sanitized and optimised; colours become currentColor unless kept.
import_storybookConnect a published Storybook (url, public https) and import it in the background — a component per story title, a variant per story (static snapshot, linked back), pending review; sync: true re-syncs changed stories, status: true reports progress.
create_tracker_issueCreate a Jira / Linear / Plane ticket (or one per platform) for a screen's approved version, with design link, tokens, components, states and acceptance criteria. Needs a tracker connected in Project settings.
update_brandbookReplace brand guidelines markdown.
save_screenCreate a screen or add a new version (never overwrites). Optional route (e.g. /pricing) for prototype navigation; resolves: [changeRequestIds] marks requests done. Returns analysis + review URL.
request_reviewAsk people (emails) or teams (names) to review a version; approval follows the project policy.
compare_versionsWhat changed between two versions of a screen (default: latest vs previous): plain-language summary, element changes (added / removed / changed), design-system deltas, optional unified code diffs.
reply_to_commentReply in a comment thread (agents can't resolve threads).
resolve_change_requestMark a change request done (optionally linking a version) or dismissed with a reason.
run_visual_qaCapture a deployed preview (public https URL, optional auth headers sent only to that origin and never stored) and compare it with a screen version's design; returns regions and a fix prompt.
mark_screen_implementedRecord the commit/PR that implemented the approved version.
upload_assetUpload an image/icon/font/video (base64).

Prompts

  • design_screen(brief) — load context, design on the shared system, save, fix warnings.
  • implement_screen(screen) — fetch the approved version, implement it, mark implemented.

Typical loop

  1. get_project_context
  2. upsert_tokens, upsert_component, update_brandbook (first time)
  3. save_screen → user reviews and approves in the web UI
  4. get_approved_screen → implement in the codebase → mark_screen_implemented