← MCP directory

Klarna MCP server

community

Klarna's own MCP server covers product search for shoppers, so for the merchant side Walma built klarna-mcp, open source. It reads orders, payouts, settlement transactions and disputes, and its write tools only exist when explicitly switched on.

What an agent can do

  • → Read orders, captures and refunds
  • → Sum up payouts per period and currency
  • → List settlement transactions per payout
  • → Track disputes and their deadlines
  • → Capture and refund, only behind a flag

Built against Klarna's published API reference and tested against mocked responses, but not yet verified against a live Klarna account. Run it on Klarna's playground first.

About the Klarna MCP server

klarna-mcp is a small MCP server that Walma built and released as open source under the MIT licence. It gives Claude, Cursor, Claude Code and other MCP clients access to Klarna's merchant APIs: orders, captures, refunds, payouts, settlement transactions, disputes and payment sessions. The project is unofficial, meaning it is not made, endorsed or supported by Klarna, and it runs on your own computer or server.

E-commerce and finance teams use it to see what is authorised, captured and refunded on an order and when the authorisation expires, sum up payouts per currency for a period, see which fees and returns sit inside a given payout, and list open disputes with the closest deadlines. Payout reports can be fetched as CSV and reconciled against the shop's own export.

The server only reads by default. The write tools do not even exist on the server until KLARNA_ENABLE_WRITES is set to true, and it starts against Klarna's playground until you choose production. Credentials are read from environment variables and sent only in the Authorization header, and anything that looks like a credential is removed from error messages. PDF reports, order updates, dispute responses and creating orders or payment sessions are left out on purpose.

Things to ask

  • List yesterday's payouts and the totals per currency.
  • Which disputes have a deadline this week?
  • Show the status of an order: what is captured, refunded and remaining.
  • Give me the settlement transactions behind a payout reference.

Tools the server exposes

  • get_order
  • list_captures
  • get_capture
  • get_refund
  • list_payouts
  • get_payout
  • get_payout_summary
  • list_transactions
  • get_payout_report_csv
  • get_payouts_summary_report_csv
  • list_disputes
  • get_dispute
  • get_payment_session
  • capture_order
  • refund_order
  • extend_authorization_time
  • cancel_order
  • release_remaining_authorization
GuideHow to set up Klarna MCP →

Part of these packages

Klarna is part of these Walma packages.

Questions about Klarna MCP

Does Klarna have an official MCP server?+

Klarna's own MCP server covers product search for shoppers. For the merchant side, meaning orders, payouts and disputes, Walma built klarna-mcp as open source under the MIT licence. It is unofficial and neither made nor endorsed by Klarna.

Is it read-only?+

By default, yes: 13 read tools. The five write tools (capture, refund, extend authorization, cancel, release the remaining amount) are only registered when KLARNA_ENABLE_WRITES is set to true. Without it they do not exist on the server, whatever the prompt says.

Which credentials does it need?+

An API credential from the Klarna Merchant Portal: a username and password, or a key that starts with klarna_test_api_ or klarna_live_api_. It is read from environment variables and never enters the conversation. Create a separate credential for the agent so that it can be revoked on its own.

Which clients does it work with?+

Claude Code, Claude Desktop, Cursor and other MCP clients that can start a local server. It needs Node 20 or newer and is built from GitHub, because the package is not on npm.

Has it been tested against Klarna for real?+

It is built against Klarna's published API reference and tested against mocked responses, but not yet verified against a live Klarna account. The server therefore starts in Klarna's playground by default. Run it there first.

Which Klarna regions and environments does it support?+

Three regions, chosen with KLARNA_REGION: eu (the default), na and oc. The environment is chosen with KLARNA_ENV: playground (the default) or production. Together they map to Klarna's documented hosts, for example api.klarna.com and api.playground.klarna.com for Europe. Klarna's Disputes API v4 reference lists only the EU hosts, and disputes require the merchant account to be enrolled in that API.

How are writes protected against duplicates and mistakes?+

Every write sends an idempotency key to Klarna. The tool generates one if you do not pass it and returns it in the result. Retry a failed or timed-out write with the same key and Klarna executes it at most once; Klarna keeps keys for 24 hours. Tools that move money or cannot be undone are marked destructive, so clients that honour the annotation ask before running them.

Missing a connection?

We build and review MCP servers for teams that need them, and run them behind the same policy and log as the rest of the gateway.