DEV.co
MCP Servers · mnemox-ai

tradememory-protocol

TradeMemory Protocol is a Python-based MCP server that provides persistent, tamper-proof memory for AI trading agents. It records trade decisions with SHA-256 audit trails and outcome-weighted recall, helping agents learn from past trades and comply with financial regulations like MiFID II and EU AI Act.

Source: GitHub — github.com/mnemox-ai/tradememory-protocol
1.4k
GitHub stars
164
Forks
Python
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositorymnemox-ai/tradememory-protocol
Ownermnemox-ai
Primary languagePython
LicenseMIT — OSI-approved
Stars1.4k
Forks164
Open issues3
Latest releasev0.5.1 (2026-03-27)
Last updated2026-06-01
Sourcehttps://github.com/mnemox-ai/tradememory-protocol

What tradememory-protocol is

Built on Python/MCP, it exposes 17 tools for memory recording (`remember_trade`), outcome-weighted recall, behavioral analysis, risk gates, and audit export. Five-layer memory architecture (episodic, semantic, procedural, affective, trade records) updates on each trade; audit chain uses SHA-256 hashing with daily Merkle roots.

Quickstart

Get the tradememory-protocol source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/mnemox-ai/tradememory-protocol.gitcd tradememory-protocol# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Algorithmic Trading Audit & Compliance

Record every trade decision (including non-executions) with tamper-proof SHA-256 chains. Satisfies MiFID II Article 17 (algorithmic decision factors) and EU AI Act Article 14 (human oversight, explainability). Export full audit trail for regulatory review.

AI Agent Learning & Pre-Trade Discipline

Query outcome-weighted memory before each trade to surface relevant past decisions in similar market conditions. Detects losing streaks, behavioral drift, and strategy decay. Implements pre-flight checklists and confidence-based risk gates to enforce discipline.

Multi-Broker / Multi-Asset Portfolio Logging

Works with stocks, forex, crypto, futures across any broker (MT5, Binance, etc.) and any LLM (Claude, etc.). Single integration point for persistent decision logging across fragmented broker APIs and market venues.

Implementation considerations

  • Choose storage backend (default SQLite self-hosted vs. Pro hosted API coming soon). Self-hosted requires DB management; hosted availability is TBD.
  • Outcome weighting for recall (OWM Framework) depends on consistent trade outcome labeling. Garbage-in / garbage-out: poor outcome data = poor recall quality.
  • Five-layer memory (episodic, semantic, procedural, affective, trade records) requires understanding which layer suits your agent's learning style. Custom weighting may be needed.
  • SHA-256 audit chain is forward-linked but TSA timestamping (Phase 1.5) not yet included. Current chain relies on local system time; regulators may demand external proof.
  • MCP tool set (17 tools) is fixed. Custom memory queries or domain-specific risk gates may require fork or custom REST API wrapper.

When to avoid it — and what to weigh

  • High-Frequency Trading or Sub-Second Latency Requirements — No indication of latency guarantees. SQLite-based (self-hosted) storage is not optimized for microsecond recalls. Unwise for HFT strategies requiring <100ms decision loops.
  • Standalone Trade Execution or Risk Management System — TradeMemory is memory + audit only. Does not execute trades, manage portfolio risk, or connect directly to brokers. Requires separate execution layer and risk engine.
  • Zero Regulatory Compliance Burden — If your jurisdiction has no algorithmic trading / AI oversight rules, the compliance infrastructure (audit chain, Merkle roots, TSA timestamping) is overhead. Community tier is free but adds operational complexity.
  • Production Compliance Without External Anchoring — LIMITATIONS.md explicitly notes RFC 3161 TSA timestamping is 'Phase 1.5' (not yet released). Daily Merkle roots exist but external anchoring (required for regulatory acceptance in some jurisdictions) is not yet live. Requires review before regulated deployment.

License & commercial use

MIT License (OSI-approved). Permits commercial use, modification, and distribution with attribution. No patent restrictions. Suitable for proprietary trading systems, SaaS platforms, and regulated financial deployments.

MIT is a permissive OSI license that explicitly allows commercial use without royalties or fees. Enterprise tier (contact [email protected]) offers private deployment, compliance reports, and SLA; Community tier is free forever. Standard MIT caveats apply: no warranty, no liability. Requires legal review if used in regulated context (MiFID II, EU AI Act) to confirm audit chain maturity meets jurisdiction requirements.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationStrong
License clarityClear
Deployment complexityLow
DEV.co fitStrong
Assessment confidenceHigh
Security considerations

Audit chain uses SHA-256 (industry standard) but relies on local system time; external timestamping (RFC 3161 TSA) is Phase 1.5 (not yet live). Tampering detection works within a single system; multi-party audit validation requires TSA. Data is stored locally (SQLite) or in hosted API (Pro tier, SLA/compliance TBD). No mention of encryption at rest, key rotation, or access control. Requires review for regulated financial use; recommend not claiming 'tamper-proof' in marketing until TSA is live and externally validated.

Alternatives to consider

Langchain Memory / Vector DB (Pinecone, Weaviate)

Generic LLM memory systems. Cheaper, no audit chain, no outcome weighting. Suitable if you don't need regulatory compliance or trade-specific reflection logic.

Custom in-database logging (PostgreSQL + audit trigger extensions)

Full control, no vendor lock-in, integrates with existing stack. Requires building outcome weighting, behavioral analysis, and audit-chain logic from scratch. Higher dev cost.

Compliance-first platforms (Bloomberg Terminal API, FactSet, SS&C Advent)

Enterprise-grade audit, timestamping, multi-party verification included. Vastly more expensive, aimed at hedge funds and asset managers. Overkill for small traders or early-stage AI agents.

Software development agency

Build on tradememory-protocol with DEV.co software developers

Integrate TradeMemory in minutes. Free Community tier, Pro dashboard coming soon, Enterprise compliance support available. Book a 30-min strategy call: [email protected]

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

tradememory-protocol FAQ

Can I use TradeMemory with my existing broker (Binance, Interactive Brokers, etc.)?
TradeMemory does not execute trades or connect directly to brokers. You feed trade data to it via `remember_trade` calls. Broker sync requires custom integration (example given for MT5). Plan for a middleware layer to ingest from your broker's API.
Is the audit chain legally binding for MiFID II / EU AI Act?
SHA-256 chain is included; daily Merkle roots are available. However, RFC 3161 external timestamping is Phase 1.5 (not yet released). Current chain relies on local system time. Regulators typically demand external proof. Requires legal review and external anchoring before claiming full compliance.
How much does it cost, and what's included in Pro / Enterprise?
Community (free): 17 MCP tools, SQLite self-hosted, audit trail, no dashboard, GitHub support. Pro ($29/mo, coming soon): hosted API, web dashboard. Enterprise (contact): private deployment, compliance reports, SLA, dedicated support.
Can I run this offline or in my own VPC?
Community tier is fully self-hosted (SQLite locally, no external calls needed). Pro tier will use hosted API (architecture TBD). Enterprise allows private deployment. For regulated use, self-host or negotiate private hosting.

Software development & web development with DEV.co

Adopting tradememory-protocol is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate mcp servers software in production.

Build Compliant AI Trading Agents

Integrate TradeMemory in minutes. Free Community tier, Pro dashboard coming soon, Enterprise compliance support available. Book a 30-min strategy call: [email protected]