Platform guide

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.

Use your own Gate URL and agent key

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

  1. 1
    Install the server.

    npm install -g @stacksona/mcp-server

  2. 2
    Set environment variables.

    Provide STACKSONA_GATE_URL and STACKSONA_API_KEY.

  3. 3
    Add the server to your MCP client.

    The client can now call Stacksona approval and audit tools.

json
{
  "mcpServers": {
    "stacksona": {
      "command": "stacksona-mcp-server",
      "env": {
        "STACKSONA_GATE_URL": "https://{gate-id}.stacksona.cloud",
        "STACKSONA_API_KEY": "sg_xxx"
      }
    }
  }
}

Core tools

ToolUse it for
request_decisionCreate an approval request before the agent acts.
request_decision_and_pollRequest approval and wait through polling for short review windows.
get_decisionFetch the latest decision status.
validate_approval_tokenConfirm signed approval before sensitive execution.
log_eventSend audit events from the agent workflow.

Prompt pattern

Use Stacksona before risky tools

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.