Peru's dominant card acquirer (ex-VisaNet, 300k+ merchants). Inbound card charges through the security-token flow.
Niubiz gives your agent 4 tools it calls directly โ pick the ones it needs, in Claude, Cursor, or any MCP client.
get_security_token โ Fetch the Niubiz API bearer token (POST /api.security/v1/security, Basic auth). Other tools fetch and cache this automatically โ call it explicitly only to verify credentials or force a refresh.create_session_token โ Create a checkout session (POST /api.ecommerce/v2/ecommerce/token/session/{merchantId}). Returns the sessionKey the Niubiz checkout form needs. Send the purchase amount and the customer's IP for antifraud scoring.authorize_transaction โ Authorize a purchase (POST /api.authorization/v3/authorization/ecommerce/{merchantId}). Pass the transactionToken the Niubiz checkout form returned after the customer entered the card, plus your purchaseNumber and the amount.// Your agent calls a tool directly โ no glue code.
// CodeSpar's managed tier handles OAuth2, token rotation and rate limits.
const result = await session.call("get_security_token", { /* ... */ });$ npm install @codespar/mcp-niubizAdd this entry to your claude_desktop_config.json (or any MCP-compatible client config).
{
"mcpServers": {
"niubiz": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-niubiz"
],
"env": {
"NIUBIZ_USER": "<your_niubiz_user>",
"NIUBIZ_PASSWORD": "<your_niubiz_password>",
"NIUBIZ_MERCHANT_ID": "<your_niubiz_merchant_id>"
}
}
}
}After restart, your agent can call any of the 4 tools below โ try get_security_token first.
Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.
NIUBIZ_USERNiubiz API user
NIUBIZ_PASSWORDNiubiz API password
NIUBIZ_MERCHANT_IDMerchant id (cรณdigo de comercio)
NIUBIZ_ENVEnvironment: 'sandbox' or 'production'. Defaults to 'sandbox'.
Each tool is independent โ your agent loads only what it needs to reduce context and response time.
get_security_tokencreate_session_tokenauthorize_transactionreverse_transactionMCP is a protocol โ any framework that speaks it can mount this server.