The Crevio MCP server lets AI agents — like Claude, Cursor, or custom LLM workflows — manage your store through natural language. It exposes two tools that accept Ruby code: one to discover available API endpoints, and one to execute them. Two tools, full API coverage, minimal context usage.Documentation Index
Fetch the complete documentation index at: https://crevio.co/docs/llms.txt
Use this file to discover all available pages before exploring further.
What is MCP?
Model Context Protocol (MCP) is an open standard that gives AI assistants a way to connect to external tools and data sources. Instead of manually writing API calls, an AI agent discovers and invokes your Crevio API through MCP — using natural language.How it works
Traditional MCP servers expose one tool per API endpoint. This works for small APIs, but quickly becomes impractical — each tool definition consumes tokens in the AI model’s context window. At 155 operations across 102 API paths and ~427 tokens per tool, that’s over 66,000 tokens burned before the agent does anything useful. Crevio uses Code Mode — inspired by Cloudflare’s approach — with just two tools:code_search— The agent writes Ruby code to filter and explore the API catalogcode_execute— The agent writes Ruby code to call endpoints, chain requests, and transform results
Connect
The server is available athttps://mcp.crevio.co/mcp over Streamable HTTP transport, authenticated with a Bearer token.
Connecting
Set up Claude Desktop, Cursor, or any MCP-compatible client.
The two tools
code_search — Discover API endpoints
A read-only, idempotent tool for exploring the Crevio API. Write Ruby code to filter and search the API catalog. A tools method is available that returns all 155 operations (across 102 API paths) as an array of hashes.
Each entry has keys: :method, :path, :summary, :description, :tags, :parameters, and :request_body.
code_execute — Run API operations
Executes Ruby code against the live Crevio API in a sandboxed environment. Available methods:
get(path, **params)— GET requestpost(path, **params)— POST requestpatch(path, **params)— PATCH requestdelete(path, **params)— DELETE request
/v1. Parameters are sent as query params for GET/DELETE and as a JSON body for POST/PATCH.
code_execute tool dispatches requests through the same API controllers as api.crevio.co — all authorization, validation, and rate limiting apply. Responses match the REST API format exactly.
Example: How an agent handles a request
When you ask “Create a buy-one-get-one discount for my course”, here’s what happens under the hood:Discover relevant endpoints
The agent calls
code_search with Ruby code to find discount and product endpoints:Find the product and create the discount
The agent calls
code_execute to chain everything together in one shot:What’s available
Everything accessible through the REST API is available via MCP:| Category | Operations |
|---|---|
| Account | Retrieve, update |
| Profile | Retrieve your user profile |
| Products | Create, update, delete, list, retrieve |
| Price variants | Create, update, delete, list, retrieve |
| Experiences | List, retrieve (courses, downloads, links) |
| Reviews | Create, update, delete, list, retrieve |
| Blog posts | List, retrieve |
| Blog categories | List, retrieve |
| Legal pages | List, retrieve, update |
| Checkouts | Create, retrieve, update |
| Checkout links | Create, update, delete, list, retrieve |
| Orders | List, retrieve |
| Order items | List, retrieve |
| Refunds | Create, list, retrieve |
| Invoices | Create, list, retrieve, void |
| Subscriptions | List, retrieve, cancel, pause, resume |
| Customers | Create, update, delete, list, retrieve, tag |
| Tags | Create, update, delete, list, retrieve |
| Discounts | Create, update, delete, list, retrieve |
| Socials | Manage connected accounts, posts, comments, and analytics |
| Forms | Create, update, delete, list, retrieve, archive, restore |
| Form submissions | List, create, retrieve |
| Tasks | Create, update, delete, list, retrieve |
| Task runs | List, retrieve, update |
| Event sources | List, create, delete, retrieve, discover available |
| Events | List subscribable events |
| Formations | Create, list, retrieve, submit, retry payment |
| Formation documents | List, retrieve |
| AI sites | Create, update, delete, list, retrieve |
| Files | Create, list, retrieve, delete, confirm upload |
| Emails | Send |
| Webhook endpoints | Create, update, delete, list, retrieve, test |
| Webhook events | List, retrieve |
| x402 | Get and update configuration |
Security
The code execution environment runs in a sandboxed BasicObject clean room — the agent cannot access the filesystem, network, environment variables, or Ruby’s standard library. Only safe operations (arrays, hashes, strings, iteration) and the API dispatch methods are available. A 5-second timeout prevents runaway executions. All operations run within your account’s tenant boundary — the same multi-tenant isolation as the REST API. The MCP server dispatches requests through the same API controllers asapi.crevio.co. No special code paths — the agent gets the same behavior, validation, and error messages as direct API calls.
