@dittowords/mcp-server
v0.1.7
Published
Ditto MCP server
Maintainers
Keywords
Readme
Ditto MCP Server
A Model Context Protocol server that gives AI coding agents access to your team's Ditto styleguide rules so they can write on-brand text.
Quick start
Configure the MCP server
Add the following to your project's .mcp.json (or global ~/.claude.json):
{
"mcpServers": {
"ditto": {
"command": "npx",
"args": ["@dittowords/mcp-server"],
"env": {
"DITTO_API_TOKEN": "<your-token-here>"
}
}
}
}Or via the Claude Code CLI:
claude mcp add ditto -e DITTO_API_TOKEN=your-api-token -- npx @dittowords/mcp-serverStart using it
Once configured, AI coding agents (like Claude Code) can call the
get_styleguide_rules tool to fetch your workspace's styleguide rules. These
rules are then applied whenever the agent writes or edits user-facing text.
How it works
- The agent checks for a
ditto/config.yamlfile in the project root to pick up any project IDs configured for the workspace. - It calls
get_styleguide_rules(passing project IDs if present) to retrieve the active styleguide rules. - The returned rules — such as preferred terminology and writing conventions — are applied to all text the agent produces.
Project configuration
To enable project-specific styleguide rules, create a ditto/config.yaml file
in your project root:
projects:
- id: "your-project-id"Replace the placeholder ID with your actual Ditto project's developer ID.
Environment variables
| Variable | Required | Default | Description |
| -------------------- | -------- | ---------------------------- | ------------------------------------------------------ |
| DITTO_API_TOKEN | Yes | — | API token for authenticating with Ditto |
| DITTO_API_BASE_URL | No | https://api.dittowords.com | Override the API base URL (e.g. for local development) |
Development
Setup
cd mcp
yarn install
yarn buildDev mode
Use yarn dev to run the server directly from TypeScript (via tsx) without a
build step:
DITTO_API_TOKEN=your-api-token yarn devTesting with MCP Inspector
DITTO_API_TOKEN=your-api-token npx @modelcontextprotocol/inspector node dist/index.jsThis opens a browser UI where you can list tools and call them interactively.
