@techwrit-ai/mcp
v0.2.2
Published
MCP server exposing TechWrit AI's 17 documentation modes as tools (review, rewrite, simplify, code-to-docs, and more).
Maintainers
Readme
techwrit-mcp
An MCP server that exposes TechWrit AI's 17
documentation modes as native tools and slash commands, so any MCP client — Claude
Desktop, Cursor, Claude Code, etc. — can review, rewrite, simplify, and generate docs
without leaving the editor. Each mode calls the same v1 API (POST /api/v1/analyze) as
the web app and VS Code extension, using your account's saved style rules, terminology,
and glossary.
Published to npm as
@techwrit-ai/mcp(stdio transport) — install withnpx.
Tools
One tool per mode (techwrit_<mode>):
| Tool | Mode | What it does |
| --- | --- | --- |
| techwrit_review | review | Severity-ranked findings against your style rules (supports format: "suggestions") |
| techwrit_rewrite | rewrite | Rewrite to comply with your rules |
| techwrit_style_check | style-check | Per-rule pass/fail audit + style score (supports suggestions) |
| techwrit_generate | generate | Generate docs from a prompt |
| techwrit_simplify | simplify | Simplify for readability |
| techwrit_keywords | keywords | Search/SEO keywords + metadata |
| techwrit_code_to_docs | code-to-docs | API/dev reference from source code |
| techwrit_user_guide | user-guide | End-user concepts & how-tos from code |
| techwrit_explain | explain | Explain code/docs in plain language |
| techwrit_summarize | summarize | Summarize a document |
| techwrit_expand | expand | Expand notes/outline into full docs |
| techwrit_translate | translate | Translate to another language |
| techwrit_outline | outline | Generate a doc outline/structure |
| techwrit_ux_review | ux-review | Review UI copy/microcopy (supports suggestions) |
| techwrit_ux_rewrite | ux-rewrite | Rewrite UI copy to be concise/actionable |
| techwrit_ux_generate | ux-generate | Generate UI copy from a scenario |
| techwrit_glossary_gen | glossary-gen | Generate a glossary section |
Every tool takes input (required) plus optional docType, audience
(consumer | engineers | developers | devops), and framework. The three
review-family tools also accept format: "suggestions".
Slash commands
The server also exposes one prompt per mode (same techwrit_<mode> name), which
MCP clients surface as slash commands. In Claude Desktop, Cursor, or Claude Code,
type / and pick e.g. techwrit_review — the client prompts for the input (the
document, code, or prompt to process) and runs that mode. Prompts and tools are the
same 17 modes exposed two ways: slash commands for a quick, discoverable trigger; tools
for Claude to call automatically mid-conversation.
Setup
No install step — your MCP client runs it on demand with npx. You only need a
Pro/Team API key (generate it in the app at Settings → API Keys) and pass it
as the TWAI_API_KEY environment variable in your client config (see below).
Config
| Var | Default | Notes |
| --- | --- | --- |
| TWAI_API_KEY | — | Your twai_… key. Required against the deployed API. |
| TWAI_API_BASE | https://techwrit-api.azurewebsites.net/api/v1/analyze | Points at the Function App directly to avoid the ~60s SWA-proxy timeout. Set to http://localhost:7072/api/v1/analyze for a local func (dev bypass needs no key). |
Use it
Claude Desktop / Claude Code
Add to your MCP config (e.g. claude_desktop_config.json):
{
"mcpServers": {
"techwrit": {
"command": "npx",
"args": ["-y", "@techwrit-ai/mcp"],
"env": { "TWAI_API_KEY": "twai_XXXX" }
}
}
}For Claude Code you can also register it from the CLI:
claude mcp add techwrit --env TWAI_API_KEY=twai_XXXX -- npx -y @techwrit-ai/mcpCursor
Add the same mcpServers block to .cursor/mcp.json (project) or your global Cursor
MCP settings.
VS Code
VS Code supports MCP natively via GitHub Copilot agent mode. Run MCP: Add Server
from the Command Palette, or create .vscode/mcp.json — note the top-level key is
servers (not mcpServers), and an inputs prompt keeps your key out of the file:
{
"servers": {
"techwrit": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@techwrit-ai/mcp"],
"env": { "TWAI_API_KEY": "${input:twai-key}" }
}
},
"inputs": [
{ "id": "twai-key", "type": "promptString", "description": "TechWrit AI API key", "password": true }
]
}Use MCP: Open User Configuration for a global setup, then open Copilot Chat in Agent mode. (Using the Claude Code extension in VS Code instead? Follow the Claude Code steps above.)
GitHub Copilot CLI
In the Copilot CLI, run /mcp add and follow the wizard, or edit ~/.copilot/mcp-config.json
directly. The CLI uses the mcpServers key but with type: "local" and a tools array, and
reads your key from an environment variable:
{
"mcpServers": {
"techwrit": {
"type": "local",
"command": "npx",
"args": ["-y", "@techwrit-ai/mcp"],
"tools": ["*"],
"env": { "TWAI_API_KEY": "${TWAI_API_KEY}" }
}
}
}Set TWAI_API_KEY in your shell (export TWAI_API_KEY=twai_XXXX) so the reference resolves;
"tools": ["*"] enables all 17 modes.
Local development
To run from a clone instead of npm:
cd mcp
npm install
TWAI_API_KEY=twai_XXXX node server.mjsYou can also drop a git-ignored config.local.json next to server.mjs
({ "apiKey": "twai_XXXX", "apiBase": "http://localhost:7072/api/v1/analyze" })
to test against a local func with the dev bypass. Point your client at
node /path/to/mcp/server.mjs instead of npx.
Notes
- Output goes back as the tool result; a one-line quota summary is appended when your tier has a monthly limit.
- Auth, tier, and quota are enforced server-side — the tool surfaces clear errors
(
UNAUTHORIZED,API_KEY_REQUIRED,RATE_LIMIT_EXCEEDED). - stdio transport only writes JSON-RPC to stdout; all logs go to stderr.
