# mcp-stp-spei

An MCP server for Mexican STP/SPEI payments, with transfer, balance, refund, and webhook tools. It connects an agent to the STP API.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 274
- Author: codespar
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/codespar/mcp-dev-latam/tree/HEAD/packages/mexico/stp-spei
- Updated: 2026-09-27
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-stp-spei

## What it does

\`mcp-stp-spei` gives an agent access to STP/SPEI operations in Mexico. Its 18 tools can create, inspect, list, and cancel pending transfers, read balances, register beneficiaries, issue refunds, and retrieve CEP records. It also provides transaction reconciliation reports.

The server separates local CLABE checks from online account validation. Other tools cover participating banks, webhook registration, webhook listing, and webhook removal. Authentication uses an API key together with a digital signature, while the company identifier is sent with requests. The server will not start without `STP_API_KEY` and `STP_COMPANY`.

This is an alpha release, and its endpoint paths have not been fully live-validated. It can run over stdio or HTTP; HTTP mode uses `MCP_HTTP="true"` and `MCP_PORT`.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `STP_API_KEY`, `STP_COMPANY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mcp-stp-spei -e STP_API_KEY=<STP_API_KEY> -e STP_COMPANY=<STP_COMPANY> -- npx -y @codespar/mcp-stp-spei
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add stp-spei --env STP_API_KEY=<STP_API_KEY> --env STP_COMPANY=<STP_COMPANY> -- npx -y @codespar/mcp-stp-spei
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "stp-spei": {
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-stp-spei"
            ],
            "env": {
                "STP_API_KEY": "<STP_API_KEY>",
                "STP_COMPANY": "<STP_COMPANY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "stp-spei": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@codespar/mcp-stp-spei"
            ],
            "env": {
                "STP_API_KEY": "<STP_API_KEY>",
                "STP_COMPANY": "<STP_COMPANY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e STP_API_KEY=<STP_API_KEY> -e STP_COMPANY=<STP_COMPANY> stp-spei npx -y @codespar/mcp-stp-spei
```
Replace <…> with your own values

## When to use it
- create a SPEI transfer
- retrieve transfer details by ID
- check a CLABE with the receiving bank
- build a reconciliation report
- register an STP event webhook

## Example prompts
- Create a SPEI transfer and return its ID.
- Check this CLABE online with the receiving bank.
- Generate a reconciliation report for sent and received orders on a given date.

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24242
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18727
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9366
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7506

From the same set: [codespar/mcp-dev-latam](https://affpapa.org/en/nevibecode/by/codespar/mcp-dev-latam.md) — 124 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
