REST API and MCP Integration
Turn WordPress into an MCP server so Claude and Cursor can create and read articles. REST API too
WordPress becomes an MCP server
With the Pro or Cloud edition installed (including the free trial), this WordPress site works as an MCP server. Just register the URL and API key with an MCP client such as Claude Code, Claude Desktop, or Cursor, and you can ask things like "write an article with the keyword XX" or "read the article you made last week and summarize it." You don't need any extra software or a Node.js wrapper.
There's a single MCP endpoint (using Streamable HTTP; it accepts JSON-RPC over POST).
https://your-site/wp-json/sorabun/v1/mcp
How to register
Claude Code
claude mcp add --transport http sorabun "https://your-site/wp-json/sorabun/v1/mcp" \
--header "Authorization: Bearer sbk_xxxxxxxxxxxxxxxx"
Cursor / Windsurf / VS Code (for config files that let you specify a URL and headers)
{
"mcpServers": {
"sorabun": {
"url": "https://your-site/wp-json/sorabun/v1/mcp",
"headers": { "Authorization": "Bearer sbk_xxxxxxxxxxxxxxxx" }
}
}
}
Claude Desktop (for clients that can't add headers from the settings screen, go through mcp-remote. Requires Node.js 18 or later)
{
"mcpServers": {
"sorabun": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://your-site/wp-json/sorabun/v1/mcp",
"--header", "Authorization: Bearer sbk_xxxxxxxxxxxxxxxx"]
}
}
}
The URL and API key are shown under "Settings > REST API / MCP Integration" in a ready-to-copy form.
If you'd rather not write the API key into a config file, keep it in 1Password and pass it in only at startup (Using 1Password).
You can also ask for article drafts and checks from My Page in your browser, without an MCP client (View and manage sites from My Page (web)).
Which tools are available?
| Tool | What it does |
|---|---|
create_article | Create an article from a keyword. Returns a job_id right away |
rewrite_article | Rewrite an existing article. The result is saved as a draft |
article_from_url | Create an article from a URL or a YouTube video |
get_job / list_jobs | Check generation progress |
list_posts / get_post | List articles and read their content (up to 20,000 characters) |
site_info | Site name, edition, generation defaults, and the number of articles Sorabun has created |
security_status | Read the security status (only when you turn it on in settings; see below) |
The three tools that create articles let you choose how each article is made. Anything you leave out uses your settings.
| Parameter | What it sets | create_article | rewrite_article | article_from_url |
|---|---|---|---|---|
length | Length in characters (0 to 20000). 0 lets the AI decide from search intent | Site default if omitted | Site default if omitted | AI fits the source if omitted |
tone | Writing style (desumasu / dearu / casual) | Yes | Yes | Yes |
diagrams | Number of diagrams (0 to 5; -1 lets the AI add them only where they help) | Yes | Yes | Yes |
eyecatch | Whether to generate a featured image | Yes | Keeps the current image | Yes |
custom_prompt | Extra instructions for this article only (up to 2,000 characters) | Yes | Yes | Yes |
The length is a target for the outline, so the finished article won't match it exactly. If you ask for "about 6,000 characters, polite style, no diagrams," the AI turns that into these parameters.
Article generation is asynchronous. The tool returns a job_id right away, and the article takes a few minutes to finish. The server tells the AI to "check get_job every 30 to 60 seconds" and "save as a draft rather than publish unless asked to," so it usually behaves this way without you saying anything.
Only the tools above are available over MCP. It can't change settings, delete articles, or manage API keys. The only way to change publish status is the post_status parameter of create_article and article_from_url, and the default is draft.
Reading the security status (security_status)
Turn on "Security status" under "Settings > REST API / MCP Integration," and the AI in your MCP client can read the results of the daily security monitor. Ask "Is there anything on my site I should fix right away?" and it answers with:
- Known vulnerabilities in installed plugins, themes and WordPress (severity, CVE and the fixed version). As the data source (Wordfence Intelligence) requires, the source and its copyright and license notices come with them, and the AI is told to show them too
- Urgent (security fix) updates you haven't applied yet
- WordPress core files that were changed, are missing, or don't belong
- How many login lockouts happened in the last 7 days (it never returns the usernames tried or IP addresses)
- Which hardening options (such as XML-RPC) are on
It only reads. It doesn't run a new scan, change settings, or update anything. You fix things under "Security / Speed" in the admin.
A leaked API key would let someone create articles, and with this on, also see where your site is weak. Turn it on only when you need it. After turning it on, reconnect your MCP client to see the tool.
You can also call it as a REST API
With the same API key, you can also trigger article generation from Zapier, Make, or your own scripts.
Authentication
Issue an API key under "Settings > REST API / MCP Integration" and attach it to your request header.
X-Sorabun-Key: sbk_xxxxxxxxxxxxxxxx
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /wp-json/sorabun/v1/articles | Start article generation |
| GET | /wp-json/sorabun/v1/jobs/<id> | Check a job's status |
| GET | /wp-json/sorabun/v1/jobs | List recent jobs |
The following parameters can be passed in an article generation request.
keyword(required)type: optimization typelength: character countpost_status:draftorpublishcustom_prompt: additional instructionstone: writing style (desumasu/dearu/casual)diagrams: number of diagrams (0 to 5; -1 lets the AI add them only where they help)eyecatch: whether to generate a featured image (true/false)
In the REST API, leaving out length lets the AI decide the length from search intent (in MCP, create_article uses the site default instead). Any other parameter you leave out uses your settings.
Anyone with this key can generate articles. If you register it with an external service, check that service's access controls. If you suspect it's been exposed, you can reissue it from the settings screen.