@stacksona/mcp-server
Give an MCP client the real Stacksona Gate tools without building the Gate HTTP and polling layer yourself.
Connect it
- 1Install.
npm install -g @stacksona/mcp-server - 2Set environment.
STACKSONA_GATE_URLandSTACKSONA_API_KEY. - 3Add the server to your MCP client.
The client immediately receives eight Stacksona tools.
MCP client config
{
"mcpServers": {
"stacksona": {
"command": "stacksona-mcp-server",
"env": {
"STACKSONA_GATE_URL": "https://{gate-id}.stacksona.cloud",
"STACKSONA_API_KEY": "sg_your_api_key"
}
}
}
}Available tools
| MCP tool | Purpose |
|---|---|
stacksona_resolve_tools | Resolve registered Gate tool contracts. |
stacksona_log_event | Append timeline evidence. |
stacksona_request_decision | Evaluate one exact proposed tool call. |
stacksona_request_decision_and_poll | Evaluate and follow the exact review thread when human review is required. |
stacksona_get_decision | Read a review by thread or task. |
stacksona_list_decisions | List recent pending or completed review references. |
stacksona_submit_revision | Submit reviewer-requested changes on the same review thread. |
stacksona_validate_approval_token | Validate and consume signed one-time approval proof. |
Typical agent flow
stacksona_request_decision_and_poll
task_id: refund-order-8821
tool_name: issue_refund
payload: { order_id: "8821", amount: 500, currency: "usd" }
allow / approved -> execute exact proposed call
reject / rejected -> stop
changes_requested -> revise, then stacksona_submit_revisionThe poll helper honors Gate's recommended delay when present and returns on changes_requested so the agent can revise instead of waiting forever.
Dynamic tool contracts
Use stacksona_resolve_tools before model tool selection to load the exact registered name, description, and input schema from Gate.
Signed approvals
For actions configured to require signed proof, call stacksona_validate_approval_token before forwarding the action and branch on the returned valid value.
If an MCP client can call the raw domain tool directly, calling Stacksona first is guidance rather than enforcement. Put Gate in the wrapper that owns access to the real side effect.
@stacksona/mcp-server 0.3.0 · Node.js 18+