
将财务数据导入Claude桌面的MCP服务器
概览
一个模型上下文协议服务器,通过yfinance(雅虎财经API)向Claude Desktop提供财务数据。大部分代码由Claude编写。 - Python 3.10 或更高版本 - Claude 桌面版 1. 克隆该仓库:2. 安装所需的软件包: 在你的Claude桌面配置文件claude_desktop_config.json中添加(Windows上通常是%APPDATA%/Claude/): 用你 server.py 文件的完整路径替换路径。 1. 重启Claude桌面 2.在菜单中寻找yfinance服务器 🔌 3.示例查询:- 获取当前股价:“帮我获取微软当前股价” - 获取历史数据:“分析过去三个月苹果股价”- 检查持股情况:“英伟达的初始持股是多少?”- 查看分析师目标:“TSLA的中位数目标股价是多少?” 修改服务器:1. 直接编辑 server.py 2.
概述(AI 翻译)
一个模型上下文协议服务器,通过yfinance(雅虎财经API)向Claude Desktop提供财务数据。 大部分代码由Claude创作。
安装
要求
- Python 3.10 或更高版本
- Claude桌面
安装
-
克隆这个仓库:
-
安装所需的软件包:
配置
在你的Claude桌面配置文件claude_desktop_config.json中添加(Windows上通常是%APPDATA%/Claude/):
用你 server.py 文件的完整路径替换路径。
用途
- 重启 Claude Desktop
- 在菜单中寻找yfinance服务器 🔌
- 示例查询:
- 获取当前股价:“帮我获取MSFT当前股价”
- 获取历史数据:“分析过去三个月苹果股权表现”
- 检查所有权:“Nvidia的初始所有权是什么?”
- 检查分析师目标:“TSLA的中位数目标价格是多少?”
发展
修改服务器:
- 直接编辑 server.py
- 重启 Claude Desktop 以应用更改
TODO
* 添加完整的yfinance功能
- 检查MCP服务器是否符合人为推荐的做法
本页由 AI 翻译,技术细节请以原文为准。
README
yfinance MCP Server
A Model Context Protocol server that provides financial data to Claude Desktop using yfinance (Yahoo Finance api). Most code created by Claude.
Installation
Requirements
- Python 3.10 or higher
- Claude Desktop
Install
- Clone this repo:
git clone https://github.com/9nate-drake/mcp-yfinance
- Install required packages:
pip install mcp yfinance
Configuration
Add to your Claude Desktop config file claude_desktop_config.json (on Windows this is usually at %APPDATA%/Claude/):
{
"mcpServers": {
"yfinance": {
"command": "python",
"args": [
"/path/to/finance_server/server.py"
]
}
}
}
Replace the path with the actual full path to your server.py file.
Usage
- Restart Claude Desktop
- Look for the yfinance server in the 🔌 menu
- Example queries:
- Get current stock price: “Get me the current stock price for MSFT”
- Get historical data: “Analyse the last 3 months of Apple stock performance”
- Check ownership: “What’s the intsitutional ownership of Nvidia?”
- Check analyst targets: “What’s the median price target for TSLA?”
Development
To modify the server:
- Edit server.py directly
- Restart Claude Desktop to apply changes
TODO
* Add complete range of yfinance functions
- Check compliance with anthropic recommended practice for mcp servers
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"yfinance": {
"command": "python",
"args": [
"/path/to/finance_server/server.py"
]
}
}
}