Adquirente de cartões dominante do Peru (ex-VisaNet, 300 mil+ lojistas). Cobranças de cartão pelo fluxo de security token.
O Niubiz dá ao seu agente 4 tools que ele chama direto — escolha as que precisar, no Claude, Cursor ou qualquer cliente MCP.
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-niubizAdicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com MCP).
{
"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>"
}
}
}
}Depois de reiniciar, seu agente pode chamar qualquer uma das 4 ferramentas abaixo — teste get_security_token primeiro.
Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.
NIUBIZ_USERNiubiz API user
NIUBIZ_PASSWORDNiubiz API password
NIUBIZ_MERCHANT_IDMerchant id (código de comercio)
NIUBIZ_ENVEnvironment: 'sandbox' or 'production'. Defaults to 'sandbox'.
Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.
get_security_tokencreate_session_tokenauthorize_transactionreverse_transactionMCP é um protocolo — qualquer framework que o fale pode montar este server.