mcpField
M
mcp-stp-spei

mcp-stp-spei

Local
github.com/codesparFinance275Updated 4w ago

About mcp-stp-spei

mcp-stp-spei is an MCP server for Mexico's STP/SPEI instant bank transfer system, aimed at developers who want agents to handle transfers, balances and reconciliation. It is an alpha release and its endpoint paths have not been fully validated against the live service.

Key features

  1. 0118 tools covering SPEI operations
  2. 02Transfer creation, lookup, cancellation and refunds
  3. 03CLABE account validation, both local and online
  4. 04Balance queries and reconciliation reports
  5. 05Webhook registration and management

Use cases

  1. 01Initiating and tracking SPEI transfers from an agent
  2. 02Reconciling received and sent orders by date
  3. 03Validating a receiving CLABE account before transfer

MCP support

This project is an MCP server that exposes STP/SPEI transfer, balance, bank and webhook tools to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"codespar-mcp-stp-spei": {
"command": "npx",
"args": [
"-y",
"@codespar/mcp-stp-spei"
],
"env": {
"STP_API_KEY": "<STP_API_KEY>",
"STP_COMPANY": "<STP_COMPANY>"
}
}
}
}
Run commandnpx -y @codespar/mcp-stp-spei
Environment variables to set
STP_API_KEYSecretAPI key for STP
STP_COMPANYCompany identifier for STP

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@codespar/mcp-stp-spei0.2.0-alpha.3

Tools

18

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
amountnumberYesTransfer amount in MXN
conceptstringYesTransfer concept/description
referencestringYesNumeric reference (up to 7 digits)
sender_rfcstringNoSender RFC
sender_namestringNoSender name
sender_clabestringNoSender CLABE account
beneficiary_rfcstringNoBeneficiary RFC (tax ID)
beneficiary_namestringYesBeneficiary name
beneficiary_clabestringYesBeneficiary CLABE (18 digits)

Details

From the project README

MCP STP/SPEI

Alpha release — published under the alpha npm dist-tag. Endpoint paths follow public docs and BACEN/provider conventions but have not been fully live-validated. Pin exact versions during 0.x.x-alpha. Install with npm install <pkg>@alpha.

MCP server for STP/SPEI — Mexican instant bank transfer system (equivalent to Brazil's PIX).

Quick Start

# Set your credentials
export STP_API_KEY="your-api-key"
export STP_COMPANY="your-company-id"

# Run via stdio
npx tsx packages/mexico/stp-spei/src/index.ts

# Run via HTTP
npx tsx packages/mexico/stp-spei/src/index.ts --http

Environment Variables

VariableRequiredDescription
STP_API_KEYYesAPI key from STP
STP_COMPANYYesCompany identifier
MCP_HTTPNoSet to "true" to enable HTTP transport
MCP_PORTNoHTTP port (default: 3000)

Tools (18)

ToolPurpose
create_transferCreate a SPEI transfer
get_transferGet transfer details by ID
list_transfersList transfers with filters
cancel_transferCancel a pending SPEI orden by clave_rastreo (only works while orden is pending)
get_balanceGet account balance
list_account_balancesList balances for all company accounts
validate_accountValidate a CLABE account number against the receiving bank (online check)
validate_clabeValidate CLABE structure and checksum locally (no API call).
list_banksList participating SPEI banks
lookup_bank_by_codeLook up a participating bank by its ABM/SPEI code (first 3 digits of CLABE)
get_cepGet CEP (Comprobante Electronico de Pago) for transfer validation
register_beneficiaryRegister a beneficiary account
create_refundCreate a SPEI refund/devolución for a previously received transfer
list_refundsList devoluciones (refunds) by date range
conciliation_reportGet transactions reconciliation report by date (all received + sent ordenes)
register_webhookRegister a webhook URL to receive STP event notifications
list_webhooksList registered webhooks for the company
delete_webhookDelete a registered webhook by ID

Auth

Uses API key + digital signature authentication. The API key is sent as a Bearer token, and the company identifier is included in requests. Obtain credentials from STP.

API Reference


Enterprise

Need governance, budget limits, and audit trails for agent payments? CodeSpar Enterprise adds policy engine, payment routing, and compliance templates on top of these MCP servers.

Authentication

Set these environment variables before launching the server:

  • STP_API_KEY (required, secret) — API key for STP
  • STP_COMPANY (required) — Company identifier for STP

Issue credentials at the provider's developer portal: https://stpmex.com/docs.

License

MIT

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.