Financial Reports MCP Server

Financial Reports MCP Server

site icon
2025.04.18 1
Python金融分析投资研究公司财务数据查询行业分类数据查询金融服务
Financial Reports MCP Server 是一个基于 Model Context Protocol (MCP) 的服务,主要用于访问 Financial Reports API,提供公司财务报告、行业分类及相关数据的工具和资源。该服务支持通过公司名称、国家或行业搜索公司信息,获取详细的财务报告内容,以及查询行业分类等。
View on GitHub

Overview

基本能力

产品定位

Financial Reports MCP Server 是一个专门用于访问和查询公司财务报告及行业分类数据的服务,适用于金融分析、投资研究等场景。

核心功能

  • 通过公司名称、国家或行业搜索公司信息
  • 获取详细的财务报告内容
  • 查询行业分类信息
  • 获取最新的财务报告详情

适用场景

  • 金融分析
  • 投资研究
  • 公司财务数据查询
  • 行业分类数据查询

工具列表

  • get_filing_type(filing_type_id): 获取特定报告类型的详细信息
  • list_industries(industry_group, page, page_size, search): 列出所有可用的 GICS 行业
  • get_industry(industry_id): 获取特定行业的详细信息
  • list_industry_groups(sector, page, page_size, search): 列出所有可用的 GICS 行业组
  • get_industry_group(group_id): 获取特定行业组的详细信息
  • get_sector(sector_id): 获取特定行业的详细信息
  • list_sub_industries(industry, page, page_size, search): 列出所有可用的 GICS 子行业
  • get_sub_industry(sub_industry_id): 获取特定子行业的详细信息
  • list_sources(page, page_size): 列出所有可用的数据源
  • get_source(source_id): 获取特定数据源的详细信息
  • get_processed_filing(processed_filing_id): 获取处理后的报告内容
  • get_schema(format, lang): 获取 API 的 OpenAPI3 架构
  • search_companies(params): 通过名称、ISIN、LEI 等搜索公司
  • get_company_detail(company_id): 获取公司的详细信息
  • get_latest_filings(params): 获取最新的财务报告
  • get_filing_detail(filing_id): 获取特定报告的详细信息
  • list_sectors(): 列出所有可用的 GICS 行业
  • list_filing_types(): 列出所有可用的报告类型

常见问题解答

  1. 与 Claude Desktop 的通信问题:
  2. 确保在配置 Claude Desktop 时使用 stdio 传输
  3. 对于 Docker,确保包含 -i 标志以启用交互模式

  4. “模块未找到”错误:

  5. 确保所有依赖项已通过 pip install -r requirements.txt 安装

  6. 无法连接到 MCP 服务器:

  7. 检查服务器是否正在运行且可从客户端访问

  8. API 认证错误:

  9. 验证 .env 文件中的 API 密钥

使用教程

使用依赖

  • Python 3.11+
  • Docker (推荐)
  • FastMCP (如果本地运行)
  • dotenv 用于环境变量管理 (如果本地运行)

安装教程

选项 1: Docker (推荐)

# 构建 (一次性)
docker build -t financial-reports-mcp .

# 运行
docker run --rm -i \
  -e API_KEY=your_api_key_here \
  -e API_BASE_URL=https://api.financialreports.eu/ \
  -e MCP_TRANSPORT=stdio \
  financial-reports-mcp:latest

选项 2: Smithery CLI (for Claude)

npx -y @smithery/cli@latest install \
  @itisaevalex/financial-reports-mcp-server \
  --client claude \
  --key smithery_api_key

选项 3: 本地 Python (开发/测试)

  1. 安装依赖:
python -m venv venv           # 创建 venv
venv\Scripts\activate        # 在 Windows 上激活
pip install -r requirements.txt
  1. 运行服务器:
python -m src.financial_reports_mcp
# 或使用 uv
uv run src/financial_reports_mcp.py

调试方式

运行测试套件:

python examples/test_server.py

查看 Docker 日志:

docker logs <container-id>

许可证

该项目遵循 Other 开源许可条款,请参阅 Other 了解完整条款。