Skip to main content

When to use it

The local MCP server runs on your machine and signs x402 payments with your wallet. That works for Claude Desktop, Cursor, and Claude Code, which spawn a local process. It does not work for agents that run in someone else’s cloud — Grok Bot, hosted runners, agent platforms — because they cannot reach a process on your machine, and you should never paste a wallet key into a third-party cloud. The hosted endpoint is the same 50 tools over Streamable HTTP, authenticated with an agent access token and billed to your agent’s credit balance. Staging: https://api-stg.oneshotagent.com/mcp.

1. Mint an access token

From any wallet session of the TypeScript SDK (≥ 0.33.0):
A token is a delegated, revocable credential. It identifies your agent, can spend only from the agent’s credit balance under the agent’s stored budget, and can never sign x402, change budgets, or mint other tokens. Revoke it any time with agent.revokeAccessToken(id); agent.listAccessTokens() shows each token’s label, last use, and credit-funded spend today.
Prefer the SDK, but the raw routes are POST/GET/DELETE /v1/agents/me/access-tokens, wallet-signed (X-Agent-ID + x-agent-proof). Operators can also mint for a partner via POST /v1/tools/internal/agents/access-tokens.

2. Add credits

Hosted sessions pay from credits only. Until self-serve top-up ships, credits are added by the OneShot operator (POST /v1/tools/internal/credits/grant). A call the balance cannot cover comes back as a tool result with isError: true and this body:
Top up and retry — unlike budget_exceeded, nothing about the call itself was refused.

3. Connect a client

In Grok Bot’s MCP/tools settings choose Add server and enter:
  • Name: oneshot
  • URL: https://win.oneshotagent.com/mcp
  • Header: Authorization: Bearer oneshot_…
Grok Bot connects, lists the 50 tools, and runs them against your agent’s credits. No OAuth step is involved.

Budgets

Budgets set on the agent (agent.budgets, PUT /v1/agents/me/budgets from a wallet session) apply to hosted sessions too, and for them credit-funded spend counts toward the daily cap — credits are what a hosted session pays with. When the cap is hit a tool call returns isError: true with:
oneshot_budget_status works from a hosted session and reports spend the same way the gate measures it. Budgets cannot be changed from a token — a cap the model could raise is not a cap.

Local server with a token

The local @oneshot-agent/mcp-server (≥ 0.20.0) also accepts ONESHOT_ACCESS_TOKEN in place of wallet credentials, for the same credits-only behaviour on your own machine. ONESHOT_BUDGET_* cannot be combined with it.

Troubleshooting