Skip to main content
Glama

Financial Modeling Prep MCP Server

by shadi-fsai

财务建模准备 (FMP) MCP 服务器

模型上下文协议 (MCP) 服务器,通过标准化接口提供对财务建模准备 (FMP) API 数据的访问。该服务器允许像 Claude 这样的 AI 助手以编程方式访问财务数据。

特征

  • 公司简介:访问公司信息、描述、市值、员工人数和行业数据
  • 财务报表:检索损益表、资产负债表和现金流量表
  • 财务指标:获取关键指标、比率和增长数据
  • 分析师数据:获取分析师的估计和建议
  • SEC 文件:查找并检索 SEC 文件内容
  • 收益记录:获取收益电话会议记录
  • 市场数据:获取当前股票价格和国债收益率
  • 竞争对手分析:查找竞争对手公司

安装

先决条件

  • Python 3.8 或更高版本
  • UV 包管理器(推荐)或 pip
  • 财务建模准备 API 密钥

设置

  1. 克隆此存储库
  2. 使用您的 API 密钥在项目根目录中创建一个.env文件:
    # Financial Modeling Prep API Configuration FMP_KEY=your_api_key_here # Optional: SEC API Configuration SEC_ACCESS=YourCompanyName YourEmail@example.com
  3. 使用 UV 安装依赖项(推荐):
    uv venv uv pip install -r requirements.txt
    或者使用 pip:
    pip install -r requirements.txt

运行服务器

使用紫外线(推荐)

UV 提供更快的依赖项解析和安装速度。要使用 UV 运行服务器:

# Activate the virtual environment uv venv activate # Run the server python fmp_mcp_server.py

服务器将启动并监听默认 MCP 端口上的连接。

使用 pip

# Create and activate a virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Run the server python fmp_mcp_server.py

与 Claude Desktop 连接

Claude Desktop 可以连接到 MCP 服务器访问财务数据。设置方法如下:

  1. 下载Claude桌面
  2. 编辑 claude_desktop_config.json:“fmp_mcp_server”:{“command”:“uv”,“args”:[“--directory”,“用绝对目录替换我到 REPO”,“run”,“fmp_mcp_server.py”] }

现在,Claude 可以通过 MCP 接口使用 FMP 数据。您可以要求 Claude 执行以下操作:

  • 获取公司简介
  • 检索财务报表
  • 查找 SEC 文件
  • 获取市场数据
  • 还有更多!

Claude 的示例查询

连接后,您可以向 Claude 询问以下问题:

  • “我正在考虑进行为期 3 年的投资,苹果是一项好的投资吗?”
  • “给我看看特斯拉最新的季度损益表”
  • “查找微软最新的 10-K 文件”
  • “亚马逊的主要竞争对手有哪些?”
  • “获取 Meta 的最新收益记录”

配置选项

服务器支持以下环境变量:

  • FMP_KEY :您的财务建模准备 API 密钥(必需)
  • SEC_ACCESS :您的公司名称和用于 SEC API 访问的电子邮件(可选)

缓存

服务器实现了缓存系统,以减少 API 调用并提高性能:

  • 财务数据按季度/年度缓存
  • 个人资料数据每月缓存一次
  • 缓存当天的每日价格数据

缓存文件存储在DataCache目录中。

日志记录

日志被写入启用轮换的logs目录:

  • 最大日志文件大小:10MB
  • 备份文件数量:5

执照

MIT 许可证

致谢

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

模型上下文协议服务器使 Claude 等 AI 助手能够以编程方式访问来自财务建模准备 API 的财务数据,包括公司简介、财务报表、指标、SEC 文件和市场数据。

  1. 特征
    1. 安装
      1. 先决条件
      2. 设置
    2. 运行服务器
      1. 使用紫外线(推荐)
      2. 使用 pip
    3. 与 Claude Desktop 连接
      1. Claude 的示例查询
        1. 配置选项
          1. 缓存
            1. 日志记录
              1. 执照
                1. 致谢

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    MCP server that provides AI assistants access to stock market data including financial statements, stock prices, and market news through a Model Context Protocol interface.
                    Last updated -
                    11
                    453
                    Python
                    MIT License
                    • Apple
                  • A
                    security
                    F
                    license
                    A
                    quality
                    A Model Context Protocol server that allows AI assistants to query and analyze financial data through Ledger CLI, enabling tasks like financial reporting, budget analysis, and accounting.
                    Last updated -
                    9
                    23
                    Python
                    • Apple
                    • Linux
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that enables AI agents to interact with Brex financial platform data, allowing retrieval of account information, expenses, budgets, and team data through standardized resource handlers.
                    Last updated -
                    2
                    TypeScript
                    MIT License
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that connects AI assistants like Claude to Moneybird accounting software, enabling management of contacts, financial data, products, and business operations through natural language.
                    Last updated -
                    671
                    13
                    JavaScript
                    MIT License
                    • Apple

                  View all related MCP servers

                  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/shadi-fsai/fmp_mcp_server'

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