MCP.so
登录
T

Tradememory Protocol MCP Server

@mnemox-ai

基本信息

分类

其他

传输方式

stdio

作者

mnemox-ai

提交者

琮琮 彭

关于 Tradememory Protocol MCP Server

Structured 3-layer memory system for AI trading agents. L1 records every trade automatically. L2 discovers patterns via reflection engine. L3 evolves strategy in real-time. Built on MCP. Supports MT5, Binance, Alpaca. Python/FastAPI/SQLite. MIT licensed.

Tradememory Protocol MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

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

Tradememory Protocol MCP Server 工具

20

Get aggregate performance stats per strategy. Use this to evaluate which strategies are working and which need adjustment.

Get the full context and reflection for a specific trade. Use this to deep-dive into a particular trade's reasoning and lessons.

Store a trade into OWM multi-layer memory with automatic updates. Writes to episodic memory and automatically updates semantic (Bayesian), procedural (running averages + hold time + Kelly), and affective (EWMA confidence/streaks). Also writes to trade_records for backward compatibility.

Recall memories using OWM outcome-weighted scoring. Queries episodic and semantic memories, scores them by outcome quality, context similarity, recency, confidence, and affective modulation. Returns ranked memories with score breakdown. Use order="losses_first" right before placing a trade: losing trades taken in similar conditions rank first, and the current mood (a losing streak) no longer pushes them down.

Get behavioral analysis from procedural memory. Returns aggregate trading behavior stats: hold times, disposition ratio, lot sizing variance, and Kelly criterion comparison.

Get the current agent affective state (confidence, risk, drawdown). Returns confidence level, risk appetite, drawdown percentage, win/loss streaks, equity tracking, and a recommended action based on current drawdown severity.

Create a prospective trading plan that activates when conditions are met. Stores a rule-based plan in prospective memory. The plan stays active until triggered, expired, or manually cancelled.

Check active trading plans against current market context. Queries all active prospective plans, expires any past their expiry date, and matches remaining plans against the provided context.

Fetch OHLCV market data from Binance for evolution analysis. Downloads historical price bars for backtesting and pattern discovery. Use this before discover_patterns or run_backtest to get data.

Discover trading patterns from market data using LLM analysis. Uses Claude to analyze OHLCV data and generate candidate trading patterns with entry/exit conditions. Each pattern can be backtested afterward.

Backtest a candidate pattern against historical OHLCV data. Takes a pattern dict (from discover_patterns) and runs a vectorized backtest. Returns fitness metrics: Sharpe ratio, win rate, trade count, max drawdown, total PnL.

Run full evolution loop — generate, backtest, select, eliminate. Multi-generation strategy evolution: generates candidate patterns via LLM, backtests on in-sample data, validates survivors on out-of-sample data, eliminates weak hypotheses. Returns graduated strategies and graveyard.

Get the log of past evolution runs from this session. Returns a list of all evolution runs with their results, including graduated strategies, graveyard, token usage, and backtest counts. Data is in-memory (resets on server restart).

Export Trading Decision Records for audit and compliance review. Provides a complete, tamper-evident record of trading decisions including the memory context (similar trades, beliefs) that informed each decision.

Verify the integrity of a Trading Decision Record. Recomputes the SHA256 data_hash from stored inputs and compares with the hash computed at decision time. A mismatch indicates tampering.

Verify the integrity of the audit chain. Walks the chain from `from_seq` (default: 1, the genesis record) to `to_seq` (default: latest), checking that every record's `prev_hash` matches the previous record's `data_hash`, and that each `data_hash` equals SHA256(prev_hash || content_hash). Returns a dict with `verified`, `checked_count`, `first_break_at`, `reason`. A `first_break_at` of None with `verified=True` means the chain is intact across the verified range.

Get (or rebuild) the daily Merkle root for a UTC date. The Merkle root summarises every audit_chain entry whose `chained_at` falls inside the UTC day. Verifying this single 32-byte root proves the integrity of every TDR for that day without re-walking each one.

Validate a trading strategy using statistical tests (DSR + Walk-Forward + Regime + CPCV). For educational and research purposes only. Not financial advice. Upload a trade log CSV (QuantConnect format) or daily returns CSV. The tool runs four statistical tests: 1. Deflated Sharpe Ratio (DSR) — detects overfitting from multiple testing 2. Walk-Forward Validation — checks out-of-sample consistency 3. Regime Analysis — performance across bull/bear/crisis markets 4. CPCV — cross-validated Sharpe stability across time periods

Check if the agent has sufficient data and confidence to trade. Call this before making any trade decision. Evaluates sample size, memory quality, regime experience, streak state, and drawdown to determine whether the agent has earned the right to trade at full size.

Compute Decision Quality Score before executing a trade. Evaluates the quality of the decision *process* (not outcome) across 5 factors: regime match, position sizing vs Kelly, process adherence (OWM similarity), risk state, and historical pattern.

概览

What is Tradememory Protocol?

Tradememory Protocol is a structured 3-layer memory system for AI trading agents. It automatically records every trade (L1), discovers patterns via a reflection engine (L2), and evolves strategy in real-time (L3). Built on MCP, it supports MT5, Binance, and Alpaca exchanges. Implemented in Python/FastAPI with SQLite storage. MIT licensed.

How to use Tradememory Protocol?

As an MCP server, Tradememory Protocol is invoked by compatible MCP clients. The implementation uses Python, FastAPI, and SQLite. It supports configuration for MetaTrader 5 (MT5), Binance, and Alpaca exchanges. No specific commands or config keys are documented in the README.

Key features of Tradememory Protocol

  • 3-layer memory for trading agents
  • L1 records every trade automatically
  • L2 discovers patterns via reflection engine
  • L3 evolves strategy in real-time
  • Supports MT5, Binance, Alpaca exchanges
  • Built on MCP with Python/FastAPI/SQLite

Use cases of Tradememory Protocol

  • Automatically record every trade made by an AI trading agent

评论

其他 分类下的更多 MCP 服务器