← Back to directory
T

TradeMemory Protocol

Community
Tamper-evident decision audit trail and outcome-weighted memory for AI trading agents.
Category
Other #16 of 230
Stars
★ 1.4k Very popular
Transport
stdio (local process)
Runtime
Python · Docker
Credentials
No credential needed
License
MIT
Last commit
Tools
20
69FMRS · C

TradeMemory Protocol is a self-hosted, MIT-licensed MCP memory layer that uses 20 tools to fill the memory and audit gaps for AI trading agents: outcome-weighted recall, five-layer memory writes, behavioural and risk analysis, and a SHA-256 forward-chained audit ledger with daily Merkle roots. It explicitly does not execute trades or touch funds, is local-first, and its only outbound call is trusted timestamping of daily audit roots (which can be turned off). The project is in maintenance mode, and the docs flag the audit chain as not yet fully mature plus OWM validation and the evolution engine as research-phase. It suits individuals and teams that value decision traceability and review discipline, not those wanting a hosted service, trade execution or investment advice.

Strongest · Documentation 16/20 Weakest · Reliability 11/20

Reliability
11/20
Security and permissions
14/20
Maintenance
13/20
Documentation
16/20
Setup experience
15/20
Why each score
Reliability 11/20
Static review only: nothing was executed and no source files beyond README and server.json were supplied. The manifest declares a stdio PyPI package (tradememory-protocol 0.5.5) and the README enumerates 20 tools across five memory layers, but no per-tool input/output schema, error taxonomy, or return contract is given, so declared tool behavior cannot be matched against real behavior. The README claims a CI badge and '1,400+ tests passing', yet no workflow file or test inventory is included, making that an unverifiable self-assertion that must not raise the score under the static calibration rule (<=12 without verifiable execution evidence). Positives: the architecture is internally coherent (recall -> record -> reflect -> audit maps cleanly onto the tool categories), transport and version in the manifest are consistent, and the project openly discloses unfinished capabilities (TSA timestamping, external anchoring, zkML, vector fusion), which reduces overclaiming risk. Deductions: absent parameter/return evidence, no documented failure modes, no dependency pinning or runtime constraint stated, and no reproducible end-to-end path. Hence slightly above mid-range but below the 12 ceiling.
Security and permissions 14/20
No red lines triggered: no credential theft, no covert exfiltration, no default irreversible delete/pay/deploy/remote-command behavior, and no real tokens or secrets in the install examples. The security posture is described clearly: it explicitly does not execute trades, touch API keys, or access wallets; it is local-first; the single outbound call is RFC 3161 trusted timestamping of daily audit roots (a 32-byte hash, no trade data) and is on by default with TRADEMEMORY_TSA=off to disable. Tamper detection is offered at record, slice, and day level. Deductions: an on-by-default third-party outbound call is still a data-flow decision users must know about, and the manifest's environmentVariables is an empty array while the README references TRADEMEMORY_TSA, a minor manifest/doc inconsistency. The project advertises 35+ REST endpoints but supplies no authentication, bind-address, access-control, or exposure guidance, so a locally listening service could be reachable beyond the intended process. Chain integrity is detective rather than preventive while external anchoring is still roadmap. Mid-upper score, not full marks.
Maintenance 13/20
There is a clear MIT license, a published PyPI package at a consistent semantic version (0.5.5 matching the manifest), a CI badge, and links to contributing and security policies, so release and update paths exist. However, the README states the project is feature-complete and in maintenance mode with no new features or hosted service planned, which is a direct negative for a long-term maintenance score. No commit cadence, issue-response latency, dependency-update policy, or independently verifiable maintainer identity is present in the supplied material; the 1416 stars are a discovery signal only and add nothing. The research-status section concedes empirical validation at n=40 against a target of n>=100 and an evolution engine still in research with an under-performing statistical gate. Net: governance and licensing are in place but forward activity is explicitly limited and evidence of sustained maintenance is thin.
Documentation 16/20
Documentation is layered and unusually forthcoming: quick start, Getting Started, Use Cases, API reference, OWM framework, architecture, tutorial, MT5 setup, research log, an AI-trading failure taxonomy, and a Traditional Chinese README, plus a standalone LIMITATIONS.md naming what is not yet in v0.5.x (TSA timestamping, external anchoring, zkML proof of inference). The README provides concrete call examples with expected response fragments (verify_audit_hash, verify_audit_chain, get_daily_root, an audit export URL) and clearly frames the project as educational/research, not financial advice, with no trade execution. Deductions: no per-tool parameter or return schemas for the 20 tools are included in the supplied material (they are delegated to an external API.md), there is no troubleshooting or common-error section, the n=40 versus n>=100 gap is honest but still an undisclosed maturity cost for users, and claims such as '1,400+ tests' arrive without supporting evidence. Usable, well-structured docs with reachable but externalized gaps.
Setup experience 15/20
The install path is short and clear: pip install tradememory-protocol, then a Claude Desktop json block invoking uvx tradememory-protocol, with one-line Claude Code, from-source, and docker compose alternatives. No mandatory environment variables or credentials, and the only prerequisites are a Python runtime plus uvx/uv, so the usual auth and network-exposure setup burden of remote servers is absent; platform compatibility is reasonable wherever Python runs. Deductions: no minimum supported Python version is stated, the uvx args do not pin the package version so installs can drift from the reviewed 0.5.5, Docker and source options are given as bare commands without preconditions or port notes, and no verifiable evidence of a successful install or MCP handshake is included, so under the static calibration the score is held at or below 15. Clear, few-step, but detail-incomplete setup.

Static review · not runListed 2026-09-10

Read the FMRS scoring method →

Fit and risk

What it can accessUses the networkConnects to a database

Best for

  • Individual traders who want persistent memory and a decision audit trail for their AI trading agent.
  • Developers building autonomous trading agents that need to query prior context before trading.
  • Compliance or risk teams that need verifiable, exportable decision records.
  • Researchers studying the outcome-weighted memory (OWM) framework.

Not for

  • Users expecting the MCP server to place orders, manage funds or touch wallets — it does not execute trades.
  • Teams needing a rich hosted service or a fast-moving feature roadmap (the project is in maintenance mode).
  • Anyone treating its outputs as trade signals or investment advice.
  • Users requiring capabilities not yet shipped, such as external TSA anchoring or zkML proof of inference.

Required permissions

  • Reads the trade decision context and trade records passed in by your agent.
  • Writes and maintains memory-layer and audit-chain data locally.
  • By default makes one outbound call to an RFC 3161 trusted timestamping service, sending only the 32-byte daily audit root with no trade data; disable with TRADEMEMORY_TSA=off.
  • Does not access API keys, wallets or broker credentials.

Risks and side effects

  • Audit-chain maturity is limited: v0.5 does not yet include TSA timestamping and external anchoring, which the docs list as roadmap items.
  • OWM empirical validation is ongoing (n=40; target n>=100 for statistical significance), so conclusions should be treated cautiously.
  • The evolution engine is in a research phase, with statistical gate pass rate still being optimised.
  • The default outbound timestamping call contacts a third-party service, which must be disabled for fully offline environments.
  • Memory and audit data live locally, so disk tampering or loss affects verifiability and historical retention.

Setup

Before you start

Runtime:Python · Docker

Other optional settings (1)
TRADEMEMORY_TSA optional Controls the outbound RFC 3161 trusted timestamping of daily audit roots; on by default, set to off to disable.
  1. Run pip install tradememory-protocol.
  2. Add an mcpServers entry to Claude Desktop's claude_desktop_config.json with command uvx and args ["tradememory-protocol"].
  3. Restart the client, then tell your agent to record a trade. Alternatives: for Claude Code run claude mcp add tradememory -- uvx tradememory-protocol; from source, git clone the repo, pip install -e . and run python -m tradememory; or use docker compose up -d.
claude_desktop_config.json
{
  "mcpServers": {
    "tradememory": {
      "command": "uvx",
      "args": ["tradememory-protocol"]
    }
  }
}

Shown for Claude Desktop. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "tradememory": {
      "command": "uvx",
      "args": [
        "tradememory-protocol"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add tradememory -- uvx tradememory-protocol

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After install, all 20 MCP tools including remember_trade should appear in your client's tool list; asking it to record a trade and getting a success confirmation proves the connection works.

Troubleshooting

  1. Tools not visible after configuration: confirm uvx is on PATH, or start it instead with pip install -e . followed by python -m tradememory.
  2. For fully offline operation, set TRADEMEMORY_TSA=off to disable the outbound timestamping call.
  3. If verify_audit_hash or verify_audit_chain fails, inspect first_break_at to locate the chain break and check whether that record was modified.
  4. For MT5 sync issues, follow docs/MT5_SYNC_SETUP.md to check the connection and export configuration.
  5. With small sample sizes or without embeddings configured, recall runs in OWM-only mode; vector fusion requires embeddings to be set up.

Things to try

Once connected, you can ask your AI assistant things like:

  • Record my AAPL long at $195 — earnings beat, institutional buying, high confidence.
  • What happened last time I bought AAPL in this market condition, and how did it end?
  • Verify the audit chain from sequence 1 to 1284 for tampering.
  • Export the audit trail since 2026-03-01 for compliance review.

Tools 20

remember_trade writes
Record a trade, writing to all five memory layers at once.
recall_memories read-only
Recall past trade memories scored by outcome-weighted factors.
get_agent_state read-only
Read agent state: confidence, drawdown and win/loss streaks.
get_behavioral_analysis read-only
Analyse behavioural patterns and drift.
create_trading_plan writes
Create prospective trading plans with conditional triggers.
check_active_plans read-only
Check currently active trading plans.
check_trade_legitimacy read-only
Five-factor pre-trade gate returning full / reduced / skip.
export_audit_trail read-only
Bulk-export the audit trail for review or regulatory submission.
Show 12 more tools
verify_audit_hash read-only
Verify a single record's SHA-256 hash has not been tampered with.
verify_audit_chain read-only
Walk the entire chain, or a slice, end-to-end.
get_daily_root read-only
Get the Merkle root over every decision record for a UTC day.
get_strategy_performance read-only
Query strategy performance statistics.
get_trade_reflection read-only
Retrieve trade reflection content.
validate_strategy read-only
Run statistical validation on a strategy.
compute_dqs read-only
Compute statistical validation metrics such as DSR and MBL.
evolution_fetch_market_data read-only
Fetch market data for the evolution engine.
evolution_discover_patterns read-only
Discover patterns in the data (research phase).
evolution_run_backtest read-only
Run a strategy backtest (research phase).
evolution_evolve_strategy writes
Evolve and generate strategies (research phase).
evolution_get_log read-only
Read the evolution process log.

Use cases

A US equity trader running a pre-flight checklist before every position, recalling how similar conditions ended last time.
A Forex EA system syncing automatically from MT5 and recording why signals were blocked, not just executed.
A compliance team using SHA-256 tamper-evident records to meet MiFID II and EU AI Act logging requirements.
Running daily, weekly and monthly reviews to detect behavioural drift, strategy decay and trading mistakes.

Supported clients

Claude Desktop
Claude Code
Cursor

Listed from the project's documentation, not tested by this site.

Overview

TradeMemory Protocol is a memory layer for AI trading agents: it never executes trades and never touches funds, it only records and recalls. Recall before trading weights past trades by outcome quality, context similarity, recency, confidence and emotional state; after trading, a single remember_trade call writes to five memory layers (episodic, semantic, procedural, affective and trade records). Every decision is SHA-256 hashed at creation and forward-linked into an audit ledger, summarised by daily UTC Merkle roots, with optional RFC 3161 trusted timestamp anchoring (on by default, disable with TRADEMEMORY_TSA=off). It ships 20 MCP tools plus 35+ REST endpoints, works with any market or broker, is local-first, and is MIT-licensed. As of August 2026 the project is feature-complete and in maintenance mode: bug and security reports are reviewed, but no new features or hosted service are planned.

Similar servers

BioMCP 75 · B

One binary. One grammar. Evidence from the biomedical sources you already trust.

★ 659 · Tools 11 Compare with this →

Source revision cb599bd36145 Data synced 2026-10-19 Read the FMRS scoring method