MCP server
Rundun exposes a Model Context Protocol (MCP) server for AI agents, automation tools, and other MCP-compatible clients. It's served at the same base URL as the REST API and authenticated with the same org-scoped API key — any existing integration credential works for both.
Use it when you want an AI agent to manage checklist templates, dispatch and monitor runs, manage assets, or administer organization members directly, without you having to wire up individual REST calls yourself.
Endpoint
POST https://api.rundun.app/mcp
Authorization: Bearer rdk_live_<your-api-key>
Content-Type: application/json
Accept: application/json, text/event-stream
The server runs in stateless mode — every request is self-contained, there is no session to establish first. GET and DELETE /mcp both return 405 Method Not Allowed, since there's no session to resume or terminate.
See API reference → Authentication for how to get an API key.
Scoping
Every tool call is scoped to the organization that owns your API key. There is no way to request another org's data through this endpoint, and no tool accepts an org ID as a parameter — the key itself determines which org you're operating on. If you need to manage more than one organization, use a separate API key per organization.
Available tools
Assets
| Tool | Parameters | Description |
|---|---|---|
list_assets |
limit?, cursor? |
List assets (e.g. properties, vehicles) in your organization |
get_asset |
asset_id |
Get a single asset by ID |
create_asset |
name, fields? |
Create an asset. fields is a free-form key-value map |
update_asset |
asset_id, name?, fields? |
Update an asset. fields are merged, not replaced |
delete_asset |
asset_id |
Delete an asset. Fails if it has active (pending or in-progress) runs |
Templates
| Tool | Parameters | Description |
|---|---|---|
list_templates |
— | List checklist templates in your organization |
get_template |
template_id |
Get a single template by ID |
create_template |
name, description?, tags?, settings?, sections?, execution? |
Create a template. sections follows the TDL schema |
update_template |
template_id, plus any of the fields above |
Update a template. Only provided fields change; omitted fields keep their current value |
delete_template |
template_id |
Delete a template |
Template creation and updates are manual — there is no natural-language generation tool exposed here. For AI-powered template generation, use POST /v1/templates/generate.
Runs
| Tool | Parameters | Description |
|---|---|---|
create_run |
template_id, asset_id?, executor_ref?, expires_in_hours? |
Dispatch a run, returning a shareable link |
get_run |
run_id |
Get the full state of a run — status, answers, progress |
list_runs |
status?, limit?, offset? |
List runs in your organization |
delete_run |
run_id |
Permanently delete a run and any uploaded photos |
Step-by-step answer submission isn't exposed as a tool — that's the checklist-completion flow driven by the person executing the run on their phone, not something an integration does on their behalf.
Organization members
| Tool | Parameters | Description |
|---|---|---|
list_members |
— | List members of your organization |
invite_member |
email, role? |
Invite a new member by email. Requires owner or admin role |
remove_member |
user_id |
Remove a member. Requires owner or admin role. You cannot remove yourself |
invite_member and remove_member check your API key's creator's current membership role on every call — if that person is later demoted or removed from the organization, these two tools stop working for that key immediately.
Example: listing available tools
curl -X POST https://api.rundun.app/mcp \
-H "Authorization: Bearer rdk_live_..." \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'
Example: dispatching a run
curl -X POST https://api.rundun.app/mcp \
-H "Authorization: Bearer rdk_live_..." \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "create_run",
"arguments": {
"template_id": "t-550e8400-e29b-41d4-a716-446655440000",
"executor_ref": "booking_9f2a3b",
"expires_in_hours": 24
}
}
}'
Response
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "{\"run_id\":\"r-550e8400-e29b-41d4-a716-446655440000\",\"link\":\"https://rundun.app/r/r-550e8400-e29b-41d4-a716-446655440000\",\"expires_at\":\"2026-05-23T08:31:00Z\"}"
}
]
}
}
Every tool returns its result as a JSON string inside a single content text block — parse result.content[0].text to get the structured data.
Tool errors
Business-logic failures (not found, forbidden, quota exceeded, and so on) come back as a normal tool result with isError: true, not as a protocol-level failure — so your agent sees the error message and can react to it:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"isError": true,
"content": [
{
"type": "text",
"text": "{\"error\":\"run_not_found\",\"message\":\"Run not found\"}"
}
]
}
}
Malformed requests (unknown tool name, invalid arguments) return a standard JSON-RPC protocol-level error instead.
See also
- API reference — authentication, REST endpoints, error codes
- Runs API — the underlying REST endpoints these tools wrap
- Template Definition Language — the schema used by
sectionsincreate_template/update_template