
Tradememory Protocol
If you're building AI trading agents, this solves the memory problem. Your agent can execute trades but can't remember what happened last time it saw similar conditions. TradeMemory gives you 17 MCP tools to record trades across five memory layers (episodic, semantic, procedural, affective, trade records) and recall them with outcome-weighted scoring. Before trading, query recall_memories to see past setups. After, call remember_trade to log everything. You get confidence tracking, drawdown alerts, and SHA-256 audit trails for compliance. Works with any broker or market since it only stores decisions, never executes. Particularly useful if you're running pre-flight checklists or need MiFID II documentation for algorithmic trading decisions.
- GitHub stars
- 1.4K
- tools
- 17
- transport
- STDIO
- last updated
- Oct 2, 2026
Install
From registry metadata$ npx add-mcp 'uvx tradememory-protocol' --name tradememory-protocolRun in your terminal. add-mcp asks which agents to add it to (Claude Code, Codex, Cursor and more). Add -g to install it for every project.
Review the command, arguments and environment values before installing. MCP servers run with your local permissions.
Other ways
Claude Code
$ claude mcp add tradememory-protocol -- uvx tradememory-protocolRun in your terminal. Replace YOUR_* placeholders with real values; add --scope user to install for every project.
Tools
Verified live · 17 toolsVerified live against the running server on Jun 11, 2026.
store_trade_memoryStore a trade decision with full context into memory. Call this after executing a trade to build your memory bank. Include market_context and reflection for better recall later.10 params
Store a trade decision with full context into memory. Call this after executing a trade to build your memory bank. Include market_context and reflection for better recall later.
direction*stringentry_price*numberexit_pricevaluemarket_context*stringpnlvaluereflectionvaluestrategy_name*stringsymbol*stringtimestampvaluetrade_idvaluerecall_similar_tradesFind past trades with similar market context. Use this before making a trade to learn from past experience. Returns trades with their reflections and outcomes. Uses OWM scoring when episodic memories exist, falls back to keyword matching.4 params
Find past trades with similar market context. Use this before making a trade to learn from past experience. Returns trades with their reflections and outcomes. Uses OWM scoring when episodic memories exist, falls back to keyword matching.
limitintegermarket_context*stringstrategy_namevaluesymbol*stringget_strategy_performanceGet aggregate performance stats per strategy. Use this to evaluate which strategies are working and which need adjustment.2 params
Get aggregate performance stats per strategy. Use this to evaluate which strategies are working and which need adjustment.
strategy_namevaluesymbolvalueget_trade_reflectionGet the full context and reflection for a specific trade. Use this to deep-dive into a particular trade's reasoning and lessons.1 params
Get the full context and reflection for a specific trade. Use this to deep-dive into a particular trade's reasoning and lessons.
trade_id*stringremember_tradeStore a trade into OWM multi-layer memory with automatic updates. Writes to episodic memory and automatically updates semantic (Bayesian), procedural (running averages), and affective (EWMA confidence/streaks). Also writes to trade_records for backward compatibility.15 params
Store a trade into OWM multi-layer memory with automatic updates. Writes to episodic memory and automatically updates semantic (Bayesian), procedural (running averages), and affective (EWMA confidence/streaks). Also writes to trade_records for backward compatibility.
confidencenumbercontext_atr_d1valuecontext_regimevaluedirection*stringentry_price*numberexit_price*numbermarket_context*stringmax_adverse_excursionvaluepnl*numberpnl_rvaluereflectionvaluestrategy_name*stringsymbol*stringtimestampvaluetrade_idvaluerecall_memoriesRecall memories using OWM outcome-weighted scoring. Queries episodic and semantic memories, scores them by outcome quality, context similarity, recency, confidence, and affective modulation. Returns ranked memories with score breakdown.7 params
Recall memories using OWM outcome-weighted scoring. Queries episodic and semantic memories, scores them by outcome quality, context similarity, recency, confidence, and affective modulation. Returns ranked memories with score breakdown.
context_atr_d1valuecontext_regimevaluelimitintegermarket_context*stringmemory_typesvaluestrategy_namevaluesymbol*stringget_behavioral_analysisGet behavioral analysis from procedural memory. Returns aggregate trading behavior stats: hold times, disposition ratio, lot sizing variance, and Kelly criterion comparison.2 params
Get behavioral analysis from procedural memory. Returns aggregate trading behavior stats: hold times, disposition ratio, lot sizing variance, and Kelly criterion comparison.
strategy_namevaluesymbolvalueget_agent_stateGet the current agent affective state (confidence, risk, drawdown). Returns confidence level, risk appetite, drawdown percentage, win/loss streaks, equity tracking, and a recommended action based on current drawdown severity.
Get the current agent affective state (confidence, risk, drawdown). Returns confidence level, risk appetite, drawdown percentage, win/loss streaks, equity tracking, and a recommended action based on current drawdown severity.
No parameters. Call it with no arguments.
create_trading_planCreate a prospective trading plan that activates when conditions are met. Stores a rule-based plan in prospective memory. The plan stays active until triggered, expired, or manually cancelled.6 params
Create a prospective trading plan that activates when conditions are met. Stores a rule-based plan in prospective memory. The plan stays active until triggered, expired, or manually cancelled.
expiry_daysintegerplanned_action*stringprioritynumberreasoning*stringtrigger_condition*stringtrigger_type*stringcheck_active_plansCheck active trading plans against current market context. Queries all active prospective plans, expires any past their expiry date, and matches remaining plans against the provided context.2 params
Check active trading plans against current market context. Queries all active prospective plans, expires any past their expiry date, and matches remaining plans against the provided context.
context_atr_d1valuecontext_regimevalueevolution_fetch_market_dataFetch OHLCV market data from Binance for evolution analysis. Downloads historical price bars for backtesting and pattern discovery. Use this before discover_patterns or run_backtest to get data.3 params
Fetch OHLCV market data from Binance for evolution analysis. Downloads historical price bars for backtesting and pattern discovery. Use this before discover_patterns or run_backtest to get data.
daysintegersymbol*stringtimeframestringevolution_discover_patternsDiscover trading patterns from market data using LLM analysis. Uses Claude to analyze OHLCV data and generate candidate trading patterns with entry/exit conditions. Each pattern can be backtested afterward.5 params
Discover trading patterns from market data using LLM analysis. Uses Claude to analyze OHLCV data and generate candidate trading patterns with entry/exit conditions. Each pattern can be backtested afterward.
countintegerdaysintegersymbol*stringtemperaturenumbertimeframestringevolution_run_backtestBacktest a candidate pattern against historical OHLCV data. Takes a pattern dict (from discover_patterns) and runs a vectorized backtest. Returns fitness metrics: Sharpe ratio, win rate, trade count, max drawdown, total PnL.4 params
Backtest a candidate pattern against historical OHLCV data. Takes a pattern dict (from discover_patterns) and runs a vectorized backtest. Returns fitness metrics: Sharpe ratio, win rate, trade count, max drawdown, total PnL.
daysintegerpattern_dict*objectsymbolstringtimeframestringevolution_evolve_strategyRun full evolution loop — generate, backtest, select, eliminate. Multi-generation strategy evolution: generates candidate patterns via LLM, backtests on in-sample data, validates survivors on out-of-sample data, eliminates weak hypotheses. Returns graduated strategies and grav...5 params
Run full evolution loop — generate, backtest, select, eliminate. Multi-generation strategy evolution: generates candidate patterns via LLM, backtests on in-sample data, validates survivors on out-of-sample data, eliminates weak hypotheses. Returns graduated strategies and grav...
daysintegergenerationsintegerpopulation_sizeintegersymbol*stringtimeframestringevolution_get_logGet the log of past evolution runs from this session. Returns a list of all evolution runs with their results, including graduated strategies, graveyard, token usage, and backtest counts. Data is in-memory (resets on server restart).
Get the log of past evolution runs from this session. Returns a list of all evolution runs with their results, including graduated strategies, graveyard, token usage, and backtest counts. Data is in-memory (resets on server restart).
No parameters. Call it with no arguments.
export_audit_trailExport Trading Decision Records for audit and compliance review. Provides a complete, tamper-evident record of trading decisions including the memory context (similar trades, beliefs) that informed each decision.5 params
Export Trading Decision Records for audit and compliance review. Provides a complete, tamper-evident record of trading decisions including the memory context (similar trades, beliefs) that informed each decision.
endvaluelimitintegerstartvaluestrategyvaluetrade_idvalueverify_audit_hashVerify the integrity of a Trading Decision Record. Recomputes the SHA256 data_hash from stored inputs and compares with the hash computed at decision time. A mismatch indicates tampering.1 params
Verify the integrity of a Trading Decision Record. Recomputes the SHA256 data_hash from stored inputs and compares with the hash computed at decision time. A mismatch indicates tampering.
trade_id*stringSponsors
Readme
TradeMemory Protocol
Details
- Repository
- github.com/mnemox-ai/tradememory-protocol
- Categories
- AI & LLM Tools, Finance & Commerce
- Package
tradememory-protocol- Transport
- STDIO
- Registry
- MCP registry, active
- Tools verified
- Jun 11, 2026