mnemox-ai/tradememory-protocol

πŸ’° Finance & Fintech
0 Views
0 Installs

Glama 🐍 🏠 - Structured 3-layer memory system (trades β†’ patterns β†’ strategy) for AI trading agents. Supports MT5, Binance, and Alpaca.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "mnemox-ai-tradememory-protocol": {
      "command": "npx",
      "args": [
        "-y",
        "mnemox-ai-tradememory-protocol"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

TradeMemory Protocol


Your trading AI has amnesia. And regulators are starting to notice.

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). The EU AI Act demands systematic logging of AI actions (Article 14). Your competitors' agents are learning from every trade.

The AI trading stack is missing a layer. Every MCP server handles execution β€” placing orders, fetching prices, reading charts. None handle memory.

Your agent can buy 100 shares of AAPL but can't answer: "What happened last time I bought AAPL in this condition?"

TradeMemory is the memory layer. One pip install, and your AI agent remembers every trade, every outcome, every mistake β€” with a SHA-256 tamper-evident audit trail.

Used in production by traders running pre-flight checklists before every position, and by EA systems logging thousands of decisions daily.

What it does

  • Before trading: ask your memory β€” what happened last time in this market condition? How did it end?
  • After trading: one call records everything β€” five memory layers update automatically
  • Safety rails: confidence tracking, drawdown alerts, losing streak detection β€” the system tells you when to stop

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.

Quick Start

pip install tradememory-protocol

Add to Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "tradememory": {
      "command": "uvx",
      "args": ["tradememory-protocol"]
    }
  }
}

Then tell Claude: "Record my AAPL long at $195 β€” earnings beat, institutional buying, high confidence."

Claude Code / Cursor / Docker
# Claude Code
claude mcp add tradememory -- uvx tradememory-protocol

# From source
git clone https://github.com/mnemox-ai/tradememory-protocol.git
cd tradememory-protocol && pip install -e . && python -m tradememory

# Docker
docker compose up -d

Full walkthrough: Getting Started (Trader Track + Developer Track)

Who uses TradeMemory

US Equity TraderForex EA SystemCompliance Team
MarketStocks (AAPL, TSLA, ...)XAUUSD (Gold)Multi-asset
HowPre-flight checklist before every tradeAutomated sync from MT5Full decision audit trail
Key valueDiscipline system β€” memory before every decisionRecord why signals were blocked, not just executedSHA-256 tamper-evident records for regulators
DetailsRead more β†’Read more β†’Read more β†’

How it works

OWM 5 Factors

  1. Recall β€” Before trading, retrieve past trades weighted by outcome quality, context similarity, recency, confidence, and emotional state (OWM Framework)
  2. Record β€” After trading, one call to remember_trade writes to five memory layers: episodic, semantic, procedural, affective, and trade records
  3. Reflect β€” Daily/weekly/monthly reviews detect behavioral drift, strategy decay, and trading mistakes
  4. Audit β€” Every decision is SHA-256 hashed at creation. Export anytime for review or regulatory submission

MCP Tools

CategoryToolsDescription
Memoryremember_trade Β· recall_memoriesRecord and recall trades with outcome-weighted scoring
Stateget_agent_state Β· get_behavioral_analysisConfidence, drawdown, streaks, behavioral patterns
Planningcreate_trading_plan Β· check_active_plansProspective plans with conditional triggers
Riskcheck_trade_legitimacy5-factor pre-trade gate (full / reduced / skip)
Auditexport_audit_trail Β· verify_audit_hashSHA-256 tamper detection + bulk export
All 20 MCP tools + REST API
CategoryTools
Core Memoryget_strategy_performance Β· get_trade_reflection
OWM Cognitiveremember_trade Β· recall_memories Β· get_behavioral_analysis Β· get_agent_state Β· create_trading_plan Β· check_active_plans
Risk & Governancecheck_trade_legitimacy Β· validate_strategy Β· compute_dqs
Evolutionevolution_fetch_market_data Β· evolution_discover_patterns Β· evolution_run_backtest Β· evolution_evolve_strategy Β· evolution_get_log
Auditexport_audit_trail Β· verify_audit_hash Β· verify_audit_chain Β· get_daily_root

REST API: 35+ endpoints for trade recording, reflections, risk, MT5 sync, OWM, evolution, and audit. Full reference β†’

Pricing

CommunityProEnterprise
PriceFree$29/mo (Coming Soon)Contact Us
MCP tools20 tools20 tools20 tools
StorageSQLite, self-hostedHosted APIPrivate deployment
Dashboardβ€”Web dashboardCustom dashboard
ComplianceAudit trail includedAudit trail includedCompliance reports + SLA
SupportGitHub IssuesPriority supportDedicated support
Get Started β†’Coming soondev@mnemox.ai

Need Help Integrating?

Building a trading AI agent and want battle-tested memory architecture?

Free 30-min strategy call β€” we'll map your agent's memory needs and design guardrails for your specific workflow.

dev@mnemox.ai | Book a call

We've helped traders build pre-flight checklists, connect MT5/Binance, and design custom guardrails for forex, equities, and crypto.

Enterprise & Compliance

Every trading decision your agent makes β€” including decisions not to trade β€” is recorded as a Trading Decision Record (TDR). Per-record SHA-256 content hashes are linked into a forward-chained audit ledger; every UTC day is summarised by a Merkle root which itself chains across days. Tampering with any historical record invalidates every subsequent link.

RegulationRequirementTradeMemory Coverage
MiFID II Article 17Record every algorithmic trading decision factorFull decision chain: conditions, filters, indicators, execution
EU AI Act Article 14Human oversight of high-risk AI systemsExplainable reasoning + memory context for every decision
EU AI Act Article 12Automatic, tamper-resistant logs over system lifetimeLinked SHA-256 chain + daily Merkle roots (RFC 3161 TSA in Phase 1.5)
# Verify a single record hasn't been tampered with
verify_audit_hash(trade_id="MT5-7047640363")
# β†’ {"verified": true, "chain_entry": {"sequence_num": 42, ...}}

# Walk the entire chain (or a slice) end-to-end
verify_audit_chain(from_seq=1, to_seq=None)
# β†’ {"verified": true, "checked_count": 1284, "first_break_at": null}

# Daily Merkle root β€” single 32-byte anchor over every TDR for that day
get_daily_root(date="2026-05-14")
# β†’ {"verified": true, "root_hash": "a05544...", "record_count": 18}

# Bulk export for regulatory submission
GET /audit/export?strategy=VolBreakout&start=2026-03-01&format=jsonl

See LIMITATIONS.md for the full audit-chain maturity statement, including what's not in v0.5.2 yet (TSA timestamping, external anchoring, zkML proof of inference).

Need a custom deployment for your fund? β†’ dev@mnemox.ai

Security

  • Never touches API keys. TradeMemory does not execute trades, move funds, or access wallets.
  • Read and record only. Your agent passes decision context to TradeMemory. It stores it. That's it.
  • Local-first. The only outbound call is RFC 3161 trusted timestamping of daily audit roots β€” a 32-byte hash, no trade data (on by default; disable with TRADEMEMORY_TSA=off). Nothing else leaves your machine.
  • SHA-256 chained audit ledger. Every record is hashed at creation and linked to the previous record. Daily Merkle roots anchor the chain. Verify integrity at the record, slice, or day level. Tampering is detectable at every level; external anchoring (TSA by default) is on the roadmap.
  • 1,400+ tests passing. Full test suite with CI.

Research Status

TradeMemory's OWM framework is grounded in cognitive science (Tulving 1972) and reinforcement learning (Schaul et al. 2015). Current status:

  • OWM five-factor scoring: implemented, tested (1,400+ tests)
  • Statistical validation: DSR, MBL implemented (Bailey-de Prado 2014)
  • Audit trail: SHA-256 tamper-evident TDR
  • Evolution engine: research phase (strategy generation works, statistical gate pass rate under optimization)
  • Hybrid recall: OWM-only mode active, vector fusion available when embeddings configured
  • Empirical validation: ongoing (n=40 trades, target n>=100 for statistical significance)

Documentation

DocDescription
Getting StartedInstall β†’ first trade β†’ pre-flight checklist
Use Cases3 real-world production scenarios
API ReferenceAll REST endpoints
OWM FrameworkOutcome-Weighted Memory theory
ArchitectureSystem design & layer separation
TutorialDetailed walkthrough
MT5 SetupMetaTrader 5 integration
Research LogEvolution experiments & data
Failure Taxonomy11 trading AI failure modes
δΈ­ζ–‡η‰ˆTraditional Chinese

Contributing

See Contributing Guide Β· Security Policy

Star History

MIT β€” see LICENSE. For educational/research purposes only. Not financial advice.

Built by Mnemox

Related MCP Servers

@agentfund/mcp

πŸ“‡ ☁️ - Fundraising infrastructure for AI agents on Solana β€” campaigns, x402 donations, and on-chain reputation. MCP tools for registering agents, creating campaigns, and donating via the x402 pay-to-call flow, backed by Anchor programs (agentregistry, escrow, reputation). npx -y @agentfund/mcp

πŸ’° Finance & Fintech1 views
@asterpay/mcp-server

πŸ“‡ ☁️ - EUR settlement for AI agents via x402 protocol. Market data, AI tools, crypto analytics β€” pay-per-call in USDC on Base. SEPA Instant EUR off-ramp.

πŸ’° Finance & Fintech1 views
@czagents/cnb

πŸ“‡ ☁️ 🏠 🍎 πŸͺŸ 🐧 - Czech National Bank (ČNB) daily FX rates: fetch official CZK exchange rates, convert between currencies, fetch historical rates. Cached 10 min to ease upstream load. npm @czagents/cnb or HTTP at cnb.cz-agents.dev/mcp.

πŸ’° Finance & Fintech1 views
@arbitova/mcp-server

πŸ“‡ ☁️ - Non-custodial on-chain escrow + AI dispute arbitration for agent-to-agent USDC payments on Base. Seven tools covering the full EscrowV1 contract surface: create escrow, mark delivered with on-chain content hash, confirm or dispute, arbiter resolves with signed verdict, cancel/escalate on timeout. npx @arbitova/mcp-server

πŸ’° Finance & Fintech0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it β†’
β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.