Skip to main content
NI

Niubiz

v0.1.0OAuth2

Adquirente de cartões dominante do Peru (ex-VisaNet, 300 mil+ lojistas). Cobranças de cartão pelo fluxo de security token.

4 ferramentas4 env vars🇵🇪 Peruestável no npm

O que seu agente faz

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_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.
Exemplo de chamada
// 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

Adicione esta entrada ao seu claude_desktop_config.json (ou a config de qualquer cliente compatível com 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>"
      }
    }
  }
}

Depois de reiniciar, seu agente pode chamar qualquer uma das 4 ferramentas abaixo — teste get_security_token primeiro.

Variáveis de ambiente · 4

Necessárias pra autenticar o server. Armazenadas criptografadas ao usar a hospedagem gerenciada da CodeSpar.

NIUBIZ_USER
obrigatóriosecret

Niubiz API user

NIUBIZ_PASSWORD
obrigatóriosecret

Niubiz API password

NIUBIZ_MERCHANT_ID
obrigatório

Merchant id (código de comercio)

NIUBIZ_ENV
opcional

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

Ferramentas disponíveis · 4

Cada ferramenta é independente — seu agente carrega só o que precisa pra reduzir contexto e tempo de resposta.

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 compatíveis

MCP é um protocolo — qualquer framework que o fale pode montar este server.

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

Perguntas frequentes

Rode `npx -y @codespar/mcp-niubiz` e adicione o bloco de config acima ao seu cliente MCP — Claude, Cursor, VS Code ou qualquer cliente compatível com MCP. Sem build, sem SDK. Prefere hospedado? O tier gerenciado da CodeSpar roda pra você, com a auth resolvida.
Niubiz — MCP server · 4 tools | CodeSpar