Skip to main content
The Crevio MCP server lets any MCP-compatible agent delegate work to Crevio — and, when it wants the controls itself, drive the entire Crevio API in code. One server, two surfaces:
  • Delegationask_crevio hands the Crevio agent a job in plain English (“refund the last order from jane@…”, “write and schedule this week’s posts”) and returns the result. Longer jobs run in the background; you follow them as runs, continue the conversation, answer approval gates, and read the transcript.
  • Direct APIapi_search and api_execute let the connected agent discover and call every REST endpoint through code execution, with the same authorization and validation as the API.
New to Crevio’s agentic model? Start with the AI & Agents overview to see how MCP, Tasks, and Events fit together. Under the hood a delegated job is a Task with one run, so everything here is also visible in your dashboard and through /v1/tasks and /v1/task_runs.

Setup

1

Create an API token

In Crevio go to Settings → Developers → API tokens and create one. An MCP connection has exactly the permissions of the token behind it — everything the account can do.
2

Configure your client

Claude Code
Claude Desktop / Cursor / other clients — add to the client’s MCP config (claude_desktop_config.json, ~/.cursor/mcp.json, …):
Client-specific steps, OAuth, and raw curl examples are on the Connecting page.
3

Verify with whoami

Ask the connected agent to call whoami. It returns the account and user behind the token, the credential, plan, credit balance, rate limit, wait limits, and the list of tools — no arguments, no side effects. If whoami works, everything else will.

One-off jobs: ask_crevio

The default. One call starts a run, waits up to timeout_seconds, and returns the run with the agent’s final reply in result.
  • timeout_seconds defaults to 60 and is capped at 90. If the run is still going when it passes, the tool returns wait_timed_out with the run — call wait_for_run with its id to keep waiting. Nothing is lost; the run continues on Crevio’s side.
  • idempotency_key makes retries safe: the same key returns the run the first call started instead of starting (and paying for) another.
  • approval_mode is autonomous by default. supervised makes the run pause in needs_input for your review before it finishes (finish it with send_message, or let it stand); read_only forbids writes.

Long-running jobs: start_chatwait_for_runsend_message

For anything you don’t want to block on — a site build, a research task, a bulk migration:
  1. start_chat queues the work and returns the run immediately.
  2. wait_for_run (bounded) or get_run (instant) until status is completed, failed, or needs_input.
  3. send_message continues the conversation — follow-up instructions, corrections, answers to a question the agent asked. The agent keeps its context. On a finished run this starts a new run in the same conversation; on a needs_input run it resumes it. Pass timeout_seconds to wait for the reply in the same call.
  4. resolve_approvals when a run is paused on an integration action (needs_input with pending_approval_ids) — approve or deny every pending id at once and the run resumes.
  5. cancel_run to stop a run that is pending, running, or waiting.
A chat is the conversation and a run is one turn of work inside it. list_runs shows every run on the account — delegated jobs and your scheduled Tasks alike — while list_chats and get_chat browse the conversations themselves, and list_messages reads a chat’s full transcript, not just the final reply.

Direct API access: api_search + api_execute

When the connected agent wants to operate Crevio itself rather than delegate — or needs exact data shapes back — it drives the REST API in code. Rather than one tool per endpoint (403 operations across 280 paths would burn ~170k tokens of context before the agent did anything), Crevio uses Code Mode, inspired by Cloudflare’s approach: the agent writes code against two tools and chains as many calls as it likes in one round-trip.
Read-only, idempotent discovery. A tools method returns every operation as a hash with "method", "path", "summary", "description", "tags", "parameters", "request_body".
api_execute dispatches through the same controllers as api.crevio.co, so the API conventions apply unchanged: params are unwrapped (no {product: {...}} wrapper), associations are bare names with prefix ids (product: "prod_abc", not product_id), money is in cents, list endpoints return {object: "list", data: [...]}, and a product needs a price variant before it can go active. A 404 resource_missing on a POST/PATCH is almost always a bad association id. Courses and other content live under /experiences, not /products.

Complete tool reference

Every MCP connection has the full permissions of its token, so every tool is available on every connection — there are no per-tool scopes to grant. Limit what an agent can do by giving it a token on an account whose data you’re happy for it to touch, and by choosing approval_mode on delegated jobs.

The run object

Delegation tools return a run (trun_…), the same object as GET /v1/task_runs/:id plus result and chat_id: Runs also fire the task_run.completed, task_run.failed, and task_run.needs_input webhooks, and can be streamed over SSE at GET /v1/task_runs/:id/stream.

Errors

Authentication failures are HTTP 401/403 on the request itself (WWW-Authenticate points at the OAuth metadata). Tool failures come back as a tool result with isError: true and a JSON body:
api_execute failures use the same envelope shape (error and no result) — a sandbox timeout, an exception in your Ruby, or an API error surfaced in calls.

Security

Every tool runs inside your account’s tenant boundary. Delegated jobs run the Crevio agent with the permissions your account already has; api_execute runs in a sandboxed Ruby VM (mruby — no filesystem, network, environment, or host primitives; 10-second timeout, 10 MB memory) and dispatches requests through the same API controllers as api.crevio.co, so authorization, validation, rate limiting, and error messages are identical to direct API calls. Tokens are as powerful as your account: only connect agents you trust, and revoke a token from Settings → Developers to cut a connection off instantly.

Next steps

Connecting

Client-by-client setup, OAuth, and curl examples.

Tasks (your AI workforce)

The Task / Task Run model every delegated job is built on — and how to schedule recurring work.

AI & Agents overview

How MCP, Tasks, and Events form Crevio’s agentic model.

API conventions

The shapes, prefixes, and gotchas api_execute shares with REST.