Skip to main content
MA

Malga

v0.1.0API Key

serverData.malga.description

24 tools3 env varsπŸ‡§πŸ‡· Brazilstable on npm

What your agent can do

Malga gives your agent 24 tools it calls directly β€” pick the ones it needs, in Claude, Cursor, or any MCP client.

  • create_charge β€” Create a new charge in Malga. Supports credit card (one-shot or saved), token, Pix, and boleto. The `capture` field defaults to `false` in the API β€” pass `true` for automatic capture. SANDBOX antifraud β€” the last digit of the document in fraudAnalysis determines the status: 0 = Pending | 1 = Approved | 2 = Failed | other = Rejected. Use get_sandbox_guide for all simulation rules.
  • get_charge β€” Get charge details by ID.
  • list_charges β€” List charges with optional filters.
Example call
// 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("create_charge", { /* ... */ });

Install

terminal
$ npm install @codespar/mcp-malga

Quickstart

Add this entry to your claude_desktop_config.json (or any MCP-compatible client config).

claude_desktop_config.json
{
  "mcpServers": {
    "malga": {
      "command": "npx",
      "args": [
        "-y",
        "@codespar/mcp-malga"
      ],
      "env": {
        "MALGA_CLIENT_ID": "<your_malga_client_id>",
        "MALGA_API_KEY": "<your_malga_api_key>"
      }
    }
  }
}

After restart, your agent can call any of the 24 tools below β€” try create_charge first.

Environment variables Β· 3

Required to authenticate the server. Stored encrypted when using CodeSpar managed hosting.

MALGA_CLIENT_ID
required

Tenant identifier sent as X-Client-Id header on every request.

MALGA_API_KEY
requiredsecret

Secret key sent as X-Api-Key header on every request.

MALGA_SANDBOX
optional

Defaults to sandbox (https://sandbox-api.malga.io). Set to "false" for production (https://api.malga.io).

Available tools Β· 24

Each tool is independent β€” your agent loads only what it needs to reduce context and response time.

WRITEcreate_charge
Create a new charge in Malga. Supports credit card (one-shot or saved), token, Pix, and boleto. The `capture` field defaults to `false` in the API β€” pass `true` for automatic capture. SANDBOX antifraud β€” the last digit of the document in fraudAnalysis determines the status: 0 = Pending | 1 = Approved | 2 = Failed | other = Rejected. Use get_sandbox_guide for all simulation rules.
WRITEget_charge
Get charge details by ID.
WRITElist_charges
List charges with optional filters.
WRITEcapture_charge
Capture a pre-authorized charge (created with capture: false). If amount is omitted, uses the full charge amount.
DELETErefund_charge
Void/refund an authorized or captured charge. If amount is omitted, uses the full charge amount.
WRITEcreate_customer
Create a new customer in Malga. Email and document are unique per account.
READget_customer
Get customer details by ID.
READlist_customers
List customers with optional pagination.

Compatible frameworks

MCP is a protocol β€” any framework that speaks it can mount this server.

Claude Agent SDKAnthropic
OpenAI AgentsOpenAI
Vercel AI SDKVercel
LangChainLangChain
LlamaIndexLlamaIndex
CrewAICrewAI
MastraMastra
Any MCP clientProtocol

Frequently asked questions

Run `npx -y @codespar/mcp-malga` and add the config block above to your MCP client β€” Claude, Cursor, VS Code, or any MCP-compatible client. No build step, no SDK required. Prefer hosted? CodeSpar's managed tier runs it for you with auth handled.
Malga β€” MCP server Β· 24 tools | CodeSpar