Canli Paper Trading
v0.3.1Agent trading on your Alpaca paper account behind pre-trade checks and confirmation tokens.
Values you need
| Variable | What it is | |
|---|---|---|
ALPACA_PAPER_KEY_ID | required secret | Your Alpaca paper API key id (starts with PK). |
ALPACA_PAPER_SECRET_KEY | required secret | Your Alpaca paper API secret key. |
CANLI_HOME | optional | Directory with limits.json, KILL and the order log; default ~/.canli. |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add canli-paper-trading-mcp -e 'ALPACA_PAPER_KEY_ID=<ALPACA_PAPER_KEY_ID>' -e 'ALPACA_PAPER_SECRET_KEY=<ALPACA_PAPER_SECRET_KEY>' -- npx -y canli-paper-trading-mcp@0.3.1Add to
claude_desktop_config.json{
"mcpServers": {
"canli-paper-trading-mcp": {
"args": [
"-y",
"canli-paper-trading-mcp@0.3.1"
],
"command": "npx",
"env": {
"ALPACA_PAPER_KEY_ID": "<ALPACA_PAPER_KEY_ID>",
"ALPACA_PAPER_SECRET_KEY": "<ALPACA_PAPER_SECRET_KEY>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"canli-paper-trading-mcp": {
"args": [
"-y",
"canli-paper-trading-mcp@0.3.1"
],
"command": "npx",
"env": {
"ALPACA_PAPER_KEY_ID": "<ALPACA_PAPER_KEY_ID>",
"ALPACA_PAPER_SECRET_KEY": "<ALPACA_PAPER_SECRET_KEY>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "ALPACA_PAPER_KEY_ID",
"id": "alpaca-paper-key-id",
"password": true,
"type": "promptString"
},
{
"description": "ALPACA_PAPER_SECRET_KEY",
"id": "alpaca-paper-secret-key",
"password": true,
"type": "promptString"
}
],
"servers": {
"canli-paper-trading-mcp": {
"args": [
"-y",
"canli-paper-trading-mcp@0.3.1"
],
"command": "npx",
"env": {
"ALPACA_PAPER_KEY_ID": "${input:alpaca-paper-key-id}",
"ALPACA_PAPER_SECRET_KEY": "${input:alpaca-paper-secret-key}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.canli-paper-trading-mcp]
command = "npx"
args = ["-y", "canli-paper-trading-mcp@0.3.1"]
env = { "ALPACA_PAPER_KEY_ID" = "<ALPACA_PAPER_KEY_ID>", "ALPACA_PAPER_SECRET_KEY" = "<ALPACA_PAPER_SECRET_KEY>" }For AI agents
- Ask the user for: ALPACA_PAPER_KEY_ID, ALPACA_PAPER_SECRET_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: paper_account, preview_paper_orders, rebalance_to_weights, verify_attestation, send_paper_orders.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json