What Agent Financial Advisor does
The Agent Financial Advisor MCP server supplies compliance, risk, tax, suitability, and performance-analysis checks for AI systems involved in trading or investment advice. It belongs in the Finance & Fintech category and is designed for agents that need a structured check before acting rather than a free-form opinion.
The service includes a free rules digest covering current US trading, margin, settlement, and tax rules, including effective dates and sources. Paid tools address specific decisions: whether a trade passes buying-power and market constraints, how much to buy, which tax lots to use, how a portfolio is exposed, whether a strategy shows statistical or overfitting concerns, and whether advice meets Reg BI or fiduciary suitability expectations.
How it works
Agents can connect through a streamable HTTP MCP endpoint at /mcp, or call REST endpoints directly. The REST interface provides tool discovery, pricing, an OpenAPI document, and POST requests at /v1/tools/{name}. The service also exposes an agent-readable overview at /llms.txt.
Each tool returns a structured result based on the supplied portfolio, trade, or strategy data. The listed prices range from free for rules_digest to $0.10 for strategy_audit. Free API keys and credits are supported, and the service can also use x402 payment flows. With payments disabled, the local server runs as a free preview; setting PAY_TO enables payment handling.
Setup and configuration
Run the project with Node 20 or newer. The repository documents npm test for its test suite and npm start for a local server at http://localhost:8787. A direct example calls the position-sizing endpoint with JSON containing equity, entry price, stop price, and a sizing method.
MCP clients should use http://localhost:8787/mcp for a local streamable HTTP connection. Keyed access and credits use a bearer authorization key. For deployment, the project supports Cloudflare Workers with a KV namespace. Mainnet USDC payments use the Base network and require the appropriate Coinbase CDP configuration; the default network is Base Sepolia.
Payment and operational settings include PAY_TO, X402_NETWORK, facilitator credentials or URLs, free-tier limits, ADMIN_TOKEN, DATA_DIR, and PUBLIC_URL. None of these are needed for the basic local preview when payment is left disabled.
Tools and capabilities
The Agent Financial Advisor MCP server exposes these tools:
rules_digest: Returns US trading, margin, settlement, and tax rules with sources and effective dates.
pre_trade_check: Checks buying power, cash-account restrictions, intraday margin, Reg SHO, wash sales, concentration, stop risk, liquidity, spread, leverage, market hours, and fat-finger conditions.
position_size: Calculates fixed-fractional, volatility-target, or fractional-Kelly sizing subject to caps.
tax_lot_plan: Selects FIFO, LIFO, HIFO, or minimum-tax lots and identifies short- versus long-term treatment, wash sales, and harvesting opportunities.
portfolio_review: Calculates weights, HHI, sector and asset-class exposure, rebalance trades, Sharpe, Sortino, drawdown, VaR, and beta.
strategy_audit: Reviews trade statistics, t-statistics, Probabilistic and Deflated Sharpe Ratios, and overfitting indicators.
suitability_check: Performs a Reg BI or fiduciary suitability review and produces a hashed audit memo.
Limitations and notes
The checks are advisory outputs for trading and advice workflows; the provided material does not describe brokerage order execution or investment recommendations. Coverage is centered on US rules and the NYSE calendar. Rule data is maintained in a source-backed table reviewed weekly, but users remain responsible for validating applicability to their circumstances.
Tool calls have different prices, and payment behavior depends on configuration. Leaving PAY_TO unset disables payments for local operation. The repository documents 21 tests, but no client-specific MCP setup instructions are provided.