Particles UIDOCSDESIGN DECISION INFRASTRUCTUREStudioCLIMCP
Getting startedStudioTokensToken architectureThemesChanges & governanceBranches & reviewsDesign documentationFigma pluginCLIConnect AI agentsWebhooks & CI/CDSecurityPrivacyTerms
Docs / Agents & MCP / Connect AI agents

Connect AI agents

The Particles Model Context Protocol server exposes 18 read-only tools — design tokens, semantic search, change-impact analysis, WCAG contrast, Figma component graphs, docs & guidelines, releases, scalability score, coverage, and governance status — to AI agents like Claude and Codex. Your agent reasons about real, live tokens instead of pasted hex codes. It never mutates your project: every tool is a read.

i

MCP access requires the organization to be on the Team plan or above. Calls from a lower plan return a clear “upgrade required” error instead of a silent failure.

Create an access token#

Both connection options below authenticate with an access token, created in Studio: Settings → Access Tokens → Create token.

SettingWhat it controls
ScopeOrganization-scoped by default; restrict it to specific projects or leave it set to all.
PermissionRead or read-write. MCP tools are read-only today, so a read token is enough.
SecretStarts with `pat_`, shown once at creation — copy it immediately, it cannot be viewed again.
RevocationRevoke anytime from the same page; a revoked token fails closed on the next call.
i

Treat a pat_… secret like a password: put it in your MCP client’s config or a secret store, never commit it, and revoke it if it leaks.

Option 1 — Remote MCP endpoint (recommended)#

Zero install. Your client speaks Streamable HTTP directly to the hosted endpoint, authenticated with your access token as a bearer header:

terminal
https://api.particles-ui.com/v1/mcp

Claude Code

Add it with the CLI:

terminal
claude mcp add --transport http particles-ui https://api.particles-ui.com/v1/mcp \
  --header "Authorization: Bearer pat_your_token_here"

Or drop this into your project’s .mcp.json:

.mcp.json
{
  "mcpServers": {
    "particles-ui": {
      "type": "http",
      "url": "https://api.particles-ui.com/v1/mcp",
      "headers": {
        "Authorization": "Bearer pat_your_token_here"
      }
    }
  }
}

Codex

Codex configures MCP servers in ~/.codex/config.toml (or a project-scoped .codex/config.toml). A Streamable HTTP server takes a url plus either bearer_token_env_var (reads the token from an environment variable — recommended, keeps the secret out of the file) or a static http_headers entry:

~/.codex/config.toml
[mcp_servers.particles-ui]
url = "https://api.particles-ui.com/v1/mcp"
bearer_token_env_var = "PARTICLES_TOKEN"

Export PARTICLES_TOKEN=pat_your_token_here in the shell Codex runs from. Alternatively, set the header inline (avoid checking this into version control):

~/.codex/config.toml
[mcp_servers.particles-ui]
url = "https://api.particles-ui.com/v1/mcp"
http_headers = { "Authorization" = "Bearer pat_your_token_here" }

Claude.ai & Claude Desktop (connector UI)

Claude’s Add custom connector dialog only has a name and a URL field — there’s no way to set a header. The remote endpoint also accepts the access token as a ?token= query parameter for exactly this reason (the header wins if a client sends both).

  1. In Claude (web or desktop), open Settings → Connectors → Add custom connector.
  2. Name: Particles UI.
  3. Remote MCP server URL: https://api.particles-ui.com/v1/mcp?token=pat_your_token_here.
  4. Leave the OAuth Client ID and Client Secret fields empty — Particles authenticates with access tokens, not OAuth.
  5. Click Add, then enable the connector from the tools menu in a chat.
i

With ?token=, the URL itself is the secret — anyone who has it can call the API as you. Don’t share screenshots or copies of it, and revoke the token from Studio → Settings → Access Tokens if it leaks. Prefer the header form (claude mcp add --transport http … --header) wherever your client supports headers — the query-parameter form is only for connector UIs like this one that don’t give you a choice.

i

Every tool takes a projectId. Agents that don’t already know it should call list_projects first to discover project ids (and list_branches / list_themes for branch- or theme-scoped calls).

Option 2 — Local stdio server (fallback / air-gapped)#

For clients that only support local process-based MCP servers, or for air-gapped environments, run the server locally with npx. It authenticates the same way — with a pat_… access token — or with a device token from particles auth login if you have the Particles CLI installed.

.mcp.json
{
  "mcpServers": {
    "particles-ui": {
      "command": "npx",
      "args": ["-y", "@particlesui/mcp-server"],
      "env": {
        "PARTICLES_TOKEN": "pat_your_token_here",
        "PARTICLES_PROJECT_ID": "<optional default project id>"
      }
    }
  }
}

The equivalent Codex stdio entry:

~/.codex/config.toml
[mcp_servers.particles-ui]
command = "npx"
args = ["-y", "@particlesui/mcp-server"]
env = { "PARTICLES_TOKEN" = "pat_your_token_here", "PARTICLES_PROJECT_ID" = "<optional default project id>" }
VariableRequiredDescription
PARTICLES_TOKENYes (unless `particles auth login` was run)A `pat_…` access token from Studio, or a CLI device token.
PARTICLES_PROJECT_IDOptionalDefault project id used when a tool call omits `projectId`. Otherwise pass `projectId` per call, or let the agent call `list_projects`.
PARTICLES_API_BASEOptionalBackend base URL — set this for a self-hosted Particles backend. Defaults to https://api.particles-ui.com.

See the @particlesui/mcp-server README for GUI-client PATH pitfalls, the particles-mcp setup auto-configure command, and the full tool reference.

What can agents do?#

18 read-only tools, grouped by what they’re for. Full input/output shapes are in the package README.

Tokens & search

ToolWhat it does
get_tokenGet a token by name — resolved value, CSS variable, tier, and which components use it.
find_tokensNatural-language token search (“a calm background for cards”), ranked by relevance.¹
resolve_themeA token’s resolved value within a named theme (e.g. dark mode).

Impact & accessibility

ToolWhat it does
get_impactBlast radius of changing a token — affected tokens, the components that bind it, and a11y risk.
check_contrastWCAG contrast ratio between two tokens (AA / AA-large / AAA).

Figma components

ToolWhat it does
get_component_graphFull token-binding graph for a component — part tree, every property→token binding, gaps, and stale bindings.
get_component_tokensFlat list of the tokens a component binds, with per-property confidence.
list_componentsAll components that bind tokens, with variants, token counts, and average confidence.

Project navigation

ToolWhat it does
list_projectsDiscover your projects (and ids) — call this first if the agent doesn’t know a projectId.
list_branchesA project’s branches (id, name, whether main).
list_themesA project’s named themes (id, name).
list_releasesA project’s published releases (version, channel, branch, notes), optionally filtered by channel.

Docs & knowledge graph

ToolWhat it does
search_docsSearch design documentation pages by keyword or intent — ranked results with page metadata.²
get_guidelinesFetch a component’s (or page’s) usage guidelines as rendered markdown.²
get_neighborhoodExplore the knowledge-graph neighborhood around a token, component, or guideline.³

Scalability & governance

ToolWhat it does
get_scoreA branch’s Scalability Score (0–100) — dedup health, alias coverage, naming health, contrast pass rate.
get_coverageA project’s rolled-up token coverage — Figma bound/unbound rate, code-usage scan totals, orphaned tokens.
get_governance_statusA project’s governance health — flow metrics (lead time, review coverage, gate blocks) and lifecycle hygiene.

¹ find_tokens uses semantic ranking when embeddings are available for your project, and otherwise falls back to text matching — nothing to configure. ² search_docs and get_guidelines require the Team plan or above. ³ get_neighborhood requires the Business plan (knowledge graph explorer feature).

Troubleshooting#

SymptomFix
Authentication failed (401)The token is missing, revoked, or expired, or the header is wrong. Confirm the exact `Authorization: Bearer pat_…` header (remote) or PARTICLES_TOKEN value (stdio); create a fresh access token in Studio if it was revoked.
Connector fails to connect (claude.ai / Claude Desktop)Confirm the Remote MCP server URL includes `?token=pat_…` — this dialog has no header field, so a bare `/v1/mcp` URL with no token always fails. Then check the token hasn’t been revoked or expired, and that the organization is on the Team plan or above.
Plan limit (403)The organization is below the Team plan — MCP access is gated. Upgrade the plan to use any tool.
No project selectedPass `projectId` on the call, set PARTICLES_PROJECT_ID (stdio) or call `list_projects` first to discover one.
find_tokens returns only text matchesSemantic embeddings aren’t available for that project/branch yet; results still work, just lexically.
Tools don’t appear in the clientConfirm the token/header is valid, then fully quit and reopen the client — MCP servers are read once per session, a reload isn’t enough.
← PREVIOUS
CLI
NEXT →
Webhooks & CI/CD