Skip to main content

A Memory-Enhanced MCP Server for Cryptocurrency Analysis using mem0

Project description

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

Add to your MCP client configuration:

{
  "mcpServers": {
    "crypto-memory": {
      "command": "crypto-memory-mcp"
    }
  }
}

🛠️ 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 data
  • summary: Brief summary of the analysis
  • metadata: Optional JSON string with additional metadata

2. retrieve_crypto_analysis

Retrieve stored cryptocurrency analysis from memory.

Parameters:

  • symbol: Optional symbol to filter by
  • analysis_type: Optional analysis type to filter by
  • limit: 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 for
  • analysis_type: Optional specific analysis type to delete

📋 Usage Examples

Basic Workflow

  1. Analyze a cryptocurrency using your Binance MCP server
  2. Store the analysis using store_crypto_analysis
  3. Analyze another cryptocurrency
  4. Compare them using compare_crypto_symbols or retrieve previous analysis with retrieve_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:

  1. Use Binance MCP for real-time data and trading operations
  2. Use Crypto Memory MCP to store and retrieve analysis results
  3. 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crypto_memory_mcp-1.0.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crypto_memory_mcp-1.0.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file crypto_memory_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: crypto_memory_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for crypto_memory_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c8ed2b4a61efd41945ab337bcc0eebd012e4591e4ce03eca7bc2d4871ac00c92
MD5 d0f954704f2ce27ff9188ff31dfa38b6
BLAKE2b-256 365a770c447dec526ed4953b39da158269d3f76af2f12d769be0b86fe846c906

See more details on using hashes here.

File details

Details for the file crypto_memory_mcp-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crypto_memory_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca80d67fd601a48761a44cbcdc2ad1883aeaa5aa4e16a472fe9229484fbb2020
MD5 b820764497231c53414f43c979099ad4
BLAKE2b-256 644a1060d8ea885b1859b49512b5690741176c2d8b9d6718a51563f991d315db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page