Skip to main content
Use Ditto with your agents, whether in drafting new copy, reusing existing strings, or integrating with code. The Ditto MCP (Model Context Protocol) server connects AI coding agents to your team’s text in Ditto. Once connected, an agent can fetch your style guide rules before it writes UI copy, search for existing text to reuse instead of inventing new strings, check text against your rules, and create or edit text, projects, variants, and style guides directly from your editor. The server is remote:
It uses Streamable HTTP and OAuth: the first time a client connects, it asks you to log in to Ditto in a browser, and from then on the agent acts as you. There is no token to create and nothing secret to store in your configuration. A static API key is accepted for CI and headless clients that cannot open a browser; see API key for CI and headless clients.

Choose your setup

Either path ends with the same tools available to the agent.

Install the Ditto plugin

The plugin is the agent setup package. It bundles the MCP server configuration, session instructions that make the agent check Ditto before writing copy, and skills such as /ditto-review and /ditto-audit; the full list is on Agent instructions.

Claude Code

Run these in a terminal (an agent can run them too; they change settings rather than starting a session):
Or, inside a Claude Code session, send each command as its own prompt:
Then log in:
  1. Restart any running Claude Code sessions and approve the ditto MCP server when prompted.
  2. Run /mcp, select the Ditto server (listed as ditto, or plugin:ditto:ditto when it comes from the plugin), and choose Authenticate. A browser tab opens for you to log in to Ditto and approve access.
  3. Back in Claude Code, the Ditto tools appear in your tool list.

Claude Desktop

Claude Desktop has a plugin manager instead of a /plugin command.
  1. Click Customize.
  2. Open the Plugins tab, click Add, then Add marketplace.
  3. Paste https://github.com/dittowords/ditto-agent-setup and confirm.
  4. Find Ditto in the marketplace and click Install.
  5. Go to Connectors, find Ditto, and click Connect (or Reconnect). A browser tab opens for you to log in to Ditto and approve access.
Claude Desktop: CustomizeClaude Desktop: Plugins tab, Add, Add marketplaceClaude Desktop: paste the marketplace URLClaude Desktop: install DittoClaude Desktop: Connectors, Ditto, Connect

Cursor

  1. Open Cursor Settings and go to Plugins.
  2. Paste https://github.com/dittowords/ditto-agent-setup into the Search or Paste Link field.
  3. Click Ditto, then Add to Cursor.
  4. Go to Tools & MCPs and log in to the ditto server. A browser tab opens for you to log in to Ditto and approve access. A green status indicator means you are connected.
  5. Start a new Cursor session. Tools from a newly added server only load in sessions started after the install, so a “tools unavailable” message in the current session is expected.
Cursor: Plugins, paste the marketplace linkCursor: Tools & MCPs, log in to ditto

Add the MCP server directly

Use this when you only want the MCP server, or for a client the plugin does not support. Afterwards, add the instruction block from Agent instructions so the agent knows when to use the tools.
Pick a scope:
Project scope creates this .mcp.json, which holds no credentials and is safe to commit:
Then restart Claude Code, run /mcp, select ditto, and choose Authenticate. Each team member logs in with their own Ditto account the first time. Claude Code also asks for approval the first time a project-scoped server is used.

Verify the connection

Ask the agent:
A connected agent calls get_styleguide_rules and returns your rules, or says the workspace has none yet. From a terminal, claude mcp list (Claude Code) or codex mcp list (Codex) shows the server’s status; Needs authentication means the login step has not been completed.

API key for CI and headless clients

Logging in with your Ditto account is the recommended way to connect. An API key is for the cases where no browser login is possible: a CI pipeline, an agent running unattended on a server, machine-to-machine access, or a client whose OAuth is broken (Codex, while its bug is open). With a key, the agent acts as the user who created it rather than as the person running it, and Ditto’s activity history attributes its actions accordingly.
1

Create an API key (a workspace admin does this once)

The steps are in API authentication.
2

Pass it as an Authorization header

The header value is token <your-api-key>. If the same pipeline also runs the CLI, keep the key in the DITTO_TOKEN environment variable, which the CLI and the Ditto Specs CLI read.
For project scope, reference the environment variable so the committed file stays free of secrets:
Equivalent .mcp.json:
Each team member then sets DITTO_TOKEN to their own API key.

Scope results to your codebase

Add a ditto/config.yml (or ditto/config.yaml) file at the repo root listing the Ditto projects this codebase owns:
The MCP tools read it and scope results to those projects; it is the same file the CLI uses for pull (see Scope results to your codebase). Find a project’s developer ID under the project’s Development integration menu in the web app, or ask the agent to call list_projects.

Make it stick

Commit:
  • .mcp.json (Claude Code project scope) or .cursor/mcp.json / .vscode/mcp.json, with no literal keys in them.
  • ditto/config.yml with your project IDs.
  • The instruction block from Agent instructions in CLAUDE.md or AGENTS.md. If you installed the plugin, the same instructions load automatically at session start; committing the block as well means every agent, plugin or not, behaves the same way.
  • DITTO_TOKEN as a secret in CI, only if pipelines run agents or the CLI without a browser.

Optional: Ditto Specs

Ditto Specs are *.ditto.md files that sit next to your design system components and declare their text surfaces, with matching style guide rules synced from Ditto. With the plugin installed, run /ditto-spec-setup; the agent installs the Specs CLI if it is missing, creates dittospec.config.json and workspace.ditto.md, and scaffolds component spec files.

Frequently asked questions

Is this the same as the documentation MCP server? No. https://api.dittowords.com/v2/mcp is the Ditto MCP server described on this page; it connects an agent to your workspace. https://developer.dittowords.com/mcp is this documentation site’s own server for searching the docs. Which tools will the agent use? It depends on the task. Writing UI copy uses get_styleguide_rules, search_ditto_text, and suggest_edit; importing a prototype or a codebase uses create_ditto_project, create_text_items, and the library tools; localization uses the variant and variable tools. Every tool is defined on the Tools page.

Troubleshooting

  • Needs authentication in claude mcp list: run /mcp, select the server, choose Authenticate, and complete the browser login.
  • The tools are not in the tool list: restart the session. Newly added servers only load in sessions started after the change.
  • Unauthorized with an API key (CI only): the header must read Authorization: token <your-api-key>, and the key must come from a workspace with developer integrations enabled.
  • Results include the wrong projects: check ditto/config.yml at the repo root.
Full list of tools and what each does: MCP tools.