Skip to main content
You can use AI coding tools like Cursor, Claude Code, Codex, and Claude to both configure your Scrip programs and write your application’s integration code. There are two ways to give your AI tool context:
  1. 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.
  2. Share docs and schema links (agents.md, llms.txt, .md page URLs, and openapi.json) when your coding assistant is writing integration code.

Connect the MCP server

Scrip hosts an OAuth-authenticated MCP server at https://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
Connections default to the Sandbox environment so you can iterate safely. See Connect a client for one-command setup in Claude Code, Cursor, Claude, and Zed.

Context files and Markdown URLs

Every page on docs.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):
  1. 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.
  2. Use ext:{external_id} instead of syncing users: Scrip creates new users automatically on their first event, and every participant endpoint accepts ext:user_123 directly in the URL path.
  3. Wait for events to finish before reading balances: POST /v1/events returns 202 Accepted and runs rules in the background. Wait for the event.completed webhook or poll GET /v1/events/{event_id} before checking updated balances.
  4. Keep API keys on the server and pass idempotency_key: Never expose sk_test_ or sk_live_ keys in browser or mobile code. Pass an idempotency_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.