MCP cover image
See in Github
2025-04-05

用于跟踪和管理加密货币投资组合分配的MCP服务器。

1

Github Watches

0

Github Forks

2

Github Stars

Crypto Portfolio MCP

An MCP server for tracking and managing cryptocurrency portfolio allocations, enabling AI agents to query and optimize portfolio strategies in real time.

GitHub License Python Version Status

Features

  • Portfolio Management: Add and track cryptocurrency holdings with real-time Binance prices.
  • Price Retrieval: Fetch current prices for any Binance trading pair (e.g., BTC/USDT).
  • Value History: Generate visual charts of portfolio value over time.
  • Analysis Prompt: Pre-built prompt for portfolio analysis with diversification and risk suggestions.
  • SQLite Storage: Persistent storage of holdings in a local database.

Installation

Prerequisites

  • Python 3.10+
  • Git (optional, for cloning the repo)
  • A compatible MCP client (e.g., Claude Desktop)

Setup

  1. Clone the Repository:

    git clone https://github.com/kukapay/crypto-portfolio-mcp.git
    cd crypto-portfolio-mcp
    
  2. Install requirements:

    pip install mcp[cli] ccxt matplotlib
    
  3. Install for Claude Desktop:

    mcp install main.py --name "CryptoPortfolioMCP"
    

    Or update the configuration file manually:

    {
      "mcpServers": {
        "crypto-portfolio-mcp": {
          "command": "python",
          "args": [ "path/to/crypto-portfolio-mcp/main.py" ]
        }
      }
    }
    

Usage

Once installed, interact with the server through an MCP client like Claude Desktop. Below are example commands:

Add a Holding

  • Prompt: "Add 0.1 BTC to my portfolio"
  • Result: Adds 0.1 BTC/USDT to your portfolio and confirms with "Added 0.1 BTC/USDT to portfolio".

Get Current Price

  • Prompt: "What's the current price of ETH on Binance?"
  • Result: Returns "Current price of ETH/USDT on Binance: $2000.50" (example price).

Portfolio Summary

  • Prompt: "What's my current portfolio summary?"
  • Result: Displays a formatted summary, e.g.:
    Portfolio Summary:
    BTC/USDT: 0.1 @ $60000.00 = $6000.00
    ETH/USDT: 2.0 @ $2000.00 = $4000.00
    Total Value: $10000.00
    

Portfolio Value History

  • Prompt: "Show me my portfolio value history"
  • Result: Generates and displays a PNG chart of your portfolio value over time.

Analyze Portfolio

  • Prompt: "Analyze my crypto portfolio"
  • Result: Provides an analysis with suggestions based on current holdings and Binance market trends.

Tools

The server exposes the following tools:

  • get_portfolio_summary: Retrieves a text summary of your current portfolio.
  • add_holding(coin_symbol: str, amount: float): Adds a cryptocurrency holding (e.g., "BTC", 0.1).
  • get_price(coin_symbol: str): Fetches the current price of a trading pair from Binance.
  • portfolio_value_history(): Generates a PNG chart of portfolio value history.

See the source code docstrings for detailed parameter descriptions.

Database

Holdings are stored in a SQLite database (portfolio.db) with the following schema:

CREATE TABLE holdings (
    id INTEGER PRIMARY KEY,
    coin_symbol TEXT,       -- e.g., "BTC/USDT"
    amount REAL,           -- Quantity of the asset
    purchase_date TEXT     -- ISO format timestamp
)

License

This project is licensed under the MIT License. See LICENSE for details.

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Lists Tailwind CSS classes in monospaced font

  • https://appia.in
  • Siri Shortcut Finder – your go-to place for discovering amazing Siri Shortcuts with ease

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • modelcontextprotocol
  • 模型上下文协议服务器

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • patruff
  • Ollama和MCP服务器之间的桥梁,使本地LLMS可以使用模型上下文协议工具

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

    Reviews

    4 (1)
    Avatar
    user_2QOh7Mz8
    2025-04-17

    As a dedicated user of crypto-portfolio-mcp by kukapay, I am thoroughly impressed by its comprehensive features for managing cryptocurrency portfolios. The user-friendly interface and the seamless integration with various exchanges make tracking investments a breeze. I highly recommend checking it out at https://github.com/kukapay/crypto-portfolio-mcp for anyone looking to optimize their crypto management.