# API and MCP documentation · ScriptGrain

> ScriptGrain's public REST API and MCP server: voice profiles, drafts in a measured voice, voice-match scores and Voice Brain memory. One page per capability, on every plan including Free.

Canonical: https://scriptgrain.com/us/api

# ScriptGrain API and MCP documentation

ScriptGrain has a public REST API and an MCP server, on every plan including Free. Each page below covers one capability: what it does, its REST endpoint and MCP tool, and a request you can copy.

*For AI agents: every ScriptGrain page is listed in [/llms.txt](https://scriptgrain.com/llms.txt), and this page is also available as Markdown at [/api.md](https://scriptgrain.com/api.md).*

## API and MCP capabilities

- [Voice Profile API](https://scriptgrain.com/us/api/voice-profile): Create a voice profile from writing samples and read back 45 measured attributes by REST or MCP: list_profiles, create_profile and get_profile. One extraction slot per profile, reads free.
- [Brand Mimic API](https://scriptgrain.com/us/api/brand-mimic): POST /v1/mimic or the mimic_brand MCP tool reads up to 8 pages of a public site and builds a ready-to-use brand voice profile. One brand-mimic credit, explicit consent required.
- [Outline API](https://scriptgrain.com/us/api/outline): POST /v1/outlines or the create_outline MCP tool writes a markdown outline in a voice profile, free, so the structure can be reviewed before generate_content drafts from it.
- [Content Generation API](https://scriptgrain.com/us/api/content-generation): POST /v1/generations or the generate_content MCP tool writes a draft in a voice profile and scores it against that profile. 1 credit per variant up to 5,000 words, 2 up to 10,000, 3 up to 15,000.
- [Voice Match API](https://scriptgrain.com/us/api/voice-match): POST /v1/voice-match or the check_voice_match MCP tool scores any text of 20+ words against a voice profile, 0 to 1, with the per-feature numbers behind the score. Free on every plan.
- [Voice Compare API](https://scriptgrain.com/us/api/voice-compare): POST /v1/compare-voice or the compare_voice MCP tool scores up to three pieces, pasted or by URL, against a main piece. No profile needed, free on every plan, measured numbers on every difference.
- [Voice Monitor API](https://scriptgrain.com/us/api/voice-monitor): Watch public pages against a voice profile and score them every month: get_voice_monitor, add_monitor_url, remove_monitor_url and run_voice_monitor. 5 to 50 pages per profile on paid plans.
- [Voice Brain Memory API](https://scriptgrain.com/us/api/voice-brain-memory): Read and manage a voice's Voice Brain memory by REST or MCP: get_memory, sync_memory, add_to_memory, edit_memory, delete_memory, forget_piece, set_repeat_policy, list_brains and set_voice_brain. Free.
- [Novelty Check and What-Next API](https://scriptgrain.com/us/api/novelty-check): check_novelty tells you whether a brief repeats, builds on or is new against a voice's memory; what_next proposes up to five grounded angles. REST and MCP, free on every plan.

## Make a first call

- **Authentication**: Mint an API key under Settings, API, and send it as a Bearer token: Authorization: Bearer sg_live_...
- **REST base URL**: https://auth.scriptgrain.com/functions/v1/api-v1
- **MCP server**: https://mcp.scriptgrain.com/mcp (streamable HTTP, for any MCP client).

## Full references

- [REST API reference](https://scriptgrain.com/docs/api.md): every endpoint, credit costs and rate limits.
- [MCP server guide](https://scriptgrain.com/docs/mcp.md): connecting a client and every tool.
- [OpenAPI 3.1 description](https://scriptgrain.com/openapi.json): for Postman, client generators and agent tool loaders.
- [Run in Postman](https://www.postman.com/scriptgrain/scriptgrain-api): the public ScriptGrain API workspace: every endpoint as a ready request, generated from the OpenAPI description.
