mnemox-ai avatar

Tradememory Protocol

mnemox-ai/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-protocol

Run 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-protocol

Run in your terminal. Replace YOUR_* placeholders with real values; add --scope user to install for every project.

Tools

Verified live · 17 tools

Verified 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.

Parameters* required
direction*string
"long" or "short"
entry_price*number
Entry price of the trade
exit_pricevalue
Exit price (if trade is closed)
market_context*string
Description of market conditions when trade was taken
pnlvalue
Profit/loss in account currency (if trade is closed)
reflectionvalue
What you learned from this trade
strategy_name*string
Name of the strategy used (e.g. "VolBreakout")
symbol*string
Trading instrument (e.g. "XAUUSD")
timestampvalue
ISO format timestamp. Defaults to now (UTC).
trade_idvalue
Optional custom ID. Auto-generated if omitted.
recall_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.

Parameters* required
limitinteger
Max number of results (default 5)default: 5
market_context*string
Current market conditions to match against
strategy_namevalue
Optional strategy filter
symbol*string
Trading instrument to filter by (e.g. "XAUUSD")
get_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.

Parameters* required
strategy_namevalue
Filter by strategy name. Returns all strategies if omitted.
symbolvalue
Filter by symbol. Returns all symbols if omitted.
get_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.

Parameters* required
trade_id*string
The trade ID to look up
remember_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.

Parameters* required
confidencenumber
Agent confidence level 0-1 (default 0.5)default: 0.5
context_atr_d1value
ATR(14) on D1 in dollars
context_regimevalue
Market regime (trending_up/trending_down/ranging/volatile)
direction*string
"long" or "short"
entry_price*number
Entry price of the trade
exit_price*number
Exit price of the trade
market_context*string
Description of market conditions
max_adverse_excursionvalue
Maximum adverse excursion during the trade
pnl*number
Profit/loss in account currency
pnl_rvalue
P&L as R-multiple (risk units). Improves OWM scoring quality.
reflectionvalue
Lessons learned from this trade
strategy_name*string
Strategy used (e.g. "VolBreakout")
symbol*string
Trading instrument (e.g. "XAUUSD")
timestampvalue
ISO format timestamp. Defaults to now (UTC).
trade_idvalue
Optional custom ID. Auto-generated if omitted.
recall_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.

Parameters* required
context_atr_d1value
Current ATR(14) on D1 in dollars
context_regimevalue
Current market regime (trending_up/trending_down/ranging/volatile)
limitinteger
Max results (default 10)default: 10
market_context*string
Current market conditions to match against
memory_typesvalue
Types to query (default: ["episodic", "semantic"])
strategy_namevalue
Optional strategy filter
symbol*string
Trading instrument (e.g. "XAUUSD")
get_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.

Parameters* required
strategy_namevalue
Filter by strategy name. Returns all if omitted.
symbolvalue
Filter by symbol. Returns all if omitted.
get_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.

Parameters* required
expiry_daysinteger
Days until plan expires (default 30)default: 30
planned_action*string
JSON string describing what to do (e.g. '{"type": "skip_trade"}')
prioritynumber
Priority 0-1, higher = checked first (default 0.5)default: 0.5
reasoning*string
Why this plan was created
trigger_condition*string
JSON string describing when to trigger (e.g. '{"regime": "ranging"}')
trigger_type*string
Type of trigger (e.g. "market_condition", "drawdown", "time_based")
check_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.

Parameters* required
context_atr_d1value
Current ATR(14) on D1 in dollars
context_regimevalue
Current market regime (trending_up/trending_down/ranging/volatile)
evolution_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.

Parameters* required
daysinteger
Number of days of history to fetch (default 90)default: 90
symbol*string
Trading pair (e.g. "BTCUSDT", "ETHUSDT")
timeframestring
Bar timeframe — "5m", "15m", "1h", "4h", "1d"default: 1h
evolution_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.

Parameters* required
countinteger
Number of patterns to generate (default 5)default: 5
daysinteger
Days of history to analyze (default 90)default: 90
symbol*string
Trading pair (e.g. "BTCUSDT")
temperaturenumber
LLM creativity 0-1 (default 0.7, higher = more diverse)default: 0.7
timeframestring
Bar timeframe — "5m", "15m", "1h", "4h", "1d"default: 1h
evolution_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.

Parameters* required
daysinteger
Days of history to backtest against (default 90)default: 90
pattern_dict*object
CandidatePattern as dict (from discover_patterns output)
symbolstring
Trading pair (e.g. "BTCUSDT")default: BTCUSDT
timeframestring
Bar timeframe — "5m", "15m", "1h", "4h", "1d"default: 1h
evolution_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...

Parameters* required
daysinteger
Days of history to use (default 90)default: 90
generationsinteger
Number of evolution generations (default 3)default: 3
population_sizeinteger
Hypotheses per generation (default 10)default: 10
symbol*string
Trading pair (e.g. "BTCUSDT")
timeframestring
Bar timeframe — "5m", "15m", "1h", "4h", "1d"default: 1h
evolution_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.

Parameters* required
endvalue
End date (ISO format, exclusive). E.g., "2026-04-01".
limitinteger
Maximum records to return (default 50).default: 50
startvalue
Start date (ISO format, inclusive). E.g., "2026-03-01".
strategyvalue
Filter by strategy name (e.g., "VolBreakout").
trade_idvalue
Get a single TDR by trade ID (e.g., "MT5-7047640363"). If provided, other filters are ignored.
verify_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.

Parameters* required
trade_id*string
Trade ID to verify (e.g., "MT5-7047640363").

Sponsors

Readme

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

More from mnemox-ai

Related AI & LLM Tools MCP servers

View all
1microsoft avatarPower BI Authoring MCP Server (Local)microsoft/powerbi-modeling-mcpThe Power BI Authoring MCP server lets an AI agent create and change Power BI semantic models.1.3Kstars
2chunxiaoxx avatarNautilus Compass Memorychunxiaoxx/nautilus-compassLocal-first long-term memory for AI agents, with byte-recomputable signed verification receipts.1.3Kstars
3vibetensor avatarAttestixvibetensor/attestixAI agent identity, signed credentials, delegated authority and governance evidence.723stars
4rusiaaman avatarWCWGrusiaaman/wcgwShell and coding agent on mcp clients660stars
5baryhuang avatarRemote MacOs Usebaryhuang/mcp-remote-macos-useThe only general AI agent that does NOT requires extra API key, giving you full control on your local and remote MacOs from Claude Desktop App482stars
6lyellr88 avatarMarm Mcp Serverlyellr88/marm-memoryUniversal MCP Server with advanced AI memory capabilities and semantic search.0stars