TradeMemory is a memory and audit layer for AI trading agents that records trading decisions, outcomes, and context in a tamper-evident history. It is for traders and automated trading systems that need agents to recall past decisions and document their reasoning. Catalogue add-ons provide skills, commands, MCP tools, and related workflow components for using it.
Borrowing it
Nothing to install: this file belongs to mnemox-ai/tradememory-protocol. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/mnemox-ai/tradememory-protocol/master/.skills/tradememory/SKILL.mdgit clone --depth 1 https://github.com/mnemox-ai/tradememory-protocolWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mnemox-ai/tradememory-protocol/tradememory)<a href="https://agentmods.dev/skills/mnemox-ai/tradememory-protocol/tradememory"><img src="https://agentmods.dev/badge/skills/mnemox-ai/tradememory-protocol/tradememory/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/mnemox-ai/tradememory-protocol/tradememory"><img src="https://agentmods.dev/badge/skills/mnemox-ai/tradememory-protocol/tradememory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector warn
SkillSpector: 4 findings, up to medium
These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →
- medium MCP Rug Pull · line 66 uvx/uv tool run commands without ==version create a rug-pull risk.Fix: Pin the version: uvx package-name==1.2.3
- medium Privilege Escalation · line 185 Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
- medium Agent Snooping · line 205 Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.Fix: Remove all code or instructions that list or read other skills' files or directories. Skills should operate independently; cross-skill access is a privilege escalation.
- low Privilege Escalation · line 185 Skill requests more permissions than appear necessary for its stated functionality. Review if elevated access is justified.Fix: Request only the minimum permissions required. Document why each permission is needed. Remove broad permissions like '*' or 'all'.
What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00034 | $0.01832 |
| Opus 5 | $0.00017 | $0.00916 |
| Sonnet 5 | $0.00007 | $0.00366 |
| Haiku 4.5 | $0.00003 | $0.00183 |
Grade A, and why
tradememory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 206 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TradeMemory Protocol
Give your AI agent persistent trading memory. TradeMemory records every trade, recalls past decisions weighted by outcome quality, discovers behavioral patterns, and autonomously evolves new strategies from raw price data.
Outcome-Weighted Memory (OWM) — 5 memory types (episodic, semantic, procedural, affective, prospective) that score recall by P&L outcome, context similarity, recency, and confidence. Winning trades surface first.
Evolution Engine — LLM-powered strategy discovery. Feed it OHLCV data from any exchange, it generates candidate patterns, backtests them vectorized, validates out-of-sample, and graduates survivors. No manual rule writing.
Platform-agnostic — works with MT5, Binance, Alpaca, or any broker that outputs trade data. 1,233 tests passing. MIT licensed.
Installation
pip install tradememory-protocol
Verify:
python -c "import tradememory; print('TradeMemory ready')"
Setup
Claude Desktop (via uvx)
Add to your Claude Desktop MCP config:
{
"mcpServers": {
"tradememory": {
"command": "uvx",
"args": ["tradememory-protocol"]
}
}
}
Claude Code
claude mcp add tradememory -- uvx tradememory-protocol
Manual (local server)
python -m tradememory
Runs the MCP server on stdio. For the REST API server:
python -m tradememory.server
# Runs on http://localhost:8000
MCP Tools Reference
Core Memory (2 tools)
| Tool | Purpose |
|---|---|
get_strategy_performance |
Aggregate stats per strategy: win rate, PnL, profit factor, best/worst trades |
get_trade_reflection |
Deep-dive into a specific trade's reasoning and lessons learned |
OWM Cognitive Memory (6 tools)
| Tool | Purpose |
|---|---|
remember_trade |
Store a trade into all 5 OWM memory layers with automatic behavioral updates |
recall_memories |
Outcome-weighted recall — scores memories by P&L, context similarity, recency, confidence |
get_behavioral_analysis |
Procedural memory stats: hold times, disposition ratio, lot variance, Kelly criterion |
get_agent_state |
Current affective state: confidence level, drawdown %, win/loss streaks, risk appetite |
create_trading_plan |
Create a prospective trading plan with entry/exit conditions and risk parameters |
check_active_plans |
Check status of active trading plans, evaluate against current market conditions |
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 13d ago First seen · 206 lines · 34 tokens per session scan A 83054b226547
tradememory is a skill published in the GitHub repository mnemox-ai/tradememory-protocol (1,417 stars, last pushed 3d ago), licensed MIT. It adds 34 tokens to every session and 1,832 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
smart-order-router
Intelligent order routing to get best execution across multiple exchanges.
breakout-strategy-engine
Pre-built breakout strategy templates — volatility squeeze detection, range breakout, momentum breakout with confirmation filters. Use this skill whenever the user asks about "breakout strategy", "Bollinger squeeze", "range breakout", "momentum breakout", "volatility expansion", "ATR breakout", "Donchian breakout"…
gold-orb-ea
GOLDORB — MQL5 Expert Advisor for XAUUSD 1H Opening Range Breakout. Identifies opening range (first 1H candle after 1:02 AM server time), confirms consolidation (min 3 candles), then trades breakouts. Buy signal on resistance break, sell on support.
forex-trading
Forex market specifics: major/minor/exotic pairs, currency pair mechanics, pip values, lot sizes, swap/rollover, session overlaps, carry trades, central bank impact. USE FOR: forex pairs, currency pairs, pip value, lot size, major pairs, minor pairs, exotic pairs, forex session, carry trade, swap rates, rollover…
ibkr
Interactive Brokers — global stocks/forex/futures via a LOCAL TWS/IB Gateway, not cloud. Covers stocks, ETFs, forex, futures; account, positions, orders, quotes, history, order placement. Use when the user wants to check or trade an Interactive Brokers account (e.g. "IBKR positions", "buy 10 AAPL on IBKR paper", "my…
tushare
A Python interface for Tushare, a financial data service that provides market and company information for stocks, funds, futures, and digital assets. It returns queried data as pandas tables.