mcp-nexi-pos-api
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-nexi-pos-apiTake a payment of 100 SEK for order-1001"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-nexi-pos-api
MVP MCP server for Nexi POS payment operations.
It provides tools to create purchases and refunds, poll payment state, confirm transactions, and recover unconfirmed transactions.
Setup
From npm package
npm install -g mcp-nexi-pos-api
mcp-nexi-pos-apiFrom source
npm install
npm run build
npm startCreate a local .env file:
NEXI_POS_API_KEY_ID=your-api-key-id
NEXI_POS_API_KEY_SECRET=your-api-key-secret
NEXI_POS_BASE_URL=https://api.sandbox.npay.eu/pos/v1
NEXI_POS_DEFAULT_CURRENCY=SEK
NEXI_POS_MAX_AMOUNT_MINOR=500
NEXI_POS_USER_AGENT=mcp-nexi-pos-api/0.1.0
NEXI_POS_STORAGE_PATH=./data/nexi-pos.sqliteRelated MCP server: paymongo-mcp
Environment variables
Variable | Description | Default |
| Nexi Basic Auth username. | Required |
| Nexi Basic Auth password. | Required |
| Nexi POS API base URL. |
|
| Currency used when a tool omits |
|
| Safety limit in minor units. |
|
| User agent sent to Nexi. |
|
| SQLite file for local recovery state. |
|
Claude Desktop config
Example for a global npm install:
{
"mcpServers": {
"nexi-pos": {
"command": "mcp-nexi-pos-api",
"env": {
"NEXI_POS_API_KEY_ID": "your-api-key-id",
"NEXI_POS_API_KEY_SECRET": "your-api-key-secret",
"NEXI_POS_BASE_URL": "https://api.sandbox.npay.eu/pos/v1",
"NEXI_POS_DEFAULT_CURRENCY": "SEK",
"NEXI_POS_MAX_AMOUNT_MINOR": "500",
"NEXI_POS_STORAGE_PATH": "/absolute/path/to/data/nexi-pos.sqlite"
}
}
}
}Example from source:
{
"mcpServers": {
"nexi-pos": {
"command": "node",
"args": ["/absolute/path/to/mcp-nexi-pos-api/dist/index.js"],
"env": {
"NEXI_POS_API_KEY_ID": "your-api-key-id",
"NEXI_POS_API_KEY_SECRET": "your-api-key-secret"
}
}
}
}Amount format
All amounts are integers in ISO 4217 minor units. Do not send floating point values.
Examples:
SEK 1.00=100EUR 1.00=100JPY 1=1
The default max amount is 500, meaning SEK/EUR 5.00. Set NEXI_POS_MAX_AMOUNT_MINOR to a value that matches your test or production needs.
Tools
set_terminal_id- store a terminal ID for this MCP server session.get_session_terminal_id- show the current session terminal ID.clear_terminal_id- clear the session terminal ID.create_purchase- low-level purchase call.take_payment- high-level purchase helper that repeats while Nexi returnsPROCESSING.create_refund- low-level refund call.confirm_transaction- confirm a purchase or refund result.get_transaction- fetch a transaction byexternal_idand terminal.get_unconfirmed_transactions- list unconfirmed transactions for a terminal.
All tool responses use this JSON shape:
{
"ok": true,
"operation": "take_payment",
"terminal_id": "terminal-1",
"external_id": "order-123",
"state": "AWAITING_CONFIRM",
"result_code": "SUCCESS",
"result_description": "Approved",
"success": true,
"message": "Payment flow stopped at terminal/current state",
"transaction": {},
"raw": {}
}ok means the MCP/API call was handled. It does not always mean the card payment succeeded. success is true only when result_code is SUCCESS.
Payment flow
Set the terminal ID once:
{ "terminal_id": "YOUR_TERMINAL_ID" }Start a payment:
{
"external_id": "order-1001",
"requested_amount": 100,
"currency": "SEK"
}For most clients, use take_payment. It calls Nexi purchase repeatedly while the state is PROCESSING, until the total timeout_seconds is reached or Nexi returns a later state such as AWAITING_CONFIRM, CONFIRMED, or COMMITTED.
If the timeout is reached while the transaction is still PROCESSING, the response includes external_id, terminal_id, and the latest state. You can later call get_transaction or call take_payment again with the same identifiers.
Confirmation
This MVP does not confirm by default.
When a transaction reaches AWAITING_CONFIRM, call confirm_transaction:
{
"external_id": "order-1001",
"result_code": "SUCCESS"
}You can also let take_payment confirm automatically:
{
"external_id": "order-1002",
"requested_amount": 100,
"auto_confirm": true
}Use auto_confirm only when your business flow is ready to accept the transaction result immediately.
SQLite storage and recovery
The server stores payment-relevant state in SQLite at NEXI_POS_STORAGE_PATH.
Stored data includes:
external ID
terminal ID
transaction type
currency
requested amount
state
result code and description
confirmation flag
timestamps
redacted raw transaction JSON
API credentials are never stored. Card-related fields should be redacted by the storage/client layer.
Recovery workflow after a restart:
Call
set_terminal_idif the session terminal ID was lost.Call
get_transactionwith the knownexternal_id.Call
get_unconfirmed_transactionsfor the terminal.If needed, call
confirm_transactionwith the correctresult_code.
SQLite improves recovery, but it is not a full production operations system. Keep your own order records and reconcile with Nexi when needed.
Simulator amount examples
Use small minor-unit amounts during simulator testing, for example:
100for SEK1.00200for SEK2.00500for SEK5.00
Keep NEXI_POS_MAX_AMOUNT_MINOR low in test environments to avoid accidental large payments.
Implementation notes for integration
The MCP tool layer expects these core modules to exist:
src/config.tsexportinggetConfig()with API, currency, max amount, and storage path settings.src/nexi-client.tsexportingNexiClientwithpurchase,refund,confirm,getTransaction, andgetUnconfirmedTransactionsmethods.src/storage/sqlite-store.tsexportingSQLiteStorewithsaveIntent,updateTransaction, andmarkConfirmedmethods.
These modules are intentionally separate from the MCP tool code so the API client and storage can be tested independently.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Knoseman/mcp-nexi-pos-api'
If you have feedback or need assistance with the MCP directory API, please join our Discord server