MCP in 2 minutes
Connect an agent in Claude, Cursor or VS Code to ndStill's MCP server and make its first guarded payment.
This quickstart connects an agent in Claude Code, Cursor, VS Code or Claude Desktop to ndStill over MCP, then makes one payment that a policy holds for you. It takes about two minutes. The agent gets ndStill's tools (pay, check_budget, simulate_payment and more) and never sees a card number or a master key.
Before you start#
- An ndStill org with at least one agent and a funding source. Until general availability, every call below runs in test mode: decisions are real pipeline runs, but no money moves.
- An MCP client that speaks Streamable HTTP (Claude Code, Cursor, VS Code) or one that runs local stdio servers (Claude Desktop).
There are two ways to sign in. OAuth is the default for remote clients: the client opens ndStill's consent screen, where a person picks which agent this is and the allowance it gets. An API key works everywhere, including clients without remote MCP, through the local package @ndstill/mcp.
| Setting | Value |
|---|---|
| Server URL | https://mcp.ndstill.com/mcp |
| Test mode URL | https://mcp.ndstill.com/mcp?mode=test (simulations only) |
| OAuth metadata | https://mcp.ndstill.com/.well-known/oauth-authorization-server |
| Transport | Streamable HTTP, OAuth 2.1 with PKCE |
| Local package | npx -y @ndstill/mcp with NDSTILL_API_KEY set |
Connect your client#
Add the server
Pick your client. Each one stores the server under the name
ndstill.claude mcp add --transport http ndstill https://mcp.ndstill.com/mcpCursor reads
~/.cursor/mcp.json(all projects) or.cursor/mcp.json(one project). VS Code reads.vscode/mcp.jsonin your workspace. Claude Desktop runs the local package, so it signs in with an API key instead of OAuth.Sign in and choose the agent
In Claude Code, run
/mcp, choosendstilland sign in. Cursor shows a Login button under MCP; VS Code asks when you start the server. The ndStill consent screen then asks a person, not the agent, to decide:- which agent this client acts as (an existing one, or a new one created on the spot)
- its allowance per week or month, and the amount above which it must ask
- which funding source it may use, and when the grant expires
The person confirms with a passkey. The client receives an OAuth token scoped to that one agent, with the scopes
pay,check_budget,read_activityandrequest_approval. It can never approve its own payments or change its own limits.Check the budget
Ask the agent something like "How much can you still spend this month?" It calls
check_budgetand answers from the real windows:JSON{ "agent": { "id": "agt_01JD8Q3W6Z", "name": "Travel desk" }, "budgets": [ { "window": "month", "limit": { "amount": 50000, "asset": "USD" }, "spent": { "amount": 18250, "asset": "USD" }, "reserved": { "amount": 0, "asset": "USD" } } ], "approve_above": { "amount": 30000, "asset": "USD" } }Make a payment that needs you
Ask for something above the approval line: "Book the $540 Delta flight to SFO for Friday." The agent calls
pay:JSON{ "counterparty": "Delta Air Lines", "amount": { "amount": 54000, "asset": "USD" }, "purpose": "Flight SFO on Friday" }ndStill runs the pipeline and returns
held, with anapproval_idand the reason in plain words: "$540.00 is above the $300.00 approval line." You get the approval on your phone, in Slack or in the console. Where the client supports MCP elicitation, the agent can also show you the request in the conversation, but the decision itself always happens on your device.- Passed
- Held here
- Declined here
- Not on this rail
- Not reached
The approval threshold held it. Nothing is signed or paid until a person approves. Approve, then pay
Approve with your passkey. ndStill runs the pipeline again (approval never skips a freeze or a budget), mints a scoped credential bound to Delta, $540 and a short expiry, and the agent's next
get_approvalorget_paymentcall showsapproved. The receipt is available throughget_receipt.
What the agent can call#
The full list, with inputs and outputs, is in the MCP tool reference. The ones agents use most:
| Tool | What it does |
|---|---|
pay | Pay a counterparty within the policy and allowance. Returns approved, held (with an approval ID) or declined with reasons. |
check_budget | What's left in each budget before paying. |
simulate_payment | Dry-run a payment through the pipeline. No money moves. |
request_approval | Ask a person to approve, using MCP elicitation where the client supports it. |
get_payment / get_approval | Status of a payment or a held payment. |
pay_402 | Pass an HTTP 402 challenge (x402 or MPP) to ndStill for a decision. |
Admin tools (freeze_agent, list_approvals, approve, reject) exist for people's own clients. They need a human-scoped token and are never offered to an agent token.
Use an API key instead of OAuth#
For headless agents, CI, or clients without OAuth, create an agent-scoped key in the console under Developers, API keys, and pass it as a bearer token:
export NDSTILL_API_KEY="nds_test_…"
claude mcp add --transport http ndstill https://mcp.ndstill.com/mcp \
--header "Authorization: Bearer $NDSTILL_API_KEY"Test keys (nds_test_…) only simulate. Keep live keys out of shared config files; the console shows a key once, and you can rotate or revoke it at any time.