@roughen/mcp
v0.2.0
Published
Local MCP server that checks AI writing against human baselines and verifies rewrites. No network, no model calls.
Readme
@roughen/mcp
A local MCP server that lets any AI tool check its own writing against measured human-writing baselines, then verify its rewrite. It runs on your machine over stdio. There are no network calls or model calls, and it never writes a file. Your model does the rewriting; Roughen measures before and after.
Tools
| Tool | What it does |
|---|---|
| roughen_check | Checks a draft and returns a revision brief: which passages to rewrite, how many, why, and what must not change. returnFixed: true also returns the text with safe mechanical fixes applied. |
| roughen_check_file | The same for a local file: Markdown, MDX, HTML, text, or the copy in a .tsx/.jsx/.ts/.js component. It uses the nearest roughen.config. |
| roughen_compare | Compares an original with a revision. It checks that every figure, link, code sample, quotation and heading survived, that nothing was added, that length stayed within 15%, and that the flagged habits dropped. Then it says which version to use. |
| roughen_site | For a Next.js app-router project, returns the copy pass plan: copy and findings per route and per file, copy no route ships, and work groups of files with no overlap. Pass a group id to get that group's revision briefs. Protected strings (H1s, titles, FAQ questions, keywords, quotes) are marked and never offered for rewriting. |
| roughen_verify | Compares every changed file under a path with its version at a git commit (default HEAD). Fails on code changes, files that no longer parse, edited protected strings, lost or invented numbers and links, new banned characters, rewritten copy beyond 15% of its length, and habits that grew. |
The humanize prompt runs the whole loop: check, revise what's flagged, compare, and return the accepted version. The site_pass prompt does the same for one work group of a site: plan, edit, verify. Every tool is read-only; roughen_verify reads old versions through git.
Set up
Until the package is published, point clients at this checkout, after running pnpm install at the repo root. Node 22.13 or newer is required.
Claude Desktop. Add this to ~/Library/Application Support/Claude/claude_desktop_config.json and restart the app:
{
"mcpServers": {
"roughen": {
"command": "node",
"args": ["/Volumes/Uptrade Media/GitHub/Upforge/roughen/packages/mcp/bin/roughen-mcp.mjs"]
}
}
}Cursor. Use the same mcpServers entry in ~/.cursor/mcp.json.
Claude Code. Register the server for all your projects:
claude mcp add --scope user roughen -- node "/Volumes/Uptrade Media/GitHub/Upforge/roughen/packages/mcp/bin/roughen-mcp.mjs"In Claude Code, the Roughen plugin adds a hook that checks files as Claude writes them. The MCP server is for tools without hooks, and for checking copy you're drafting in chat.
What it checks
Everything in @roughen/core. The rules that matter for generated copy are the ones measured against 110 human documents: list saturation, contrast frames, generalizing hedges, reveal frames, em-dash and semicolon density, long sentences, and flat rhythm. Each fires only above what 95% of human documents do. baselines-001 and claude-001 have the numbers and their limits. MIT.
