TradeMemory Protocol
An MCP server that provides AI trading agents with persistent, outcome-weighted memory to learn from historical performance and detect behavioral biases. It enables agents to automatically adjust strategies and optimize position sizing based on conte
What is TradeMemory Protocol?
TradeMemory Protocol is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server that provides ai trading agents with persistent, outcome-weighted memory to learn from historical performance and detect behavioral biases. it enables agents to automatically adjust strateg...
An MCP server that provides AI trading agents with persistent, outcome-weighted memory to learn from historical performance and detect behavioral biases. It enables agents to automatically adjust strategies and optimize position sizing based on conte
This server falls under the Finance & Fintech and Knowledge & Memory categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- An MCP server that provides AI trading agents with persisten
Use Cases
Maintainer
Works with
Installation
PIP
pip install tradememory-protocolManual Installation
pip install tradememory-protocolConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use TradeMemory Protocol
TradeMemory Protocol is an MCP server that gives AI trading agents a persistent, outcome-weighted memory layer so they can learn from their own historical performance rather than starting fresh every session. It stores trades with context, detects behavioral biases, runs pre-trade risk checks through a five-factor legitimacy gate, and evolves strategies by discovering patterns across past decisions. Traders and algorithmic agents use it with MetaTrader 5 (MT5), crypto, or forex workflows to build a self-improving system that adjusts position sizing and strategy selection based on what has actually worked.
Prerequisites
- Python 3.9+ and pip (or the uv/uvx tool) installed
- An MCP-compatible client such as Claude Desktop or Claude Code CLI
- Optional: MetaTrader 5 account credentials for MT5 sync features
- Optional: Docker and Docker Compose for containerized deployment
Install the package
Install TradeMemory Protocol from PyPI using pip. The package includes the MCP server and all dependencies including SQLite storage for the community edition.
pip install tradememory-protocolConfigure Claude Desktop
Add the server to claude_desktop_config.json using uvx so the server is launched automatically when Claude Desktop starts.
{
"mcpServers": {
"tradememory": {
"command": "uvx",
"args": ["tradememory-protocol"]
}
}
}Add via Claude Code CLI (alternative)
If you use Claude Code in the terminal, register the server with a single command.
claude mcp add tradememory -- uvx tradememory-protocolRun with Docker (alternative)
For a containerized setup that includes the REST API and dashboard, use Docker Compose from the cloned repository.
git clone https://github.com/mnemox-ai/tradememory-protocol.git
cd tradememory-protocol
docker compose up -dRecord your first trade
Once connected, ask Claude to record a trade. The server will persist it with full context including market conditions, rationale, and confidence level.
Run a pre-trade risk check
Before entering a position, use the check_trade_legitimacy tool to run the five-factor risk gate. Claude will surface any detected behavioral biases or rule violations.
TradeMemory Protocol Examples
Client configuration
Claude Desktop config block for TradeMemory Protocol using uvx.
{
"mcpServers": {
"tradememory": {
"command": "uvx",
"args": ["tradememory-protocol"]
}
}
}Prompts to try
Example prompts for recording trades, recalling memories, and running risk checks.
- "Record my AAPL long at $195 — earnings beat, institutional buying, high confidence"
- "What happened the last time I bought AAPL in similar conditions?"
- "Run a pre-trade legitimacy check before I enter this EUR/USD position"
- "Show me my behavioral biases from the last 30 days of trades"
- "Verify my audit trail hasn't been tampered with"Troubleshooting TradeMemory Protocol
Server fails to start with 'module not found' errors
Ensure you installed into the same Python environment that uvx uses. Try running 'uvx tradememory-protocol' directly in a terminal to see the full error. If using pip install, confirm the environment is activated before starting Claude Desktop.
Trades recorded in one session are not visible in the next
The community edition uses SQLite stored in a local data directory. Confirm the server is launching from the same working directory each time. Check the server logs for the database file path being used.
MT5 sync features are not working
MT5 integration requires Pro/Enterprise credentials and additional configuration. Check the repository for the .env.example file to find the required MT5 API endpoint and credential keys, then add them to a .env file in the server directory.
Frequently Asked Questions about TradeMemory Protocol
What is TradeMemory Protocol?
TradeMemory Protocol is a Model Context Protocol (MCP) server that mcp server that provides ai trading agents with persistent, outcome-weighted memory to learn from historical performance and detect behavioral biases. it enables agents to automatically adjust strategies and optimize position sizing based on conte It connects AI assistants to external tools and data sources through a standardized interface.
How do I install TradeMemory Protocol?
Install via pip with: pip install tradememory-protocol. Then configure your AI client to connect to this MCP server.
Which AI clients work with TradeMemory Protocol?
TradeMemory Protocol works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is TradeMemory Protocol free to use?
Yes, TradeMemory Protocol is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
TradeMemory Protocol Alternatives — Similar Finance & Fintech Servers
Looking for alternatives to TradeMemory Protocol? Here are other popular finance & fintech servers you can use with Claude, Cursor, and VS Code.
ValueCell
★ 10.7kValueCell is a community-driven, multi-agent platform for financial applications.
Vibe Trading
★ 8.1k'Vibe-Trading: Your Personal Trading Agent'
Quantdinger
★ 6.2kAI quantitative trading platform for crypto, stocks, and forex with backtesting, live trading, market data, and multi-agent research.vibe-trading ,trading-agents,ai-trader,ai-trading
TradingView
★ 2.8kReal-time crypto & stock screening, advanced technical indicators, Bollinger Bands intelligence, candlestick patterns + native Claude Desktop integration. Multi-exchange (Binance, KuCoin, Bybit+). Open-source AI trading infrastructure.
Financial Datasets
★ 2.1kProvides access to comprehensive financial data including income statements, balance sheets, cash flow statements, stock prices, company news, SEC filings, and cryptocurrency information with built-in financial ratio analysis.
Stripe
★ 1.6kThe Stripe Model Context Protocol server allows you to integrate with Stripe APIs through function calling. This protocol supports various tools to interact with different Stripe services.
Browse More Finance & Fintech MCP Servers
Explore all finance & fintech servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up TradeMemory Protocol in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use TradeMemory Protocol?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.