# Stark Bank MCP

> Stark Bank MCP Server connects your AI agent to Brazil's enterprise financial systems. It automates corporate payments—sending Pix transfers, generating virtual cards, and creating Boletos—directly inside chats. Check balances, pull full statements, and manage high-volume payables without needing manual API calls or filesystem access.

## Overview
- **Category:** money-moves
- **Price:** Free
- **Tags:** corporate-banking, pix-transfers, ecdsa-cryptography, financial-automation, virtual-cards, api-banking

## Description

Listen up. The Stark Bank MCP Server puts Brazil's whole enterprise financial stack right into your agent's context. You don't gotta mess with manual API calls or file systems to run corporate payments anymore. It handles complex money moves—sending payroll, generating invoices, pulling statements—all directly inside the chat window.

When you connect this server, your AI client gets nine specific tools that let you manage high-volume payables and assets like a pro. You can check real-time account status with `stark_get_balance`, which gives you the current total monetary balance available in your Stark bank account. If you need a deep dive into cash flow history, run `stark_get_statement` to pull a detailed, raw JSON statement of all activity.

To pay people or suppliers, you initiate transfers with `stark_create_transfer`. This handles both TED and Pix payments using structured payment codes. If you need to track where those funds went after they left your account, use `stark_list_transfers` to discover the tracking status of all outgoing payment moves.

Need to charge a customer or pay an employee? You can build an immediate, dynamic Pix charge request right away using `stark_create_pix_charge`. To keep tabs on those charges, run `stark_list_pix_charges` for a history log. For invoicing purposes, you'll want to use `stark_create_boleto`, which generates a batch of official bank Boletos. You can then check the accounting progress and current status of those generated invoices with `stark_list_boletos`. 

On the asset side, you got two key tools. If you need to issue payable invoices for specific accounts, generating a Boleto is your move. But if you gotta create new corporate spending power, use `stark_create_corporate_card` to instantly generate a virtual Corporate Credit Card using enterprise tech.

To track all the money moving through your system, remember that `stark_list_transfers` tracks payments sent out, while `stark_list_pix_charges` tracks charges built. Basically, you're managing every step: from checking your balance with `stark_get_balance`, pulling full history with `stark_get_statement`, running the transfer via `stark_create_transfer`, and finally verifying everything with these list tools.

## Tools

### stark_create_boleto
Generates a batch of official bank Boletos for invoicing purposes.

### stark_create_corporate_card
Creates a new virtual Corporate Credit Card instantly using enterprise technology.

### stark_create_pix_charge
Builds an immediate, dynamic Pix charge request from the Stark Bank system.

### stark_create_transfer
Initiates payment transfers (TED or Pix) to suppliers or employees.

### stark_get_balance
Checks the current total monetary balance available in your bank account.

### stark_get_statement
Pulls a detailed, raw JSON statement of all cash flow activity.

### stark_list_boletos
Lists the accounting progression and current status of generated Boletos.

### stark_list_pix_charges
Retrieves a history log of all created Pix charges.

### stark_list_transfers
Discovers the tracking status of completed outgoing payment transfers.

## Prompt Examples

**Prompt:** 
```
Generate a dynamic Corporate Card on Stark Bank named 'Google Cloud Pay' for my team.
```

**Response:** 
```
Processing instruction inside Stark ecosystem. Success! A Corporate Card 'Google Cloud Pay' was successfully created on-chain and registered to your active corporate boundary logic.
```

**Prompt:** 
```
Extract the detailed historical stark statements spanning from March 1st to March 15th to examine payroll expenditures.
```

**Response:** 
```
I've pulled the 15-day range JSON history. Total observed movements: 21 lines. The main outbound expenditures matched transfers made using out_bound Pix.
```

**Prompt:** 
```
Create a Boleto for 500 BRL to CPF 000101111909. It must expire 10 days from today.
```

**Response:** 
```
Boleto initialized inside Stark Bank batch array successfully under the desired CPF target. Check the array payload internally or export the barcode now.
```

## Capabilities

### Initiate Payments
Sends corporate transfers (TED/Pix) to designated recipients or suppliers using structured payment codes.

### Issue Financial Assets
Creates new virtual Corporate Cards or generates payable invoices (Boletos) for specific customer accounts.

### Check Account Status
Retrieves the current, real-time monetary balance and detailed financial statements from your Stark account.

### List Payment History
Pulls structured lists showing payment tracking for outgoing transfers or issued Pix charges.

## Use Cases

### Running Monthly Payroll
The CFO needs to pay 300 employees. Instead of pulling a massive CSV and running it through the banking portal, they simply prompt their agent: 'Send payroll for all workers using `stark_create_transfer`.' The agent parses the worker list and executes hundreds of payments in one flow.

### Vendor Onboarding
A new vendor needs to be paid. Instead of emailing a finance team and waiting for an invoice, the Ops Analyst asks the agent: 'Create a payable Boleto for Vendor X.' The agent runs `stark_create_boleto`, and the necessary payment asset is generated immediately.

### Immediate Hardware Upgrade
The team needs to buy new server racks and the card limit is low. Instead of finding a human who can manually rotate the card, the agent runs `stark_create_corporate_card` with elevated limits, allowing immediate purchases.

### Daily Reconciliation
The finance team needs to know if yesterday's payments cleared. They prompt: 'Check all outgoing transfers and Pix charges.' The agent uses `stark_list_transfers` and `stark_list_pix_charges` together, giving a unified status report.

## Benefits

- Execute high-volume payroll transfers with `stark_create_transfer`. Instead of batch file uploads or manual console runs, your agent just needs to know the recipients, and it handles the execution.
- Generate virtual cards instantly using `stark_create_corporate_card`. You can tell your AI client: 'Make a card for Cloud Services,' and it outputs the required asset immediately.
- Audit finances faster with `stark_get_statement`. Pulling a detailed, raw JSON statement eliminates spending time on multiple banking portals. Everything is in one structured dump.
- Manage payment invoicing using `stark_create_boleto` and `stark_list_boletos`. You can programmatically issue an invoice, then check its status later without logging into the web portal.
- Gain visibility into every transaction with history tools like `stark_list_pix_charges` and `stark_list_transfers`. Your agent knows exactly where those payments landed.

## How It Works

The bottom line is: Your AI agent connects via secure cryptographic keys and executes complex banking functions without needing direct UI interaction.

1. First, you use your Stark Bank Dashboard to retrieve a `Project ID`.
2. Next, generate an `ECDSA Private/Public Key` pair in the bank's API settings and paste the raw private key into your MCP credentials.
3. Finally, your AI client invokes a tool (e.g., `stark_create_transfer`), which uses the secured credential to execute the payment or query.

## Frequently Asked Questions

**How do I securely pass the Stark Bank ECDSA Private Key to MCP?**
Inside Stark Bank, when you generate your API project, the website will generate a Public/Private Keypair or ask you to provide one. You must grab the **Private Key** (often starting with `-----BEGIN EC PRIVATE KEY-----`) and paste that entire raw multiline text into the `STARK_PRIVATE_KEY` input inside the MCP client perfectly as it is.

**Can the bot process Corporate Card requests automatically?**
Yes! If you instruct the agent to orchestrate the generation using the tool `stark_create_corporate_card`, the API instantly spins up a valid, active Corporate Virtual Card attached to your Master Balance in real-time.

**How does the Stark Bank transfer function differ from basic gateway Pix?**
Stark Transfer allows hyper granular outbounds. Instead of just pushing a basic Pix key, the `stark_create_transfer` can route massive payrolls, TED systems tracking `BankCode`, ISPB nodes and branch validation—giving you raw underlying banking protocol access.

**Will Stark API throttle the connection if the Agent lists too many historic Boletos?**
StarkBank allows huge enterprise-grade API ceilings per second. Pulling hundreds of statements using `stark_list_boletos` naturally respects rate limits easily while functioning inside LLM chat turns.

**How do I specify the date range when using `stark_get_statement`?**
You must pass a start and end timestamp for accurate data retrieval. The function accepts structured parameters defining the cash flow window you want to analyze. This gives you a detailed, raw JSON export of all movements—deposits, withdrawals, transfers—within that exact period.

**If `stark_create_transfer` fails, how do I identify the failure reason?**
The MCP returns specific error codes and messages detailing the failure. Most common issues include insufficient funds or invalid recipient identifiers (e.g., wrong bank code). Always check the returned payload for an 'error' key before assuming a payment failed entirely.

**Does `stark_create_boleto` support batch processing for multiple recipients?**
Yes, it is designed to handle arrays of data. You provide the full list of required payees and amounts in a single payload. This lets your agent automate mass payroll or billing cycles efficiently.

**What is the primary use case for `stark_create_pix_charge`?**
This tool generates dynamic, immediate payment charges rather than initiating a direct transfer. You use it when you need to bill a customer or create an outstanding invoice link that must be paid later.