MCP server for AI agents
The sandbox exposes an MCP server (Model Context Protocol) — connect it in VS Code, Claude Code, Cursor or Claude Desktop and the AI agent reads this documentation and calls the sandbox on its own: computes signatures, creates contracts and invoices, confirms PIN codes, checks status, issues refunds.
| Setting | Value |
|---|---|
| URL | https://pay-sandbox.digitalspb.com/mcp |
| Transport | Streamable HTTP (type: "http") |
| Authorization | not required |
Installation
In VS Code — a .vscode/mcp.json file in your project or the profile config (command palette → MCP: Open User Configuration). In Claude Code — the claude mcp add command; in Cursor and Claude Desktop — the same remote HTTP server in their own config file.
{
"servers": {
"callisto-sandbox": {
"type": "http",
"url": "https://pay-sandbox.digitalspb.com/mcp"
}
}
}claude mcp add --transport http \
callisto-sandbox \
https://pay-sandbox.digitalspb.com/mcp{
"mcpServers": {
"callisto-sandbox": {
"type": "http",
"url": "https://pay-sandbox.digitalspb.com/mcp"
}
}
}Credentials
Nothing to configure: with no credentials passed, the tools use a preconfigured sandbox test account. You can pass your own sandbox credentials as the login, secret and project_id arguments — ask the sandbox administrators for them.
Sandbox credentials only. Tool arguments are visible to your AI client and the model, so never pass a production login and secret to the MCP server.
Tools
| Tool | What it does |
|---|---|
list_doc_sections, get_docs | sections of the sandbox documentation as markdown (one-time payments and subscriptions, RU/EN) |
sign_request | request signature: XML, JSON v3 or Subscription Service |
check_billing | check billing support for a phone number |
create_contract, authorize_contract, cancel_contract | customer contract: create, confirm with PIN, cancel |
create_invoice | invoice: mobile billing, bank card, SBP, test_info sandbox knobs |
get_invoice, authorize_invoice | invoice status and PIN confirmation |
cancel_invoice, refund_invoice | cancellation and refund |
callback_last | latest callbacks for your credentials — no receiver to set up |
Every calling tool takes a protocol argument — "json" (REST Payment API v3) or "xml" (Merchant XML API v2.9).
What the tools return
Not the raw gateway response but a parsed one: summary — a short recap, next_step — what to do next, data with the status and result codes decoded, error with a human hint on failure, raw — the original response for debugging. That way the agent does not guess what a ResultCode means and does not lose the existing invoice’s invoice_id carried by a 409 response.
Callbacks without a tunnel
callback_last shows the events the sandbox sent for your credentials along with delivery status and attempt count. The event name is the one sent to the partner: by default payment., refund., contract., contract., receipt., content., and for a project with the legacy flag — payment., payment., refund., contract.*. Which envelope went out is shown by the envelope field (see “Callbacks”). The log is read on the sandbox side, so no public HTTPS endpoint and no ngrok are needed — you can confirm the integration closed the loop without leaving your IDE. The log is scoped to your own partner, so login and secret are verified.
The endpoint is public, so it is rate limited per IP: 60 requests per minute (burst up to 20) and at most 4 concurrent connections. For load scenarios contact the sandbox administrators.
Create a 99 RUB invoice for 79600000000
in the Callisto sandbox and show me the
status once billing completes