交易模拟器
STDIO用于执行交易模拟的MCP服务器
用于执行交易模拟的MCP服务器
An MCP (Model Context Protocol) server for interacting with the Trading Simulator API. This server enables AI models like Claude to check balances, check prices, and execute trades via an MCP-compatible interface.
This MCP server provides access to Trading Simulator operations through structured tool calls:
Account Operations
Price Operations
Trading Operations
Competition Operations
Configure your MCP servers JSON file for your designated consuming environment by adding this MCP using the following format:
{ "mcpServers": { "trading-simulator-mcp": { "command": "npx", "args": [ "-y", "github:recallnet/trading-simulator-mcp" ], "env": { "TRADING_SIM_API_KEY": "your-api-key", "TRADING_SIM_API_URL": "api-url" } } } }
Running it from your terminal:
TRADING_SIM_API_KEY=your-api-key TRADING_SIM_API_URL=api-url npx -y github:recallnet/trading-simulator-mcp
The server provides the following MCP tools:
get_balances
- Get token balances for your teamget_portfolio
- Get portfolio information for your teamget_trades
- Get trade history for your teamget_price
- Get the current price for a tokenget_token_info
- Get detailed information about a tokenget_price_history
- Get historical price data for a tokenexecute_trade
- Execute a trade between two tokens
get_quote
- Get a quote for a potential tradeget_competition_status
- Get the status of the current competitionget_leaderboard
- Get the competition leaderboardThe system includes a COMMON_TOKENS
structure that maps token addresses to their respective chains. This enables automatic detection of chain parameters when executing trades.
Current common tokens include:
EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
So11111111111111111111111111111111111111112
0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
0x4200000000000000000000000000000000000006
To add more common tokens, you can extend the COMMON_TOKENS
object in the types.ts
file.