@troyaagent/mcp
MCP server for Troya Agent: market tools for Robinhood Chain (chain 4663) and Hyperliquid, with the same limits, Troya Gate checks and journal as the web app. The server holds no keys. It forwards every call to the Troya REST API.
Install
npx -y @troyaagent/mcp
Claude Desktop (claude_desktop_config.json), Cursor (.cursor/mcp.json)
{
"mcpServers": {
"troya": {
"command": "npx",
"args": ["-y", "@troyaagent/mcp"],
"env": { "TROYA_BASE_URL": "https://troya.codes", "TROYA_API_KEY": "troya_…" }
}
}
}
Claude Code
claude mcp add troya --env TROYA_BASE_URL=https://troya.codes --env TROYA_API_KEY=troya_… -- npx -y @troyaagent/mcp
Environment
| Variable | Meaning |
|---|---|
TROYA_BASE_URL |
Troya server URL. TROYA_URL is accepted as a fallback. Default https://troya.codes; a URL ending in /agent/api or /api also works. |
TROYA_API_KEY |
API token from the app: Agent → Wallet → API tokens. Read tools work without it. |
TROYA_LIVE |
Set to 1 to let execute_intent run live. Without it, every execution from this MCP is a dry run. |
Tools and tiers
39 tools today: 32 read, 6 prepare, 1 execute. The server adds tools over time; the live list with every schema is GET https://troya.codes/api/tools, and this MCP always serves that list.
- read (cannot move funds, 32 tools):
analyze_ticker,get_movers,get_funding_extremes,robinhood_tokens,robinhood_token,robinhood_stocks,lp_range,registry,gate_check,analyze_token_health,quote_swap,get_balances,get_policy,simulate_trade,ring_radar,council,oath,aegis_coin,smart_money,stock_gaps,robinhood_app,quantum_exposure,seal_receipt,arena_board,owl_week,get_robinhood_tokens,get_new_pairs,get_social_info,watchfire,tribute,allies,troya_check.get_social_infoanswers only when the server hasX_BEARER_TOKEN; posts are wrapped as untrusted text. - prepare (needs a token, 6 tools):
prepare_order{kind: "perp" | "swap", …},prepare_perp_order,prepare_swap,prepare_close_position,prepare_hl_funding, andfile_call(files a public call to The Record). These run Troya Gate and your limits, then return a one-timeconfirmationIdthat lasts 120 seconds and is bound to a hash of the parameters. - execute (needs a token with the execute scope):
execute_intent {confirmationId}. It re-checks your limits and runs through your Agent Wallet. It stays a dry run unless both of these are true: you switched dry-run off for that token in the app, andTROYA_LIVE=1is set here.
REST (same tools)
GET /api/tools list with tier + JSON schema (public)
GET /api/tools/:name?arg=value read tools, public
POST /api/tools/:name {args} read: public · prepare: x-api-key · execute: x-api-key + Idempotency-Key
GET /agent/api/market/robinhood Robinhood Chain token list
GET /agent/api/market/robinhood/token?address=0x…
GET /agent/api/market/hl Hyperliquid perps
/agent/api/* mirrors /api/*. API tokens are stored hashed on the server and can be revoked at any time. Troya charges no fee during the beta.