TradeMCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| TRADE_MCP_PORT | No | Port for HTTP transport. Default is 8000. | 8000 |
| TRADE_MCP_TRANSPORT | No | Transport type (stdio or streamable_http). Default is stdio. | stdio |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| trade_get_indicatorsA | Get the latest technical indicators for a single NSE symbol. Returns a snapshot of common momentum/trend indicators (RSI, EMAs, MACD, ATR) plus a derived bullish/bearish signal. Read-only; computes nothing on live capital. Args: params (GetIndicatorsInput): Validated input containing: - symbol (str): NSE ticker, case-insensitive (e.g. "RELIANCE") - response_format (ResponseFormat): "markdown" (default) or "json" Returns: str: Markdown summary, or JSON with this schema: { "symbol": str, # normalized uppercase ticker "as_of": str, # ISO 8601 UTC timestamp "last_price": float, "indicators": { "rsi_14": float, "ema_20": float, "ema_50": float, "macd": float, "macd_signal": float, "macd_histogram": float, "atr_14": float }, "signal": str # "bullish" | "bearish" } On failure: "Error: " Examples: - "What's the RSI on Infosys?" -> symbol="INFY" - "Is Reliance bullish right now?" -> symbol="RELIANCE" - Don't use to place a trade — this tool is read-only analytics. |
| trade_get_portfolioA | Get the current portfolio: holdings, cash, equity, and unrealized P&L. Read-only snapshot of all open positions with per-position and aggregate profit/loss. Args: params (PortfolioInput): Validated input containing: - response_format (ResponseFormat): "markdown" (default) or "json" Returns: str: Markdown summary, or JSON with this schema: { "as_of": str, # ISO 8601 UTC timestamp "cash_balance": float, "invested": float, "market_value": float, "total_equity": float, "unrealized_pnl": float, "position_count": int, "positions": [ { "symbol": str, "quantity": int, "avg_cost": float, "last_price": float, "invested": float, "market_value": float, "unrealized_pnl": float, "unrealized_pnl_pct": float } ] } On failure: "Error: " Examples: - "How is my portfolio doing?" -> default markdown - "Give me my positions as JSON" -> response_format="json" |
| trade_get_portfolio_riskA | Get aggregate risk metrics for the current portfolio. Surfaces concentration, beta, Value-at-Risk, Sharpe, drawdown, risk-budget usage, and any open circuit breakers. Read-only. Args: params (PortfolioRiskInput): Validated input containing: - response_format (ResponseFormat): "markdown" (default) or "json" Returns: str: Markdown summary, or JSON with this schema: { "as_of": str, # ISO 8601 UTC timestamp "total_equity": float, "max_position_concentration_pct": float, "portfolio_beta": float, "value_at_risk_95_1d": float, "sharpe_ratio_30d": float, "max_drawdown_pct": float, "open_circuit_breakers": [str], "risk_budget_used_pct": float } On failure: "Error: " Examples: - "How concentrated is my portfolio?" -> read concentration_pct - "What's my 1-day VaR?" -> read value_at_risk_95_1d |
| trade_list_backtestsA | List available backtest runs, most useful for discovering run IDs. Returns a paginated list of run summaries. Pair this with trade_get_backtest to drill into a specific run's full metrics. Args: params (ListBacktestsInput): Validated input containing: - limit (Optional[int]): Max runs to return, 1-50 (default 10) - offset (Optional[int]): Runs to skip for pagination (default 0) - response_format (ResponseFormat): "markdown" (default) or "json" Returns: str: Markdown summary, or JSON with this schema: { "total": int, # total runs available "count": int, # runs in this page "offset": int, # current offset "items": [ { "run_id": str, "strategy": str, "symbol": str, "ran_at": str, "total_return_pct": float, "sharpe_ratio": float } ], "has_more": bool, "next_offset": int | null # offset for the next page, if any } On failure: "Error: " Examples: - "What backtests have I run?" -> default page - "Show me the next 10 backtests" -> offset=10 |
| trade_get_backtestA | Get full metrics for a single backtest run by its ID. Use trade_list_backtests first to find a valid run_id, then call this for the detailed performance breakdown (returns, Sharpe/Sortino, drawdown, win rate, profit factor, capital curve endpoints). Args: params (GetBacktestInput): Validated input containing: - run_id (str): Run identifier from trade_list_backtests - response_format (ResponseFormat): "markdown" (default) or "json" Returns: str: Markdown summary, or JSON with this schema: { "run_id": str, "strategy": str, "symbol": str, "ran_at": str, "period": {"start": str, "end": str}, "metrics": { "total_return_pct": float, "annualized_return_pct": float, "sharpe_ratio": float, "sortino_ratio": float, "max_drawdown_pct": float, "win_rate_pct": float, "total_trades": int, "profit_factor": float }, "starting_capital": float, "ending_capital": float } On failure (including unknown run_id): "Error: " Examples: - "How did bt_ema_crossover_reliance_0427 perform?" -> that run_id - Don't guess run IDs — list them first with trade_list_backtests. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
Each tool targets a distinct area: backtest details, indicators, portfolio snapshot, portfolio risk, and backtest listing. No overlap in functionality.
All tool names follow a consistent verb_noun pattern prefixed with 'trade_' (e.g., trade_get_backtest, trade_list_backtests).
5 tools cover the core analytical needs of a trading server: portfolio overview, risk assessment, indicators, and backtesting. Well-scoped.
The server focuses on read-only analytics; missing order placement or historical price data, but core portfolio, risk, indicators, and backtest coverage is solid.