Stacksona for MCP Clients
Expose Stacksona Gate approval and audit capabilities to MCP-compatible agent clients.
Use the MCP server when an MCP-compatible client should be able to request Stacksona approval before taking a tool action.
STACKSONA_GATE_URL is the Gate endpoint from your Stacksona workspace or deployment. STACKSONA_API_KEY is the sg_ agent key for the agent making requests.
Fast path: add Stacksona tools to an MCP client
- 1Install the server.
npm install -g @stacksona/mcp-server - 2Set environment variables.
Provide
STACKSONA_GATE_URLandSTACKSONA_API_KEY. - 3Add the server to your MCP client.
The client can now call Stacksona approval and audit tools.
{
"mcpServers": {
"stacksona": {
"command": "stacksona-mcp-server",
"env": {
"STACKSONA_GATE_URL": "https://{gate-id}.stacksona.cloud",
"STACKSONA_API_KEY": "sg_xxx"
}
}
}
}Core tools
| Tool | Use it for |
|---|---|
request_decision | Create an approval request before the agent acts. |
request_decision_and_poll | Request approval and wait through polling for short review windows. |
get_decision | Fetch the latest decision status. |
validate_approval_token | Confirm signed approval before sensitive execution. |
log_event | Send audit events from the agent workflow. |
Prompt pattern
When a tool will affect customers, production systems, money, data deletion, files, or external communications, first request a Stacksona decision. Continue only when the decision is allow or approved.
Integration FAQ
Can I use Stacksona with MCP Clients today?
Yes. Use the documented native package when one exists. Otherwise, use the REST API, HTTP module, webhook action, or a small Node sidecar with @stacksona/sdk.
Where should Stacksona sit in a MCP Clients workflow?
Place Stacksona immediately before the action that sends, updates, deletes, refunds, posts, deploys, or calls a production API.
What statuses should my workflow allow?
Execute the gated action only on allow or approved. Stop, retry, notify, or route to fallback for every other state.