---
title: "Execute unified AgentStack batch (agentstack.execute)"
method: POST
path: "/mcp/"
tags: ["MCP"]
---

# Execute unified AgentStack batch (agentstack.execute)

`POST /mcp/`

## Request

- Base URL: `https://api.agentstack.tech` (the document declares no server; this is the origin it was published from)
- URL: `https://api.agentstack.tech/mcp/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Unified MCP entrypoint.
Handles both standard MCP JSON-RPC 2.0 (Cursor streamable-http) and batch format with steps.

**Batch format (steps):**
- `steps`: array of { id, action, params?, if? }. Params may use refs: {"from": "stepId.result.field"} or {"from": "context.field"}.
- `context` (optional): object merged into request context for all steps. `project_id` and `user_id` override the session. `locale` and `client_locale` select this request's language and are not saved.
  Use this to override project/user without changing API key. Example: {"context": {"project_id": 123, "user_id": 456}}.
- If context.project_id or context.user_id is sent, they override session context; otherwise session (API key/JWT) is used.

**Report (who got what, until when):** If any step is buffs.apply_buff or buffs.apply_temporary_effect and succeeds,
the response includes `applied_buffs_summary`: [{ buff_id, state, applied_at, expires_at, ... }] for buffs.apply_*,
buffs.grant_subscription, and buffs.grant_tenant_subscription. Otherwise collect
the same from step results manually (each step.result has applied_at, expires_at).

## Headers

- `Idempotency-Key` string

## Response `200`

Successful Response

- unknown

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `409`: Conflict
- `422`: Unprocessable Entity
- `429`: Too Many Requests
- `500`: Internal Server Error

---

[API](https://skmtc.dev/agentstack/apis/agentstack-core-api.md) · [All operations](https://skmtc.dev/agentstack/apis/agentstack-core-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentstack/apis/agentstack-core-api/revisions/8ecf3406e74a?raw)
