Token导航 LogoToken导航TokenDH.com
Y2kfund MCP logo
金融服务stdio官方级别未说明来源级核验

Y2kfund MCP

MCP Server

Y2K Fund MCP Server 是一个用于查询 Y2K Fund 交易数据的模型上下文协议服务器,提供实时持仓、市场价格、期权数据等功能,适用于金融分析和交易监控场景。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
金融数据PythonClaude实时查询Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

y2kfund

提供方

y2kfund

最后核验

2026/5/17 20:22

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install git+https://github.com/y2kfund/y2kfund-mcp.git

详细介绍

Y2K基金MCP服务器

![License: MIT](https://opensource.org/licenses/MIT) ![Python 3.10+](https://www.python.org/downloads/)

模型上下文协议(MCP)服务器,用于在Claude Desktop中直接查询Y2K基金交易数据。获取实时头寸、市场价格、期权数据等。

特性

可用工具

  • get_positions -按交易品种查询最新股票头寸

- 退货数量、市值、未实现损益、平均成本 - 显示包含法人实体信息的所有帐户的数据

即将推出

  • get_market_price -实时市场价格
  • get_call_options -看涨期权数据和分析
  • get_put_options -看跌期权数据和分析
  • get_trades -历史贸易数据
  • get_margin_impact -保证金要求和影响

安装

先决条件

快速安装(推荐)

  1. 通过Claude桌面配置安装

打开您的Claude Desktop配置文件:

- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - 视窗: %APPDATA%\Claude\claude_desktop_config.json - Linux: ~/.config/Claude/claude_desktop_config.json

  1. 增加Y2K基金MCP服务器
   {
     "mcpServers": {
       "y2kfund": {
         "command": "uvx",
         "args": [
           "--from",
           "git+https://github.com/y2kfund/y2kfund-mcp",
           "y2kfund-mcp"
         ]
       }
     }
   }
  1. 重新启动克劳德桌面

服务器将在首次使用时自动安装。

替代方案:手动安装

# Install from GitHub
pip install git+https://github.com/y2kfund/y2kfund-mcp.git

# Or clone and install locally
git clone https://github.com/y2kfund/y2kfund-mcp.git
cd y2kfund-mcp
pip install -e .

然后更新您的Claude配置以使用direct命令:

{
  "mcpServers": {
    "y2kfund": {
      "command": "y2kfund-mcp"
    }
  }
}

用法

安装后,您可以向Claude自然语言提问:

查询示例

获取职位:

"Get my MSFT positions"
"Show positions for META"
"What are my AAPL holdings?"

分析职位:

"Show me all my TSLA positions and calculate the total P&L"
"Compare my MSFT and GOOG positions"
"What's my biggest position loss?"

工具参考

get_positions

从Y2K基金账户按代码获取最新股票头寸。

参数:

参数类型必填说明
symbolstring股票代码(例如MSFT、META、AAPL)

示例响应:

Found 2 position(s) for MSFT:

Position 1:
  Account: Y2K Fund LLC
  Quantity: 1,500 shares
  Market Value: $758,637.41
  Current Price: $505.76
  Avg Cost: $523.13
  Unrealized P&L: -$26,053.08
  P&L %: -3.32%

Position 2:
  Account: Y2K Fund LP
  Quantity: 10,055 shares
  Market Value: $5,085,238.31
  Current Price: $505.74
  Avg Cost: $521.05
  Unrealized P&L: -$153,943.86
  P&L %: -2.95%

Total Summary:
  Total Shares: 11,555
  Total Market Value: $5,843,875.72
  Total Unrealized P&L: -$179,996.94

API端点

此MCP服务器连接到: https://ibkr-data-fetch.y2k.fund

API可供公众查阅,并可从Y2K基金的交易账户返回实时数据。

发展

项目结构

y2kfund-mcp/
├── src/
│   └── y2kfund_mcp/
│       ├── __init__.py
│       ├── server.py          # Main MCP server
│       ├── config.py          # API configuration
│       └── tools/
│           ├── __init__.py
│           ├── base.py        # Base tool class
│           └── positions.py   # Positions tool
├── examples/
│   └── claude_config.json     # Example configuration
├── pyproject.toml
├── requirements.txt
├── LICENSE
└── README.md

添加新工具

  1. 在中创建新的工具文件 src/y2kfund_mcp/tools/
  2. 从……继承…… BaseTool
  3. 实施所需的属性和 execute() 方法
  4. 注册 src/y2kfund_mcp/server.py

例子:

# tools/market_price.py
from .base import BaseTool

class MarketPriceTool(BaseTool):
    @property
    def name(self) -> str:
        return "get_market_price"
    
    @property
    def description(self) -> str:
        return "Get current market price for a symbol"
    
    @property
    def input_schema(self):
        return {
            "type": "object",
            "properties": {
                "symbol": {"type": "string"}
            },
            "required": ["symbol"]
        }
    
    async def execute(self, arguments):
        data = await self.api_call("/query/price", params=arguments)
        return f"Price: ${data['price']}"

本地运行

# Clone the repo
git clone https://github.com/y2kfund/y2kfund-mcp.git
cd y2kfund-mcp

# Install dependencies
pip install -e .

# Run the server
python -m y2kfund_mcp.server

故障排除

“服务器没有响应”

  1. 检查克劳德桌面日志:

- macOS: ~/Library/Logs/Claude/mcp*.log - 视窗: %APPDATA%\Claude\Logs\mcp*.log

  1. 验证安装:
   uvx --from git+https://github.com/y2kfund/y2kfund-mcp y2kfund-mcp --version
  1. 测试API终点:
   curl "https://ibkr-data-fetch.y2k.fund/query/positions?symbol=MSFT"

“未知工具”错误

请确保在更新配置后重新启动了Claude Desktop。

API连接问题

服务器需要互联网接入才能连接到 https://ibkr-data-fetch.y2k.fund。检查防火墙设置。

贡献

欢迎投稿!请随时提交拉取请求。

  1. 分叉存储库
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

支持

更新日志

v1.0.0(2025-11-11)

  • 初始版本
  • 添加 get_positions 查询库存头寸的工具
  • 支持用户特定的帐户别名
  • 全面的损益计算和总结

______________________________________________________________________

由以下材料制成❤️ Y2K基金

目录标签

目录标签

金融数据PythonClaude实时查询本地部署交易分析投资管理API服务

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP