← Back to Leaderboard
Tmnemox-ai

mnemox-ai/tradememory-protocol

Local-first MCP server for trading-agent memory, decision audits, and order guardrails

Engineering Health (Methodology)
A+ · 89/100
Maintenance Activity
● Updated 3d ago
Latest Release
v0.5.6
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption17/25
Release Cadence17/20
License Clarity20/20
DockerSelf-HostedMCPCLI
Total Stars
★ 1,458
24h Growth
+2
7d Growth
+5
Forks
172

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

mnemox-ai/tradememory-protocol Star History (2026-02-22 - 2026-12-03) ALL-TIME STAR HISTORY (2026-02 – 2026-12) +1.5k in 284d · avg +5/day 1.5k 770 0 2026-02-22: ★ 12026-03-14: ★ 892026-04-04: ★ 4432026-04-25: ★ 6922026-05-16: ★ 9122026-06-06: ★ 1,1392026-06-27: ★ 1,3732026-07-18: ★ 1,3922026-08-08: ★ 1,4022026-08-29: ★ 1,4082026-09-19: ★ 1,4152026-10-10: ★ 1,4262026-10-31: ★ 1,4362026-11-18: ★ 1,4502026-12-03: ★ 1,458 ★ 1.5k 2026-02 2026-07 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

TradeMemory is a local-first Python MCP server, not a broker or execution engine. The default runtime stores records in SQLite and uses FastMCP >=3.2.0,<4 for MCP, with a separate FastAPI REST surface served by Uvicorn. One remember_trade call writes to episodic, semantic, procedural, affective, and trade-record layers. Recall reads that history before a proposed trade, while reflection tools surface changes in behavior or strategy performance over time.

Execution control is a separate, opt-in path. The proxy extra sits between the agent and Alpaca's MCP server and delegates order policy evaluation to Mnemox Control. The proxy forwards eligible orders and records allow and refuse decisions in the audit chain; the default memory server cannot send orders. Broker credentials are passed to the upstream broker process rather than stored by TradeMemory. That separation lets teams evaluate memory and audit behavior before putting the proxy in the order path.

Key Capabilities & Differentiators

The 20 MCP tools span memory, agent state, conditional plans, risk checks, strategy research, and audit verification, with more than 35 REST endpoints. Outcome-weighted recall combines outcome quality, context similarity, recency, confidence, and emotional state. recall_memories(order="losses_first") also searches the symbol's recent losing trades and puts comparable losses before non-losses. Default recall favors stronger outcomes, using R multiples where recorded, while reserving at least 20% of the list for losses. Hyperliquid and Alpaca fill sync add closed trades incrementally and report descriptive loss patterns.

The audit path hashes Trading Decision Records with SHA-256, links records in sequence, and summarizes each UTC day with a Merkle root linked across days. Verification covers individual records and chain ranges, with bulk export available as JSONL. The Alpaca proxy preview adds checks for allowed symbols, position and notional limits, protective stops, loss thresholds, and manual approval above a configured notional. Memory recall is advisory; the proxy enforces policy only on orders routed through it.

Trade-offs & Limitations

Compared with direct broker MCP controls such as fixed size limits or human-only submission, TradeMemory adds context from the user's own fills and can preserve a reviewable record of policy decisions. That advantage comes with another component in the order path: the proxy preview covers Alpaca, and an unavailable quote or unevaluable order can cause a refusal. If broker-native controls already meet the requirement, the default memory server can add context without adding an execution dependency. Hyperliquid sync only reaches the recent fills exposed by its API, so an initial import cannot establish a complete history.

Treat the ledger as tamper-evident, not immutable. A database writer can rebuild the local chain; retaining an independently verifiable timestamp token gives reviewers an external reference for the anchored root, but it cannot establish who authored a record or whether any decision was omitted. Likewise, loss summaries describe past trades, and the 14-trade empirical validation is too small to establish a performance benefit. The MIT license permits commercial self-hosting with notice retention, but neither the license nor the audit features establish regulatory compliance.

Hardware & Deployment Guide

The base package requires Python 3.10+ and can run as a local MCP process via uvx tradememory-protocol or from source with pip install -e . and python -m tradememory. Claude Code can register it with claude mcp add tradememory -- uvx tradememory-protocol. The Alpaca proxy requires Python 3.12+ and is installed with pip install "tradememory-protocol[proxy]". The development docker-compose.yml starts timescale/timescaledb-ha:pg18 for PostgreSQL with TimescaleDB and pgvector, maps port 5432, and persists data in pgdata. It provisions the database, not the full application stack; SQLite remains the default for local MCP use.

Local storage does not mean offline operation. RFC 3161 timestamping sends a 32-byte root by default and can be disabled with TRADEMEMORY_TSA=off; fill sync, market data, and optional model services have their own network requirements. No GPU is specified for the default SQLite and outcome-weighted recall path. Size for retained history and request concurrency; optional embeddings add model-dependent cost. Release v0.5.4 hardened anchor handling, v0.5.5 restricted dashboard static serving to dashboard/dist, and v0.5.6 added fill sync and loss-first recall.

MCP and REST: FastMCP 3.x exposes 20 tools; the FastAPI surface includes more than 35 endpoints.
Fill ingestion: Hyperliquid sync reads public recent fills without a key; Alpaca sync reads with locally supplied credentials and avoids reimporting closed trades.
Loss-first retrieval: A separate recent-loss search for the symbol helps surface losing trades that a recency-only query would miss.
Audit integrity: Per-record SHA-256 links, chained UTC daily Merkle roots, RFC 3161 timestamps, and JSONL export support independent review.
Order policy: The Alpaca preview proxy uses Mnemox Control and binds threshold approvals to the reviewed terms and the same client_order_id.
Research boundary: Backtesting and strategy evolution are exposed as tools, but the empirical validation summarized at 14 trades is inconclusive.
Best For

Teams that want a Claude Code or other MCP agent to consult its own fills before proposing trades and retain a verifiable decision history. Start with memory-only mode; test the Alpaca policy proxy in paper trading before putting it in the live order path.

Skip If

You need a production execution gateway for multiple brokers, proof that every decision was logged, or empirical evidence that the system improves returns.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedMCPCLI
pip install tradememory-protocol

# Hyperliquid: public fills, no key needed
tradememory sync hyperliquid --address 0xYourAddress

# Alpaca: read-only calls with your own keys, kept in a local file
tradememory sync alpaca --env-file ~/.secrets/alpaca.env

Comparison vs. Top Agents & Frameworks Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
tradememory-protocol ★1.5k+5PythonMITLocal-first MCP server for trading-agent memory, decision audits, and order guar
obscura38.8k+1.1kRustApache-2.0Rust/V8 headless browser for agent automation and capture without Chromium
WrenAI18.5k+66Python—An MCP-ready semantic engine that gives AI agents governed SQL and dashboard wor
rocketride-server19.9k+22PythonMITC++ workflow engine for building and running extensible AI pipelines

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/mnemox-ai/tradememory-protocol.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

mnemox-ai/tradememory-protocol Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about tradememory-protocol

Can I add TradeMemory without replacing my broker MCP connection?

No. Connect the default MCP server alongside the broker integration to record and recall trades without placing orders. To enforce policy, replace the direct Alpaca MCP entry with the preview proxy and run tradememory proxy doctor to check the account ID and upstream tool names. Orders sent directly to the broker bypass the proxy.

What hardware does a self-hosted instance need?

The default Python and SQLite path has no stated GPU or VRAM requirement. Size storage around retained trade and audit history, and test recall under your expected concurrency. Optional hybrid retrieval adds an embedding model; the Docker database path adds a separate PostgreSQL service. No throughput or memory benchmarks are provided.

Can we self-host it commercially and use the audit trail as compliance evidence?

The MIT license permits commercial use and self-hosting, subject to its notice requirements. The audit chain can support internal review, but it does not prove that every decision was captured, authenticate the decision author with a private-key signature, or certify regulatory compliance.

How does it compare with a broker's native MCP controls?

Use direct broker controls if fixed exposure limits or human submission are enough. Use the memory server when the agent needs to see its own comparable losses before proposing an order. Add the Alpaca preview proxy only when you also need locally defined policy enforcement and a linked record of allow and refuse decisions.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining mnemox-ai/tradememory-protocol? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature mnemox-ai/tradememory-protocol on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare