- Connect the MCP server (
https://mcp.scrip.dev/mcp) so your agent can inspect your sandbox, validate and simulate rules, trace events, and pull docs on demand. - Share docs and schema links (
agents.md,llms.txt,.mdpage URLs, andopenapi.json) when your coding assistant is writing integration code.
Connect the MCP server
Scrip hosts an OAuth-authenticated MCP server athttps://mcp.scrip.dev/mcp. Once connected, your AI client can:
- Inspect your programs, assets, rule sets, rules, and tiers
- Check
event.*field names against recent events, then lint, preview, and simulate draft rules - Explain why an event matched or skipped rules (
scrip_explain_event) and inspect participant balances - Pull any documentation page on demand
Context files and Markdown URLs
Every page ondocs.scrip.dev is available as clean Markdown by appending .md to the URL (for example, https://docs.scrip.dev/which-endpoints-you-need.md) or sending Accept: text/markdown.
Pages to load by task
Instead of loading the entire documentation site, give your AI tool the core pages (Core concepts, Which endpoints you need, and Authentication) plus the guides for the feature you are building:Key rules to give your coding agent
When prompting an AI tool to write application code against the Scrip API, include these four rules in your prompt or project instructions (AGENTS.md / .cursorrules):
- Only call what your app needs: Your application only calls
POST /v1/events, balance/history reads, and redemptions as users earn and spend (see Which endpoints you need). Programs, assets, and rules are configured in the dashboard or via a setup script. - Use
ext:{external_id}instead of syncing users: Scrip creates new users automatically on their first event, and every participant endpoint acceptsext:user_123directly in the URL path. - Wait for events to finish before reading balances:
POST /v1/eventsreturns202 Acceptedand runs rules in the background. Wait for theevent.completedwebhook or pollGET /v1/events/{event_id}before checking updated balances. - Keep API keys on the server and pass
idempotency_key: Never exposesk_test_orsk_live_keys in browser or mobile code. Pass anidempotency_key(such as an order ID) on every event so retries never credit a user twice.
Next steps
Connect the MCP server
Add Scrip MCP to Claude Code, Cursor, Claude, or Zed.
MCP tools
See every tool exposed by the MCP server.
Agent runbook
View the step-by-step runbook served at
/agents.md.