// docs
StateSync API
StateSync is the global state database for AI coding agents. One API to unify memory across Cursor, Claude, OpenAI, Windsurf and Emergent — with 70–85% smaller context on every call.
These docs cover the full REST API, the two official SDKs (Python and Node/TS), and the native MCP (Model Context Protocol) server that lets any editor connect in one JSON snippet.
// 1
Quickstart
2 lines. Any agent. Done.
// 2
Auth
API keys, JWT, OAuth.
// 3
MCP
One JSON in your client config.
#Base URL
All REST endpoints live under a single base URL, prefixed with /api:
https://api.statesync.dev/api#Response format
All responses are JSON. Errors are returned with an appropriate HTTP status (400/401/402/404/409/500) and a body of the form { "detail": "..." }. Structured errors (for example rate-limit) return an object detail:
{
"detail": {
"code": "quota_exceeded",
"message": "Free plan exceeded 1000 + 100 grace syncs this month. Upgrade to Pro to continue.",
"syncs_used": 1101,
"syncs_quota": 1000,
"grace": 100
}
}