truemarkets-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@truemarkets-mcp-server Check my USDC balance and get a quote to buy 5 SOL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
truemarkets-mcp-server
MCP (Model Context Protocol) server for True Markets. Gives AI agents native trading capabilities without shelling out to bash.
Why this exists
The True Markets CLI (tm) works with agents through bash skills — the agent runs tm buy SOL 50 -o json --force and parses stdout. This works, but has fundamental problems:
Two-quote problem:
--dry-runand--forcefetch separate quotes. The agent decides based on quote A but executes at quote B's price.No slippage protection: No mechanism to reject execution if price moves.
Process overhead: Every command spawns a new process, re-reads credentials, re-establishes HTTP connections.
Fragile parsing: Agent must parse JSON from stdout mixed with stderr warnings.
The MCP server solves all of these:
Quote caching:
tm_get_quotereturns aquote_idcached for 60 seconds.tm_execute_tradeuses the same quote — no price surprise.Structured responses: Tools return typed JSON via MCP's
structuredContent, no stdout parsing.Persistent auth: Credentials loaded once on startup, tokens refreshed automatically.
Native tool calls: Agents call tools directly instead of composing bash strings.
Related MCP server: o2 Exchange MCP Server
Tools
Read-only
Tool | Description |
| Get token price in USDC (no API key needed) |
| Get token balances across chains |
| List available tokens |
| Get account email and wallet addresses |
Trading
Tool | Description | Destructive |
| Get a trade quote (cached 60s) | No |
| Execute a cached quote | Yes |
| Prepare outbound transfer | No |
| Execute a prepared transfer | Yes |
Agent workflow
1. tm_get_balances → check available funds
2. tm_get_quote(buy, SOL, 50) → inspect price, fee, issues
3. [agent decides: price acceptable? issues empty?]
4. tm_execute_trade(quote_id) → execute the SAME quoteCompare to the CLI flow where step 4 fetches a new quote silently.
Setup
Prerequisites
Node.js 18+
Existing True Markets account (
tm signup/tm loginvia the CLI)API key configured (
tm config set api_key <key>)
The MCP server reads credentials from ~/.config/truemarkets/ — the same location the CLI uses. No separate auth setup needed.
Install
npm install -g truemarkets-mcp-serverConfigure your agent
Claude Code / claude.ai
Add to your MCP config (.claude/mcp.json or via settings):
{
"mcpServers": {
"truemarkets": {
"command": "truemarkets-mcp-server",
"args": []
}
}
}Cursor
Add to .cursor/mcp.json:
{
"mcpServers": {
"truemarkets": {
"command": "npx",
"args": ["truemarkets-mcp-server"]
}
}
}Environment variables
Variable | Description |
| Override stored auth token |
| Override stored API key |
Development
git clone https://github.com/true-markets/mcp-server.git
cd mcp-server
npm install
npm run build
npm startTest with the MCP inspector:
npx @modelcontextprotocol/inspector node dist/index.jsArchitecture
src/
├── index.ts # Entry point, stdio transport
├── constants.ts # API host, paths, version
├── types.ts # Shared types and helpers
├── services/
│ ├── auth.ts # Token/key management (reads ~/.config/truemarkets/)
│ ├── api-client.ts # DeFi Gateway HTTP client
│ └── signer.ts # Turnkey P256 payload signing
└── tools/
├── read.ts # Read-only tools (price, balances, assets, profile)
└── trade.ts # Trading tools (quote, execute, transfer)License
MIT
Available Tools
8 toolstm_execute_tradeExecute a quoted tradeADestructive
Execute a trade using a quote_id from tm_get_quote.
IMPORTANT: Only call this after inspecting the quote from tm_get_quote. The quote must be less than 60 seconds old and have no issues.
This tool signs the quote payloads with the user's Turnkey API key and submits the trade. It is irreversible.
Args:
quote_id (string): The quote_id from tm_get_quote
Returns: { success, order_id, tx_hash, explorer_url }
Inputs: quote_id (required).
tm_execute_transferExecute a prepared transferADestructive
Execute a transfer prepared with tm_prepare_transfer. Irreversible.
Args:
transfer_id (string): From tm_prepare_transfer
Returns: { success, tx_hash, chain, sent, fee, explorer_url }
Inputs: transfer_id (required).
tm_get_balancesGet account balancesARead-onlyIdempotent
Get token balances for the authenticated user across all chains.
Args:
chain (string, optional): Filter by "solana" or "base"
Returns: Array of { symbol, chain, balance, name }
Inputs: chain.
tm_get_priceGet token priceARead-onlyIdempotent
Get the current price of a token in USDC by running a zero-cost quote.
Resolves token symbols (SOL, ETH) to addresses automatically. Does NOT require an API key — only auth token.
Args:
token (string): Token symbol (e.g. "SOL") or contract address
chain (string): "solana" or "base" (default: "solana")
Returns: { token, chain, price_usdc, qty_in, qty_out }
Inputs: token (required), chain.
tm_get_profileGet account profileARead-onlyIdempotent
Get the authenticated user's profile including email and wallet addresses.
Returns: { email, wallets: [{ chain, address }] }
Inputs: no named parameters.
tm_get_quoteGet a trade quoteARead-only
Request a quote for buying or selling a token. Returns pricing info and a quote_id that can be passed to tm_execute_trade within 60 seconds.
IMPORTANT: Always call this BEFORE tm_execute_trade. Inspect the quote (price, fee, issues) and only execute if acceptable. This solves the price uncertainty problem — you see the exact price you'll get.
Args:
side ("buy" | "sell"): Trade direction
token (string): Token symbol (SOL, ETH) or contract address
amount (string): Quantity as a decimal string
chain ("solana" | "base"): Blockchain network (default: solana)
qty_unit ("base" | "quote"): What the amount represents (default: "quote" for buy, "base" for sell)
Returns: { quote_id: string, // Pass this to tm_execute_trade side, token, chain, you_pay: string, // Amount + asset you send you_receive: string, // Amount + asset you get fee: string, effective_price: string, // USDC per token issues: [], // Any problems (e.g. insufficient balance) expires_in_seconds: 60 }
Inputs: side (required), token (required), amount (required), chain, +1 more.
tm_list_assetsList available tokensARead-onlyIdempotent
List all tokens available for trading on True Markets.
Args:
chain (string, optional): Filter by "solana" or "base"
Returns: Array of { symbol, name, chain, address }
Inputs: chain.
tm_prepare_transferPrepare a token transferARead-only
Prepare a transfer to an external wallet address. Returns transfer details and a transfer_id for execution with tm_execute_transfer.
Args:
to (string): Destination wallet address
token (string): Token symbol or contract address
amount (string): Quantity as decimal string
chain ("solana" | "base"): Chain (default: solana)
qty_unit ("base" | "quote"): Amount unit (default: base)
Returns: { transfer_id, to, token, amount, chain }
Inputs: to (required), token (required), amount (required), chain, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool has a clearly distinct purpose with no overlap: executing trades, executing transfers, getting balances, getting prices, getting profiles, getting quotes, listing assets, and preparing transfers. The descriptions clearly differentiate their functions and workflows.
All tools follow a consistent 'tm_' prefix with verb_noun pattern (e.g., tm_execute_trade, tm_get_balances, tm_list_assets). The naming is perfectly uniform across all eight tools.
With 8 tools, this server is well-scoped for a trading/transfer platform. It covers essential operations (quotes, trades, transfers, balances, assets, prices, profiles) without being overwhelming or sparse.
The tool set provides complete coverage for the trading domain: quote-get-execute workflow for trades, prepare-execute for transfers, plus supporting tools for balances, assets, prices, and profiles. There are no obvious gaps in core operations.
Maintenance
Related MCP Connectors
Trading tools for AI agents: token risk checks, swap quotes, unsigned swaps, holdings on 5 chains.
Unified financial infrastructure connecting AI agents directly to trade live/demo brokerage accounts, Web3 non-custodial wallets, real-time market data across equities, ETFs, crypto, forex, options, DeFi swaps, and prediction markets, institutional research feeds, and algorithmic strategy backtesters.
Live crypto + IDX stock market intelligence for AI agents — 19 tools, no API key.
Warden MCP lets AI agents find tokens, quote swaps and trade onchain on Base, BNB Chain, Robinhood Chain, Arc and Solana, within limits you set. Market tools need no credential: list_chains, search_tokens, trending_tokens, price_history, quote_swap and swap_status. Search by name, ticker or contract address, read USD price candles, and price a swap before committing to it, including cross-chain swaps. Wallet tools act for the wallet whose owner connected the agent, by OAuth sign-in or a wk_ key. agent_permissions shows what the agent may do and its daily limits. prepare_swap builds a trade and hands the owner a review link to sign. With request_session the owner turns on hands-free trading in one tap, and execute_swap then trades within the limits they set. swap_status tracks gasless and cross-chain trades. get_wallet shows holdings on every chain. Gasless trading is available on Base, BNB Chain and Robinhood Chain. Built by Warden Protocol, the team behind Warden Token Terminal.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to perform cryptocurrency trading analysis and execution with 38+ tools including real-time market data, technical indicators, risk management, and support for both paper trading and live execution on Hyperliquid.7MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with the o2 Exchange on the Fuel Network to perform on-chain trading, manage accounts, and access real-time market data. It provides tools for executing various order types and calculating over 16 technical indicators for comprehensive market analysis.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely trade on Hyperliquid perpetual exchange, including order placement, position management, market data retrieval, and vault operations via natural language.23 PyPI24MIT
- AlicenseAqualityDmaintenanceEnables AI agents to trade on Interactive Brokers: check quotes, balance, positions, and execute buy/sell orders (including fractional shares by dollar amount) via the Client Portal API.2014MIT