For coding agents
Agents (MCP)
Grip Rails comes with an MCP server so your coding agent (Claude Code, Cursor, Claude Desktop or any MCP client) can integrate against the sandbox: it operates the API, helps you write the integration and explains why something fails.
What it does
- It operates the API. One tool per operation in the contract, with its schema as is. Every response starts with a readable line, with amounts in pesos, and carries the
FCM-Request-Id. - It helps you build the integration. It searches this documentation, gives you the official request-signing and webhook-verification examples, and brings guided commands to integrate, walk through the sandbox and prepare for production.
- It diagnoses. It checks the signature your code builds and tells you which part is wrong, verifies webhooks, checks your configuration and waits for the result of a transfer for you.
Guarantees
- Sandbox only. It talks to
https://empresas-sandbox.fcmpayments.com. It does not start with the production URL or with anfcm_live_…API key. - Your keys never leave your machine. It runs locally and every request is signed there (RFC 9421). The API key travels only to the sandbox.
- Safe retries. Writes that move money or change state require an
idempotency_key: if the connection drops, the agent retries with the same key and the API returns the same response. Nothing is ever paid twice. - No secrets in responses. The API key and private keys are masked in everything the server returns.
Access
The @grip-labs/rails-mcp package is in early access for integrators with an active sandbox: ask your contact at Grip Rails for it. It is delivered as a file with its SHA-256 fingerprint and installed with the pinned dependency tree (Node 22 or later):
shasum -a 256 grip-labs-rails-mcp-<version>.tgz # must match the fingerprint we sent you
mkdir -m 700 grip-rails-mcp
tar -xzf grip-labs-rails-mcp-<version>.tgz -C grip-rails-mcp
cd grip-rails-mcp/package
cp npm-shrinkwrap.json package-lock.json # installs exactly the pinned tree
npm ci --omit=dev --ignore-scripts --no-audit --no-fund
node dist/main.js --helpCreate your sandbox in seconds
No need to ask us for credentials: the MCP sets up a new test entity in the sandbox, with its accounts and two CVUs (Argentine virtual account numbers). From the terminal:
node /absolute/path/grip-rails-mcp/package/dist/main.js init --altaIt generates your Ed25519 signing key pair in ~/.grip-rails/ (the private key with 0600 permissions), creates the entity with a request signed with your key, stores the API key and your key id in ~/.grip-rails/config.json (also 0600) and confirms it. At the end it shows the entity, the CVUs and the exact command to connect the MCP, with no variables needed. With --nombre "…" you give the entity a name. If something is interrupted, run it again: it resumes where it left off, with the same keys.
Or from the agent, without a terminal: connect the MCP without credentials (the first command in Connect it) and ask it to “create my sandbox”. Without credentials it starts in setup mode, with the documentation, the examples, rails_check_setup and rails_create_sandbox, which does the same as init --alta; when it finishes, the MCP switches to full mode without restarting.
Connect it
If you created your sandbox with init --alta, the credentials are already in ~/.grip-rails/config.json and no variables are needed. In Claude Code:
claude mcp add grip-rails -- node /absolute/path/grip-rails-mcp/package/dist/main.jsIf you already have sandbox credentials, pass them as variables: the fcm_test_… API key, the keyid (ck_…) of your registered public key and the path to your private key, never the pasted PEM:
claude mcp add grip-rails \
-e GRIP_RAILS_API_KEY=fcm_test_… \
-e GRIP_RAILS_KEY_ID=ck_… \
-e GRIP_RAILS_SIGNING_KEY=/path/to/your-private-key.pem \
-- node /absolute/path/grip-rails-mcp/package/dist/main.jsIt stays in your local configuration. Do not use --scope project with the API key: it would end up written in the repository's .mcp.json.
In Cursor (~/.cursor/mcp.json) or Claude Desktop (claude_desktop_config.json). With config.json, leave out the env block:
{
"mcpServers": {
"grip-rails": {
"command": "node",
"args": ["/absolute/path/grip-rails-mcp/package/dist/main.js"],
"env": {
"GRIP_RAILS_API_KEY": "fcm_test_…",
"GRIP_RAILS_KEY_ID": "ck_…",
"GRIP_RAILS_SIGNING_KEY": "/path/to/your-private-key.pem"
}
}
}
}First test
Ask the agent: “run rails_check_setup”. It answers listo with your entity, the clock skew and the API version. Then try a guided command.
Tools
One per API operation, with the names and schemas of the contract:
| Group | Tools |
|---|---|
| Entity and accounts | rails_get_entity, rails_list_accounts, rails_get_account, rails_list_account_numbers, rails_get_account_number |
| Outgoing transfers | rails_create_counterparty_validation, rails_create_outgoing_transfer, rails_list_outgoing_transfers, rails_get_outgoing_transfer |
| Incoming credits | rails_list_incoming_transfers, rails_get_incoming_transfer |
| Events and idempotency | rails_list_events, rails_get_event, rails_get_idempotency_key, rails_get_jwks |
| Simulators (sandbox only) | rails_simulate_incoming_transfer, rails_simulate_rail_result, rails_simulate_late_settlement_review, rails_get_sandbox_clock, rails_advance_sandbox_clock |
And eight helper tools:
| Tool | What it does |
|---|---|
rails_check_setup | Checks your configuration: credentials, clock skew, registered key and API version. If something fails, it says what and how to fix it. |
rails_search_docs, rails_read_doc | Search and read this documentation, with the link to each section. |
rails_get_code_example | The official request-signing and webhook-verification examples, in TypeScript, Python and Go. |
rails_check_signature | You give it the request your code signed and it tells you which part of the signature is wrong: components, Content-Digest, created, keyid. |
rails_verify_webhook | Verifies a received webhook against the JWKS and explains each check. |
rails_wait_for_outgoing_transfer, rails_wait_for_events | Wait for the final state of a transfer or for new events, without polling by hand. |
Without credentials, there is also rails_create_sandbox: see Create your sandbox in seconds.
Guided commands
They are MCP prompts; in Claude Code they show up with /.
| Command | What it does |
|---|---|
integrar | A guide to integrate Grip Rails into your code: signing with the official example, persisted idempotency, reconciliation by sequence and verified webhooks. It accepts the language. |
recorrido_sandbox | The full sandbox walkthrough: incoming credit, counterparty validation, outgoing transfer, the failure paths (amounts ending in …13, …70 and …99) and the late settlement. |
checklist_produccion | What you need to have sorted out before requesting production. |
Coming soon
- One-line installation from npm.