Memtrace
OFFICIAL SERVERLocal code graph with symbol history that coding agents query for search, impact and change tracking
Local trade journal, outcome-weighted recall and hash-chained decision log for trading agents
By mnemox-ai Python Local · stdio Finance and paymentsKnowledge and memory
44 popularity score ★ 1.4k ↓ 884/mo
Opens the app, which asks before it adds the server.
claude mcp add tradememory-protocol -- uvx tradememory-protocol{
"mcpServers": {
"tradememory-protocol": {
"command": "uvx",
"args": [
"tradememory-protocol"
]
}
}
}{
"mcpServers": {
"tradememory-protocol": {
"command": "uvx",
"args": [
"tradememory-protocol"
]
}
}
}{
"servers": {
"tradememory-protocol": {
"type": "stdio",
"command": "uvx",
"args": [
"tradememory-protocol"
]
}
}
}[mcp_servers.tradememory-protocol]
command = "uvx"
args = ["tradememory-protocol"]gemini mcp add --scope user tradememory-protocol uvx -- tradememory-protocolANTHROPIC_API_KEY |
Optional: Anthropic key for the two LLM evolution tools; also needs the anthropic package. |
|---|---|
TRADEMEMORY_TSA |
Optional: Set to off to stop sending daily audit-root hashes to an RFC 3161 timestamp service (on by default). |
TradeMemory Protocol is a Python MCP server from Mnemox that keeps a record of an agent's trades and the reasoning behind them in a local SQLite database. An agent stores a trade with `remember_trade`, and before its next decision asks `recall_memories` for similar past trades, ranked by how they turned out, how alike the conditions were, how recent they are and how confident the agent was. With `order="losses_first"` the losing trades from similar conditions come back first. The server's own instructions tell connected agents to make that call before proposing a trade.
Around the memory sit planning, risk and review tools: conditional trade plans, a per-strategy check of whether there is enough history to trade at full size, behavioural and performance summaries, and a statistical strategy validator. Each recorded decision is hashed with SHA-256 and chained to the one before, with a Merkle root per UTC day, so later edits show up when the chain is verified or exported.
The package registers 20 MCP tools at version 0.5.6 (counted in `src/tradememory/mcp_server.py`). It also ships a `tradememory` command line that imports fills from Hyperliquid (public, no key) or Alpaca (read-only keys from a local file), and an optional `proxy` extra that sits in front of Alpaca's own MCP server and refuses orders that break a policy you write; that brake is marked preview. The memory server itself never places orders or asks for broker keys.
Its makers state it is for education and research only and is not financial advice.
| Runtime | Python 3.10+ |
|---|
Python 3.10 or later; the launch command uses `uvx`, so uv must be installed. The two LLM evolution tools (`evolution_discover_patterns`, `evolution_evolve_strategy`) need the `anthropic` Python package, which the base install does not bring (add it, e.g. `uvx --with anthropic tradememory-protocol`), plus `ANTHROPIC_API_KEY`. The optional `proxy` brake needs Python 3.12+, `pip install "tradememory-protocol[proxy]"` and an Alpaca account.
It does not trade: the MCP server records, recalls and checks only. Its own LIMITATIONS.md says the integrated DQS gating behind `compute_dqs` failed the makers' Phase 5 validation and is being recalibrated, the evolution engine is research-stage, and live results so far rest on 14 trades. Storage is single-user SQLite. The audit chain is tamper-evident, not tamper-proof: whoever can rewrite the whole database can rebuild it, and records are not signed with a private key. `recall_memories` returns 10 results by default and `export_audit_trail` 50.
Suits someone running a trading agent who wants it to keep a local journal, see its own losing patterns before the next order, and keep a verifiable log of its decisions, without handing any broker keys to the server. Since it places no orders, it pairs with a broker's own MCP server rather than replacing one. Not a fit for anyone after market data or signals: apart from a Binance price fetch for backtests it works only on trades you record or sync, and several of its scoring parts are, by its makers' account, not yet validated.
remember_traderecall_memoriesget_strategy_performanceget_trade_reflectionget_behavioral_analysisget_agent_statecreate_trading_plancheck_active_planscheck_trade_legitimacyvalidate_strategycompute_dqsevolution_fetch_market_dataevolution_discover_patternsevolution_run_backtestevolution_evolve_strategyevolution_get_logexport_audit_trailverify_audit_hashverify_audit_chainget_daily_root