Crypto Memory MCP Server
A Memory-Enhanced MCP Server for Cryptocurrency Analysis that solves the context window limitation problem when analyzing multiple cryptocurrencies.
🎯 Problem Solved
When analyzing multiple cryptocurrencies with AI models, the context window gets filled up with tool calls and data, causing the AI to "forget" previous analysis. This MCP server provides persistent memory storage using mem0 to maintain analysis history across sessions.
✨ Features
- 🧠 Persistent Memory: Store cryptocurrency analysis using mem0's advanced memory system
- 🔍 Smart Retrieval: Search and retrieve previous analysis by symbol, type, or natural language queries
- 📊 Multi-Symbol Comparison: Compare analysis across multiple cryptocurrencies without losing context
- 📈 Analysis Categorization: Organize analysis by type (technical, fundamental, sentiment, etc.)
- 📋 Memory Statistics: Track your analysis history and memory usage
- 🗑️ Memory Management: Clean up old or irrelevant analysis data
🚀 Installation
pip install crypto-memory-mcp
Or install from source:
git clone <repository-url>
cd crypto-memory-mcp
pip install -e .
⚙️ Configuration
Quick VS Code Setup
-
Install the package:
pip install crypto-memory-mcp
-
Get your OpenAI API key from https://platform.openai.com/api-keys
-
Add to VS Code settings (
Ctrl+,→ search "claude mcp" → "Edit in settings.json"):Option 1: uvx (Modern, Recommended):
{ "claude.mcpServers": { "crypto-memory": { "command": "uvx", "args": ["crypto-memory-mcp"], "env": { "OPENAI_API_KEY": "your_openai_api_key_here" } } } }
Option 2: Python Module (Windows/Fallback):
{ "claude.mcpServers": { "crypto-memory": { "command": "python", "args": ["-m", "crypto_memory_mcp"], "env": { "OPENAI_API_KEY": "your_openai_api_key_here" } } } }
-
Restart VS Code and start using persistent memory for crypto analysis!
📖 Detailed setup guide: See VSCODE_SETUP.md for complete configuration instructions.
General MCP Configuration
For other MCP clients, add to your configuration:
{
"mcpServers": {
"crypto-memory": {
"command": "crypto-memory-mcp",
"env": {
"OPENAI_API_KEY": "your_openai_api_key_here"
}
}
}
}
🛠️ Available Tools
1. store_crypto_analysis
Store cryptocurrency analysis in persistent memory.
Parameters:
symbol: Cryptocurrency symbol (e.g., "BTCUSDT")analysis_type: Type of analysis ("technical", "fundamental", "price_action", etc.)data: JSON string containing analysis datasummary: Brief summary of the analysismetadata: Optional JSON string with additional metadata
2. retrieve_crypto_analysis
Retrieve stored cryptocurrency analysis from memory.
Parameters:
symbol: Optional symbol to filter byanalysis_type: Optional analysis type to filter bylimit: Maximum number of results (default: 10)
3. compare_crypto_symbols
Compare analysis across multiple cryptocurrency symbols.
Parameters:
symbols: Comma-separated list of symbols (e.g., "BTCUSDT,ETHUSDT,ADAUSDT")analysis_type: Optional analysis type to focus on
4. search_crypto_insights
Search for specific insights across all stored analysis.
Parameters:
query: Natural language search query (e.g., "bullish trends", "resistance levels")limit: Maximum number of results (default: 5)
5. get_memory_stats
Get statistics about stored cryptocurrency analysis memories.
6. delete_crypto_analysis
Delete stored analysis for a specific symbol.
Parameters:
symbol: Cryptocurrency symbol to delete analysis foranalysis_type: Optional specific analysis type to delete
📋 Usage Examples
Basic Workflow
- Analyze a cryptocurrency using your Binance MCP server
- Store the analysis using
store_crypto_analysis - Analyze another cryptocurrency
- Compare them using
compare_crypto_symbolsor retrieve previous analysis withretrieve_crypto_analysis
Example Analysis Storage
{
"symbol": "BTCUSDT",
"analysis_type": "technical",
"data": "{\"price\": 45000, \"rsi\": 65, \"macd\": \"bullish\", \"support\": 44000, \"resistance\": 47000}",
"summary": "Bitcoin showing bullish momentum with RSI at 65, MACD crossover confirmed. Strong support at $44k.",
"metadata": "{\"timeframe\": \"4h\", \"confidence\": 0.8}"
}
Example Multi-Symbol Comparison
{
"symbols": "BTCUSDT,ETHUSDT,ADAUSDT,SOLUSDT",
"analysis_type": "technical"
}
🔧 Integration with Binance MCP
This memory server is designed to work alongside your existing Binance MCP server:
- Use Binance MCP for real-time data and trading operations
- Use Crypto Memory MCP to store and retrieve analysis results
- AI can now analyze multiple cryptocurrencies without losing context
🤝 Workflow Integration
1. AI calls Binance MCP → Get BTCUSDT data
2. AI analyzes data → Technical analysis complete
3. AI calls Memory MCP → Store analysis
4. AI calls Binance MCP → Get ETHUSDT data
5. AI analyzes data → Technical analysis complete
6. AI calls Memory MCP → Store analysis
7. AI calls Memory MCP → Compare BTCUSDT vs ETHUSDT
8. AI provides comprehensive comparison without losing previous analysis
🧠 Memory Features
- Semantic Search: Find analysis by meaning, not just keywords
- Temporal Tracking: Maintain analysis timeline and history
- Metadata Support: Rich context and categorization
- Efficient Storage: Optimized for cryptocurrency analysis patterns
📊 Benefits
- ✅ No More Context Loss: AI retains all previous analysis
- ✅ Faster Analysis: Retrieve instead of re-calculating
- ✅ Better Comparisons: Compare multiple cryptocurrencies easily
- ✅ Analysis History: Track analysis over time
- ✅ Improved Insights: Search across all stored analysis for patterns
🔐 Privacy & Security
- All data stored locally by default (depending on mem0 configuration)
- No sensitive trading keys required
- Analysis data can be encrypted
- User isolation supported
🛠️ Technical Details
- Built with MCP (Model Context Protocol)
- Uses mem0 for advanced memory management
- Async/await support for high performance
- Comprehensive error handling and validation
📈 Roadmap
- Advanced analysis templates
- Integration with more data sources
- Analysis export/import functionality
- Advanced search filters
- Analysis trend detection
- Automated memory cleanup
🤝 Contributing
Contributions welcome! Please read our contributing guidelines and submit pull requests.
📄 License
MIT License - see LICENSE file for details.
Metadata
Release files for crypto-memory-mcp 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| crypto_memory_mcp-1.0.4.tar.gz | 12.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crypto_memory_mcp-1.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.7 kB
Release files / crypto_memory_mcp-1.0.4.tar.gz
| Download URL | crypto_memory_mcp-1.0.4.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57990db865e6caa67374c69c01fbfe76d6773d1dc1d3b277eb486e26002cad4e
|
|
BLAKE2b-256 checksum How to use checksums |
731169797bf5134cf01c8cc342b8ae64259afe88e602bbe3c65b80f3e11df112
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / crypto_memory_mcp-1.0.4-py3-none-any.whl
| Download URL | crypto_memory_mcp-1.0.4-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
597f395396a010126e3428f3fe13575facf449f913b3cc9fa5ce042ed1ee7c7a
|
|
BLAKE2b-256 checksum How to use checksums |
8bf5eb6fb48ffb40a6c8b1819777ce2e4e4b28d88c7125cc67259172ddae550c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for crypto-memory-mcp 1.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.