
一个用于与金融数据集股票市场API交互的MCP服务器。
概览
这是一个模型上下文协议(MCP)服务器,提供从金融数据集访问股票市场数据。 它允许Claude和其他AI助手通过MCP界面直接检索损益表、资产负债表、现金流量表、股价和市场新闻。 该MCP服务器提供以下工具:- :获取公司的损益表。- :获取公司的资产负债表。- :获取公司的现金流量表。- :获取公司的当前/最新价格。- :获取公司的历史股票价格。- :获取公司的新闻。- :获取所有可用的加密货币代码。- :获取加密货币的历史价格。- :获取加密货币的历史价格。- :获取加密货币的当前/最新价格。 - Python 3.10及更高版本 - uv包管理器 2. 如果你还没安装紫外线,安装它: 1. 如果你还没安装Claude Desktop,请安装 2. 创建或编辑 Claude Desktop 配置文件: 3.
概述(AI 翻译)
引言
这是一个模型上下文协议(MCP)服务器,提供从金融数据集访问股票市场数据。
它允许Claude和其他AI助手通过MCP界面直接检索损益表、资产负债表、现金流量表、股价和市场新闻。
可用工具
该MCP服务器提供以下工具:
- get_income_statements:获取公司的损益表。
- get_balance_sheets:为一家公司获取资产负债表。
- get_cash_flow_statements:获取公司的现金流量表。
- get_current_stock_price:获取公司当前/最新价格。
- get_historical_stock_prices:获取公司的历史股票价格。
- get_company_news:为一家公司获取新闻。
- get_available_crypto_tickers:获取所有可用的加密货币代码。
- get_crypto_prices:获取加密货币的历史价格。
- get_historical_crypto_prices:获取加密货币的历史价格。
- get_current_crypto_price:获取加密货币的当前/最新价格。
布置
先决条件
- Python 3.10 或更高版本
- UV包管理器
安装
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Financial Datasets MCP Server
Introduction
This is a Model Context Protocol (MCP) server that provides access to stock market data from Financial Datasets.
It allows Claude and other AI assistants to retrieve income statements, balance sheets, cash flow statements, stock prices, and market news directly through the MCP interface.
Available Tools
This MCP server provides the following tools:
- get_income_statements: Get income statements for a company.
- get_balance_sheets: Get balance sheets for a company.
- get_cash_flow_statements: Get cash flow statements for a company.
- get_current_stock_price: Get the current / latest price of a company.
- get_historical_stock_prices: Gets historical stock prices for a company.
- get_company_news: Get news for a company.
- get_available_crypto_tickers: Gets all available crypto tickers.
- get_crypto_prices: Gets historical prices for a crypto currency.
- get_historical_crypto_prices: Gets historical prices for a crypto currency.
- get_current_crypto_price: Get the current / latest price of a crypto currency.
Setup
Prerequisites
- Python 3.10 or higher
- uv package manager
Installation
-
Clone this repository:
git clone https://github.com/financial-datasets/mcp-server cd mcp-server -
If you don’t have uv installed, install it:
# macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # Windows curl -LsSf https://astral.sh/uv/install.ps1 | powershell -
Install dependencies:
# Create virtual env and activate it uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate # Install dependencies uv add "mcp[cli]" httpx # On Windows: uv add mcp[cli] httpx -
Set up environment variables:
# Create .env file for your API keys cp .env.example .env # Set API key in .env FINANCIAL_DATASETS_API_KEY=your-financial-datasets-api-key -
Run the server:
uv run server.py
Connecting to Claude Desktop
-
Install Claude Desktop if you haven’t already
-
Create or edit the Claude Desktop configuration file:
# macOS mkdir -p ~/Library/Application\ Support/Claude/ nano ~/Library/Application\ Support/Claude/claude_desktop_config.json -
Add the following configuration:
{ "mcpServers": { "financial-datasets": { "command": "/path/to/uv", "args": [ "--directory", "/absolute/path/to/financial-datasets-mcp", "run", "server.py" ] } } }Replace
/path/to/uvwith the result ofwhich uvand/absolute/path/to/financial-datasets-mcpwith the absolute path to this project. -
Restart Claude Desktop
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"financial-datasets": {
"command": "/path/to/uv",
"args": [
"--directory",
"/absolute/path/to/financial-datasets-mcp",
"run",
"server.py"
]
}
}
}