Humanize AI text inside OpenCode
OpenCode supports remote MCP servers. Point it at SupWriter and humanize, paraphrase, grammar-check, or detect AI text from your terminal-based agent — no copy-paste.
https://supwriter.com/api/mcpDirect API key · uses your plan creditsHow to connect
OpenCode connects with a Direct API key. Calls use your existing plan credits.
Connect with a Direct API key
For clients that take an Authorization header (and headless agents). Requires a Pro or Ultra plan.
- 1
Create an API key
In SupWriter, open Settings → API & MCP and create a key (Pro or Ultra plan).
- 2
Add the server
In opencode.json, add "supwriter" under the "mcp" block with "type": "remote", "url": "https://supwriter.com/api/mcp", "enabled": true, and a "headers" object setting "Authorization": "Bearer {env:SUPWRITER_TOKEN}" (so the token stays out of the file).
- 3
Reload
Restart OpenCode to load the server.
- 4
Use it
Ask the agent: "Humanize the draft README."
# Cursor / Claude Code — JSON, "mcpServers" key (~/.cursor/mcp.json)
{
"mcpServers": {
"supwriter": {
"url": "https://supwriter.com/api/mcp",
"headers": { "Authorization": "Bearer sw_live_your_key" }
}
}
}
# VS Code — JSON, "servers" key, type "http" (.vscode/mcp.json)
{
"servers": {
"supwriter": {
"type": "http",
"url": "https://supwriter.com/api/mcp",
"headers": { "Authorization": "Bearer sw_live_your_key" }
}
}
}
# Codex — TOML (~/.codex/config.toml). Codex sends the env var's VALUE as the
# bearer token, so export SUPWRITER_TOKEN=sw_live_your_key first.
[mcp_servers.supwriter]
url = "https://supwriter.com/api/mcp"
bearer_token_env_var = "SUPWRITER_TOKEN"
# Claude Code — one command
claude mcp add --transport http supwriter https://supwriter.com/api/mcp \
--header "Authorization: Bearer sw_live_your_key"Test it
Once connected, ask OpenCode to use a tool. A few prompts that work well:
- “Humanize this so it reads naturally: <your text>”
- “Paraphrase this in a casual tone: <your text>”
- “Grammar-check and fix this paragraph: <your text>”
- “Run an AI-detection check on the text above and tell me which sentences look AI-written.”
FAQ
Does connecting cost anything extra?
No separate MCP fee — calls draw on the word credits already in your SupWriter plan (one credit per word). AI detection is metered over MCP too (one credit per word analyzed), the same as the REST API; it's free only inside the web app.
Is my account safe?
Yes. You authorize either through SupWriter's own OAuth sign-in — approving a consent screen that lists exactly what the client can do — or with a scoped API key. OAuth tokens are short-lived, and keys can be rotated or revoked any time from Settings → API & MCP.
Which tools become available?
Four: humanize, paraphrase, grammar-check, and AI detection — the same engines that power the SupWriter editor.
Want the full walkthrough with screenshots?
Read the OpenCode setup guide