# AI writing tool with a public API and MCP server · ScriptGrain

> ScriptGrain has a public REST API and an MCP server at mcp.scriptgrain.com, on every plan including Free. Connect Claude to your measured voice profile in one line.

Canonical: https://scriptgrain.com/ai-writing-api-and-mcp-server

# An AI writing tool with a public API and MCP server

Yes: ScriptGrain has both. A public REST API and a remote MCP server at mcp.scriptgrain.com, and they are on every plan, including Free. No upgrade required just to connect something. You mint a key, you point Claude or your own script at it, and the same voice profile that drives the web app is now sitting in your terminal.

That is the short answer. Here is the longer one, and why it matters more than it sounds like it should.

## The problem with a voice profile that cannot leave the building

Here is the thing about most AI writing tools: the measured version of your style only exists inside their text box. You upload a sample, it builds a profile, and that profile lives exactly where the vendor's interface lives. The second you open a different editor, a different chat window, a different app entirely, the profile is gone. You are back to typing "write like me, casual but professional, punchy" into a prompt and hoping.

That is not a voice profile. That is a description of one.

ScriptGrain's 45 reference points, across eight layers from lexical choices and sentence syntax through to function words and cadence, get extracted once, from your actual writing, in about 45 seconds via two-pass analysis. And then they are queryable. An assistant like Claude can pull your profile, draft against it, and check the draft's Voice Match score, all without you touching the app. The profile becomes infrastructure, not a feature locked behind one login.

## How to actually connect

If you are using Claude Code, it is one line:

`claude mcp add scriptgrain https://mcp.scriptgrain.com/mcp --transport http --header "Authorization: Bearer sg_live_<your-secret>"`

That key comes from Settings, then API, inside ScriptGrain. It starts `sg_live_`, and it is shown once, so save it somewhere sane. Send it as a bearer token for anything over REST.

Using claude.ai instead of Claude Code? Custom connectors there use an OAuth consent flow at mcp.scriptgrain.com. You paste the key once, the connector handles the rest, and it works from then on.

Other MCP clients: the endpoint is `https://mcp.scriptgrain.com/mcp` using streamable HTTP, with legacy SSE available at `/sse` if that is what your client expects. And if you would rather skip MCP altogether, the plain REST API is right there, same auth, same everything.

## What the tools actually do

Sixteen tools ship with the MCP server. Eleven of them are free on every plan: `list_profiles`, `get_profile`, `create_outline`, `check_voice_match`, `ai_detect`, `list_generations`, `get_generation`, `save_edit`, `get_billing`, `get_invoice`, `upgrade_plan`. Read, check, list, save. No credits spent.

Five spend credits: `create_profile` uses one extraction slot, `generate_content` costs one credit per variant, `polish` and `humanize` cost one credit each (with a free skip if your text already passes the target), and `mimic_brand` costs one brand-mimic credit and needs explicit consent first.

Two prompts ship built in: `write_in_my_voice` and `build_my_voice_profile`.

The loop worth memorising is `create_profile`, then `generate_content`, then `check_voice_match`, then `save_edit`. That is the whole product cycle, no interface required. And `save_edit` is not just a record; it feeds closed-loop learning, so the edits you keep making actually teach the system something.

## What it costs, and what it does not

Generations through the API draw on the exact same credit pool as the in-app flow. There is no separate API quota sitting off to the side. A free account can mint a key, read its profile, and use every free endpoint listed above; generating content regularly needs a paid plan, same as it would in the browser. Paid plans start at Writer, £12 a month.

Rate limit is 60 requests per minute per key, flat, with no plan-based tiers on that one. And payments never happen through the API: `upgrade_plan` hands you a Stripe-hosted link, and anything involving money finishes in your browser, not in a tool call.

What travels over the wire is the same product, not a thinner version of it: the same 45 attributes, the same two-pass extraction, the same Voice Match score you would see in the app.

## The point of all this

A voice profile is a measurement. Measurements are only useful if the thing measuring can talk to whatever you are actually working in, whether that is Claude Code, a claude.ai connector, or a script you wrote at midnight. Full reference material lives in the [API documentation](https://scriptgrain.com/docs/api.md) and the [MCP setup guide](https://scriptgrain.com/docs/mcp.md). Fair enough if you would rather just use the app. But you do not have to.

## Questions

### Which plans include the API and the MCP server?

Every plan, including Free. A free account can mint an API key, read its voice profile and use all eleven free tools. Generating content through the API spends generation credits from the same pool as the app, so regular generation needs a paid plan, starting at Writer on £12 a month.

### How do I connect ScriptGrain to Claude?

In Claude Code, run claude mcp add scriptgrain https://mcp.scriptgrain.com/mcp --transport http with an Authorization: Bearer header carrying your sg_live_ key. On claude.ai, add a custom connector pointing at the same URL; the OAuth consent page asks you to paste your key once and the connector works from then on. Any other MCP client can use the same endpoint.

### Is there a separate API quota?

No. Generations through the API draw on the same credit pool as the in-app editor, so there is nothing separate to buy or track. The rate limit is 60 requests per minute per key, and it is the same on every plan.

### Is the API a cut-down version of the product?

No. It carries the same 45 measured attributes across eight layers, from the same two-pass extraction that takes about 45 seconds, and returns the same Voice Match score as the app. The four-call loop of create_profile, generate_content, check_voice_match and save_edit is the whole product cycle without the interface.

## Related

- [Why ScriptGrain](https://scriptgrain.com/why)
- [Pricing](https://scriptgrain.com/pricing)
- [Sample voice profiles](https://scriptgrain.com/voice-preview)
- [For agencies](https://scriptgrain.com/for-agencies)
