Skip to content
Skillpedia
● Free and open sourceπŸ’» LocalπŸ”“ No API keyFinance

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 memory
  • recall_memories: recall past trades, with losses first if you ask
  • get_agent_state: confidence, drawdown and streaks
  • get_behavioral_analysis: spot behavior patterns
  • create_trading_plan: plan with conditional triggers
  • check_trade_legitimacy: pre-trade check (full, reduced or skip)
  • export_audit_trail: export the decision record
  • verify_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

Python with pip (or uvx). Syncing history from Alpaca needs your own read-only keys; Hyperliquid public fills need no key. The optional broker proxy needs Python 3.12+.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

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.