Skip to main content
Glama
kukapay

crypto-portfolio-mcp

by kukapay

加密投资组合 MCP

用于跟踪和管理加密货币投资组合分配的 MCP 服务器,使 AI 代理能够实时查询和优化投资组合策略。

GitHub 许可证Python 版本地位

特征

  • 投资组合管理:通过实时币安价格添加和跟踪加密货币持有量。

  • 价格检索:获取任何币安交易对(例如 BTC/USDT)的当前价格。

  • 价值历史:生成投资组合价值随时间变化的可视化图表。

  • 分析提示:预先构建的投资组合分析提示,包含多样化和风险建议。

  • SQLite 存储:在本地数据库中持久存储资产。

Related MCP server: crypto-stocks-mcp

安装

先决条件

  • Python 3.10+

  • Git(可选,用于克隆 repo)

  • 兼容的 MCP 客户端(例如Claude Desktop

设置

  1. 克隆存储库

    git clone https://github.com/kukapay/crypto-portfolio-mcp.git
    cd crypto-portfolio-mcp
  2. 安装要求

    pip install mcp[cli] ccxt matplotlib
  3. 为 Claude Desktop 安装

    mcp install main.py --name "CryptoPortfolioMCP"

    或者手动更新配置文件:

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

用法

安装完成后,通过 MCP 客户端(例如 Claude Desktop)与服务器交互。以下是示例命令:

添加控股

  • 提示:“向我的投资组合添加 0.1 BTC”

  • 结果:向您的投资组合添加 0.1 BTC/USDT,并通过“向投资组合添加 0.1 BTC/USDT”进行确认。

获取当前价格

  • 提示:“币安上 ETH 的当前价格是多少?”

  • 结果:返回“币安上 ETH/USDT 的当前价格:2000.50 美元”(示例价格)。

投资组合摘要

  • 提示:“我当前的投资组合摘要是什么?”

  • 结果:显示格式化的摘要,例如:

    Portfolio Summary:
    BTC/USDT: 0.1 @ $60000.00 = $6000.00
    ETH/USDT: 2.0 @ $2000.00 = $4000.00
    Total Value: $10000.00

投资组合价值历史

  • 提示:“显示我的投资组合价值历史”

  • 结果:生成并显示您的投资组合价值随时间变化的 PNG 图表。

分析投资组合

  • 提示:“分析我的加密货币投资组合”

  • 结果:根据当前持股情况和币安市场趋势提供分析和建议。

工具

该服务器公开以下工具:

  • get_portfolio_summary :检索当前投资组合的文本摘要。

  • add_holding(coin_symbol: str, amount: float) :添加加密货币持有量(例如“BTC”,0.1)。

  • get_price(coin_symbol: str) :从币安获取交易对的当前价格。

  • portfolio_value_history() :生成投资组合价值历史的 PNG 图表。

有关详细参数描述,请参阅源代码文档字符串。

数据库

持股信息存储在 SQLite 数据库 ( portfolio.db ) 中,其架构如下:

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
)

执照

本项目遵循 MIT 许可证。详情请参阅许可证

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    An MCP server that tracks real-time data for major crypto-related stocks to help AI agents analyze blockchain investment opportunities.
    3
    3
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    A portfolio analysis MCP server that enables AI agents to manage investment portfolios, fetch financial data from Yahoo Finance and CoinGecko, and perform advanced analysis like weight optimization and Monte Carlo simulations. It utilizes reference-based caching to efficiently handle large datasets without bloating the LLM's context window.
    26
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that provides AI agents with structured, real-time data on cryptocurrency investment funds, enabling deeper due diligence and portfolio intelligence.
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server connecting AI agents to non-custodial staking data across 130+ networks.

  • MCP server for Gainium — manage trading bots, deals, and balances via AI assistants

  • HiveCapital MCP Server — autonomous investment layer for AI agents

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/kukapay/crypto-portfolio-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server