Package Exports
- @railslab/mcp
- @railslab/mcp/local
Readme
@railslab/mcp
MCP server for Rails Lab — connect Claude Code, Claude Desktop, and Cursor to agent payments natively via Model Context Protocol.
Quick Setup
npx @railslab/mcp setupThis walks you through an interactive setup — wallet key, daily budget — and writes the MCP config to ~/.claude/settings.json automatically. Restart Claude Code and try: "check my budget".
Manual Configuration
Add to ~/.claude/settings.json:
{
"mcpServers": {
"rails-lab": {
"command": "npx",
"args": ["@railslab/mcp"],
"env": {
"LEET_API_KEY": "<your-key>",
"LEET_API_URL": "https://<your-server-url>"
}
}
}
}Available Tools
| Tool | Description |
|---|---|
pay |
Execute a payment with budget and policy enforcement |
check_budget |
Check your agent's current budget status and remaining spend |
get_policies |
List all policies that apply to your agent |
list_transactions |
List your agent's past transactions |
get_spend_summary |
Get aggregated spend data for a time period |
get_health |
Check Rails Lab system status and available protocols |
How It Works
The package runs as a stdio MCP server that Claude spawns as a subprocess. Tool calls are forwarded to the remote Rails Lab API over HTTPS using your agent's API key. No local database, no heavy dependencies.