TradeMemory Protocol
Lets your AI agent remember its trades, recall past losses before new orders, and keep a tamper-evident audit trail.
1.4k stars on GitHubby Mnemox AILicense MITUpdated last month
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add tradememory-protocol -- uvx tradememory-protocol
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Record my AAPL long at $195, earnings beat, institutional buying, high confidence.
Before I buy TSLA, show me my worst losing trades in similar conditions.
What it is
TradeMemory is a local memory layer for AI trading agents. It stores your trades, finds where your own history loses money, and shows those losing trades to the agent before the next order. It can also keep a SHA-256 hash-chained record of every decision so you can check it was not changed.
What it can do
remember_trade: record a trade in memoryrecall_memories: recall past trades, with losses first if you askget_agent_state: confidence, drawdown and streaksget_behavioral_analysis: spot behavior patternscreate_trading_plan: plan with conditional triggerscheck_trade_legitimacy: pre-trade check (full, reduced or skip)export_audit_trail: export the decision recordverify_audit_hash: detect tampering
When to use
- βΊWhen you let an AI agent place or suggest trades and want it to see your past losing trades first.
- βΊWhen you want to find patterns in your own trading history, such as oversized trades after losses.
- βΊWhen you need a verifiable record of every trading decision your agent made.
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
auditing-part11-trailsHelps your agent create and check audit trails for regulated clinical pipelines, recording who did what and when, with tamper-evident signatures.trade-journalReviews your own broker trade history and flags habits such as overtrading, chasing momentum, and holding losing trades too long.iot-witness-verifyHelps your agent check a connected device's record trail for gaps or broken links, giving an integrity score and noting any problems.Frequently asked questions
Is it free and open source?
Yes. It is open source under the MIT license and runs locally with a SQLite file.
Does it place orders for me?
The default memory server never places orders and never asks for broker keys. An optional proxy preview can sit between your agent and an Alpaca MCP server and refuse orders that break your rules.
Where is my data stored?
In a local SQLite file on your machine.
Which markets does it work with?
Hyperliquid and Alpaca sync are built in, and MT5 and Binance spot sync scripts are included. Any agent can also record a trade by hand with remember_trade.
Is it financial advice?
No. The readme says the statistics describe your own past trades and are not advice about the next one.
Which apps can use it?
Claude Desktop, Claude Code, Cursor and other MCP clients. Docker is also supported.
If it does not work
- βΊRestart Claude Desktop fully after editing claude_desktop_config.json.
- βΊCheck that Python and uv are installed so that uvx tradememory-protocol can run.
- βΊThe broker proxy needs Python 3.12 or newer; run tradememory proxy doctor to check tool names and the account id.
5 new skills a week. 1 minute to read.