/ docs

Connect your agent

Connect Claude Code, Codex or Cursor to Emblema Studio, the MCP server for building workspace templates, from Account → Security.

AI engineerOverviewPlanned

Emblema Studio is the MCP server a coding agent uses to build workspace templates: it forks the closest template, edits its graph, runs its nodes and writes the instruction your server's model follows. You test the result in Emblema. When it is ready, your agent prepares the publish and gives you a link to the draft's publish dialog, filled in: you check it and click Publish. The agent never publishes.

Only template authors see Connect your agent. The operator lists them in the system setting template_authoring.author_user_ids.

Sign in from your agent

When your Emblema server has sign-in from agents turned on, Connect your agent shows this first. You add the server without a token, then sign in from your agent:

  • Claude Code: claude mcp add --scope user --transport http emblema-studio https://<your-server>/api/v2/authoring/mcp, then claude mcp login emblema-studio (or /mcp in Claude Code, then Authenticate).
  • Codex: codex mcp add emblema-studio --url https://<your-server>/api/v2/authoring/mcp, then codex mcp login emblema-studio.
  • Cursor: add the server to ~/.cursor/mcp.json with "auth": { "CLIENT_ID": "emblema-studio" }, then sign in from Cursor's MCP settings.

A page opens on Emblema in your browser. Tick the organizations the agent may use, choose 7 or 30 days, and choose Allow. Approve only a sign-in you just started. When it expires, your agent asks you to sign in again: one click, nothing to copy. A headless or CI shell cannot open a browser, so it uses a token, as below.

Connect with a token

  1. Open Account → Security. Under Connect your agent, choose Connect an agent.
  2. Pick your agent (Claude Code, Codex, Cursor, another MCP client, or a headless or CI shell) and your computer.
  3. Tick the organizations this connection may use. The organization you are in now is always included.
  4. Choose how long the connection lasts: 7 or 30 days.
  5. Choose Create connection. Copy the token: it is shown once.
  6. Run the commands it prints, in order:
    • the first asks for the token and stores it in your keychain (macOS, Linux) or in a user environment variable (Windows);
    • the next ones let your agent read it, add the emblema-studio server and install the Studio skill.
  7. Start your agent and ask it to connect to Emblema Studio. The panel shows Connected from … when the agent's first call arrives.

No command contains the token, so it never ends up in your shell history or in a config file.

Organizations

Your agent works in one organization at a time, and every answer names it. Ask the agent to list the organizations this connection may use, or to switch to another one. A token made with the Security page's token form works only in the organization it was created in.

Renew

A connection lasts 7 or 30 days, and your agent tells you in its last three days. Under Your connections, choose Renew and run the store command it prints. Your agent's configuration does not change. Then choose Revoke the previous token, or let it expire.

Before you start

  • If an older configuration calls the server emblema-authoring, keep it or replace it with emblema-studio, never both.
  • Cursor reads the token from the EMBLEMA_STUDIO_TOKEN variable. On macOS the printed step also sets it for Cursor started from the Dock. Use a current Cursor version: older ones ignore the header.