| 1 | <!-- mcp-name: io.github.mnemox-ai/tradememory-protocol --> |
| 2 | |
| 3 | <p align="center"> |
| 4 | <img src="assets/header.png" alt="TradeMemory Protocol" width="600"> |
| 5 | </p> |
| 6 | |
| 7 | <div align="center"> |
| 8 | |
| 9 | [](https://pypi.org/project/tradememory-protocol/) |
| 10 | [](https://github.com/mnemox-ai/tradememory-protocol/actions) |
| 11 | [](https://smithery.ai/server/io.github.mnemox-ai/tradememory-protocol) |
| 12 | [](https://smithery.ai/server/io.github.mnemox-ai/tradememory-protocol) |
| 13 | [](https://opensource.org/licenses/MIT) |
| 14 | |
| 15 | [Getting Started](docs/GETTING_STARTED.md) | [Use Cases](docs/USE_CASES.md) | [API Reference](docs/API.md) | [OWM Framework](docs/OWM_FRAMEWORK.md) | [Limitations](LIMITATIONS.md) | [中文版](docs/README_ZH.md) |
| 16 | |
| 17 | </div> |
| 18 | |
| 19 | --- |
| 20 | |
| 21 | **Your trading AI has amnesia. And regulators are starting to notice.** |
| 22 | |
| 23 | It makes the same mistakes every session. It can't explain why it traded. It forgets everything when the context window ends. Meanwhile, MiFID II is raising the bar for algorithmic decision documentation ([Article 17](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:32014L0065)). The EU AI Act demands systematic logging of AI actions ([Article 14](https://eur-lex.europa.eu/eli/reg/2024/1689)). Your competitors' agents are learning from every trade. |
| 24 | |
| 25 | The AI trading stack is missing a layer. Every MCP server handles execution — placing orders, fetching prices, reading charts. **None handle memory.** |
| 26 | |
| 27 | Your agent can buy 100 shares of AAPL but can't answer: *"What happened last time I bought AAPL in this condition?"* |
| 28 | |
| 29 | **TradeMemory is the memory layer.** One `pip install`, and your AI agent remembers every trade, every outcome, every mistake — with SHA-256 tamper-proof audit trail. |
| 30 | |
| 31 | Used in production by traders running pre-flight checklists before every position, and by EA systems logging thousands of decisions daily. |
| 32 | |
| 33 | ## What it does |
| 34 | |
| 35 | - **Before trading:** ask your memory — what happened last time in this market condition? How did it end? |
| 36 | - **After trading:** one call records everything — five memory layers update automatically |
| 37 | - **Safety rails:** confidence tracking, drawdown alerts, losing streak detection — the system tells you when to stop |
| 38 | |
| 39 | Works with any market (stocks, forex, crypto, futures), any broker, any AI platform. TradeMemory doesn't execute trades or touch your money — it only records and recalls. |
| 40 | |
| 41 | ## Quick Start |
| 42 | |
| 43 | ```bash |
| 44 | pip install tradememory-protocol |
| 45 | ``` |
| 46 | |
| 47 | Add to Claude Desktop (`claude_desktop_config.json`): |
| 48 | |
| 49 | ```json |
| 50 | { |
| 51 | "mcpServers": { |
| 52 | "tradememory": { |
| 53 | "command": "uvx", |
| 54 | "args": ["tradememory-protocol"] |
| 55 | } |
| 56 | } |
| 57 | } |
| 58 | ``` |
| 59 | |
| 60 | Then tell Claude: *"Record my AAPL long at $195 — earnings beat, institutional buying, high confidence."* |
| 61 | |
| 62 | <details> |
| 63 | <summary>Claude Code / Cursor / Docker</summary> |
| 64 | |
| 65 | ```bash |
| 66 | # Claude Code |
| 67 | claude mcp add tradememory -- uvx tradememory-protocol |
| 68 | |
| 69 | # From source |
| 70 | git clone https://github.com/mnemox-ai/tradememory-protocol.git |
| 71 | cd tradememory-protocol && pip install -e . && python -m tradememory |
| 72 | |
| 73 | # Docker |
| 74 | docker compose up -d |
| 75 | ``` |
| 76 | |
| 77 | </details> |
| 78 | |
| 79 | **Full walkthrough:** [Getting Started](docs/GETTING_STARTED.md) (Trader Track + Developer Track) |
| 80 | |
| 81 | ## Who uses TradeMemory |
| 82 | |
| 83 | | | US Equity Trader | Forex EA System | Compliance Team | |
| 84 | |---|---|---|---| |
| 85 | | **Market** | Stocks (AAPL, TSLA, ...) | XAUUSD (Gold) | Multi-asset | |
| 86 | | **How** | Pre-flight checklist before every trade | Automated sync from MT5 | Full decision audit trail | |
| 87 | | **Key value** | Discipline system — memory before every decision | Record why signals were blocked, not just executed | SHA-256 tamper-proof records for regulators | |
| 88 | | **Details** | [Read m |