MCP server¶
@oura/mcp · source
The Oura MCP server lets AI agents such as Claude Code, Claude Desktop and Cursor work with Oura for you. They can add Oura checkout to your app, create test payments, debug webhooks and answer questions like "how much came in through Khalti this week?"
What an agent can do depends on the key you give it.
| Key | What the agent gets |
|---|---|
sk_test_… |
Every read tool, plus create_test_payment and cancel_test_payment (sandbox, no real money) |
sk_live_… |
Read-only. No tool that changes anything is even registered. |
The Oura API enforces the same boundary on the server, so a test key can never touch live data.
Set up¶
Build the server:
Then add it to your MCP client. For Claude Code, create .mcp.json in your project:
{
"mcpServers": {
"oura": {
"command": "node",
"args": ["/path/to/oura-mcp/dist/index.js"],
"env": {
"OURA_API_KEY": "sk_test_..."
}
}
}
}
OURA_API_URL is optional and defaults to https://api.ourapayment.com. Plain http is only allowed for
localhost. The server won't start with a malformed key.
Tools¶
Build your integration
get_integration_guide(platform): returns the official integration guide for Next.js, Node/Express, React, Python or plain REST, so "add Oura checkout to my app" produces correct code.
Test payments (test key only)
create_test_payment,cancel_test_paymentget_payment: check a payment's status
Debug webhooks
get_webhook_configlist_webhook_deliveries: delivery status, attempts, retry schedule and the payload sent. Filter bypayment_idto trace one payment.
Your data
list_transactions: filter by status, method and dateget_payment_volume: totals by rail and periodget_merchant_profilelist_payment_methods
All amounts are integer paisa.
Try it¶
Add Oura checkout to this Next.js app with eSewa and Khalti, and verify the webhook.
Create a NPR 500 test payment and tell me when it succeeds.
Why didn't my webhook for pay_8Kq2xV arrive?
Security¶
- The API key is read only from the
OURA_API_KEYenvironment variable. It's never accepted as a tool argument and never shown in output or errors, so it can't end up in the conversation. - Live keys get read-only tools. Tools that change anything exist only in test mode.
- No tool can read your webhook signing secret or change your webhook URL. Those are dashboard-only.
- IDs are validated and URL-encoded, redirects are refused, requests time out after 15 seconds, and no tool fetches arbitrary URLs.