A collection of Python scripts demonstrating how to use the Anny MCP (Model Context Protocol) server for trading, portfolio management, market analysis, and backtesting. Includes OAuth 2.1 + PKCE authentication, PAT-based HTTP client, and example workflows.
This server exposes 8 trading/portfolio tools via HTTP. Tool naming follows verb_noun convention (get_*, scan_*, backtest_*, cancel_*), which is good. However, descriptions vary widely in quality and completeness. Most tools have descriptions (7/8), but several are vague or lack actionable context. Input schemas are present for all tools but lack rigor: many parameters have no type constraints, enums are missing where they should exist (e.g., 'interval' accepts free-form strings instead of an enum of valid candle intervals), and nested objects lack internal schema documentation. Output schemas are entirely absent, LLMs cannot predict what fields to expect from responses. Error handling is not visible in the tool definitions. The server is HTTP-based (good for protocol readiness) but lacks modern MCP features like tool annotations, structured error reporting, and per-request metadata. Overall, this is a functional but mediocre implementation typical of early-stage trading tool integrations.
Run a custom strategy backtest with specified parameters including asset, interval, period, mode, trigger conditions, confirmations, stop loss, and take profit. Returns performance metrics including total return, Sharpe ratio, win rate, max drawdown, trade count, and out-of-sample validation results.
Cancel an open order by order ID and symbol. Requires explicit confirmation via --confirm flag in CLI.
Get the current CFO Line status for a specified symbol. Returns the state of the Anny Line indicator.
Get exchange balances across all connected exchanges. Can filter by specific asset or exchange.
Get current market state including Fear & Greed index, BTC price and RSI, derivatives funding rates, and ETF flows.
No output schemas documented. LLMs cannot predict response structure, forcing them to guess what fields exist and plan downstream calls blindly. This violates pattern:tool and pattern:response-shaper.
Parameters lack enum constraints where they should exist. 'interval' in backtest_custom_strategy and scan_custom_signals accepts free-form strings (description says '1h, 4h, 1d, 1w') instead of a formal enum. This invites hallucinated values like '2h' or '30m'. Violates pattern:constrained-input.
Nested object parameters (trigger, confirmations, stop_loss, take_profit) lack internal schema documentation. LLMs cannot see what fields these objects require, their types, or constraints. This forces trial-and-error or external documentation lookup.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 53 | <=2025-11-25 | v2 |
List all open orders across exchanges. Can filter by trading symbol or exchange.
Get technical analysis for a symbol including momentum indicators (RSI, MACD, ADX) and trend indicators (EMA200).
Scan live market conditions for custom signal triggers. Evaluates whether trigger conditions and confirmations are currently met for a given asset and interval.
get_market_state has an empty input schema (no parameters documented). The description says it returns 'Fear & Greed index, BTC price and RSI, derivatives funding rates, and ETH flows' but does not specify what fields are returned or their types. Violates pattern:tool and pattern:response-shaper.
No error handling guidance visible in tool definitions. If backtest_custom_strategy fails (invalid asset, insufficient data, API timeout), the LLM has no recovery path. Violates pattern:recovery-guide and pattern:error-classification.