Setu Recipes: reusable digital workers across every app.Browse templates
Documentation menu

MCP

Setu runs a Model Context Protocol server over streamable HTTP, so Cursor, Claude Desktop, Claude Code and other MCP clients can use your connected apps with no code.

Create a session#

Shell
curl -X POST $SETU_BASE_URL/v1/sessions \
  -H "authorization: Bearer $SETU_API_KEY" \
  -H "content-type: application/json" \
  -d '{"user_id":"user_1","toolkits":["github","slack"]}'
JSON
{
  "session_id": "ses_...",
  "mcp_url": "https://api.setuagent.com/v1/mcp/ses_...",
  "expires_at": "2026-10-14T09:00:00.000Z"
}

Paste mcp_url into the client. For Claude Code:

Shell
claude mcp add --transport http setu "https://api.setuagent.com/v1/mcp/ses_..."

Treat the URL as a secret. It carries 256 bits of randomness and no other credential. Create one session per end user, keep the lifetime short (ttl_seconds), and never put it in a log or a shared channel.

Dynamic mode (default)#

The server exposes four meta-tools, so the model never has to load the whole catalog:

Tool Purpose
SETU_SEARCH_TOOLS Find tools by describing the task
SETU_GET_TOOL_SCHEMA Fetch the input schema for one tool
SETU_EXECUTE_TOOL Run a tool with arguments
SETU_CONNECT Get a link for the user to connect a toolkit that is not connected yet

If the model tries a toolkit the user has not connected, the result includes a connect_url it can show to the user.

Digital workers: "do this every morning"#

The same address lets the assistant save, change and run digital workers, so a person can say "every morning at 10, take new leads from my inbox, check them, and post the real ones to Slack" and it keeps happening without the assistant open. These tools are offered in both modes:

Tool Purpose
SETU_DIGITAL_WORKER_HELP The digital worker format, expressions, schedules, the built-in steps and an example. The assistant reads this first
SETU_CREATE_DIGITAL_WORKER Save a digital worker. It is saved switched off unless enable: true, which the assistant sets only when the person asked for it to run on its own
SETU_LIST_DIGITAL_WORKERS, SETU_GET_DIGITAL_WORKER See what is saved, its schedule and recent runs
SETU_UPDATE_DIGITAL_WORKER Replace the definition and/or turn the schedule on or off
SETU_DELETE_DIGITAL_WORKER Delete a digital worker and its history
SETU_RUN_DIGITAL_WORKER Run once now, to test it
SETU_LIST_RUNS, SETU_GET_RUN Progress of a run, where it stopped and why

Good to know:

  • A session can only build digital workers from tools that session may use, and only sees its own user's digital workers.
  • Steps that change things in an app still follow the person's approval rules. An unattended run pauses at such a step and the person is emailed; they can set an allow rule for the actions they trust.
  • Two built-in steps need no connected app: setu.ask_ai (judge, classify, summarise or extract from data; needs an AI model configured on the server) and setu.only_new (skip items an earlier run already handled).
  • Every create, change, delete and run is written to the activity log. Scheduled runs that fail send the owner one email; this can be turned off in Settings.
  • The same digital workers appear in the dashboard, where they can also be edited.

Static mode#

Pass "mode": "static" with an explicit actions list to register each action as its own MCP tool. Use it when you want a small, fixed tool surface:

JSON
{ "user_id": "user_1", "mode": "static", "actions": ["github.create_issue", "slack.post_message"] }

Limits#

Sessions expire after ttl_seconds. Calls made through MCP count against the same rate limits and monthly quota as REST calls, and appear in the same execution log.