Skip to main content
NI

Niubiz

v0.1.0OAuth2

Adquirente de tarjetas dominante de Perú (ex-VisaNet, 300 mil+ comercios). Cobros con tarjeta mediante el flujo de security token.

4 herramientas4 env vars🇵🇪 Perúestable en npm

Qué puede hacer tu agente

Niubiz le da a tu agente 4 tools que llama directo — elegí las que necesite, en Claude, Cursor o cualquier cliente MCP.

  • get_security_tokenFetch 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_tokenCreate 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_transactionAuthorize 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.
Ejemplo de llamada
// 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", { /* ... */ });

Instalar

terminal
$ npm install @codespar/mcp-niubiz

Quickstart

Agregá esta entrada a tu claude_desktop_config.json (o a la config de cualquier cliente compatible con MCP).

claude_desktop_config.json
{
  "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>"
      }
    }
  }
}

Después de reiniciar, tu agente puede llamar cualquiera de las 4 herramientas de abajo — probá get_security_token primero.

Variables de entorno · 4

Necesarias para autenticar el server. Almacenadas cifradas al usar el hosting gestionado de CodeSpar.

NIUBIZ_USER
obligatoriosecret

Niubiz API user

NIUBIZ_PASSWORD
obligatoriosecret

Niubiz API password

NIUBIZ_MERCHANT_ID
obligatorio

Merchant id (código de comercio)

NIUBIZ_ENV
opcional

Environment: 'sandbox' or 'production'. Defaults to 'sandbox'.

Herramientas disponibles · 4

Cada herramienta es independiente — tu agente carga solo lo que necesita para reducir contexto y tiempo de respuesta.

READget_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.
WRITEcreate_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.
WRITEauthorize_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.
DELETEreverse_transaction
Reverse (void) an authorization (POST /api.authorization/v3/reverse/ecommerce/{merchantId}). Same-day undo of an authorized transaction by transactionId or purchaseNumber.

Frameworks compatibles

MCP es un protocolo — cualquier framework que lo hable puede montar este server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Cualquier cliente MCPProtocolo

Preguntas frecuentes

Corré `npx -y @codespar/mcp-niubiz` y agregá el bloque de config de arriba a tu cliente MCP — Claude, Cursor, VS Code o cualquier cliente compatible con MCP. Sin build, sin SDK. ¿Preferís hosted? El tier gestionado de CodeSpar lo corre por vos, con la auth resuelta.
Niubiz — MCP server · 4 tools | CodeSpar