StarModel invitation
← Back to MCP directory
publicPublicdnsLocal runtime

mcp-finnhub

一个连接Finnhub API的MCP服务器,提供市场新闻、股票数据、财务信息和推荐趋势查询功能。

article

README

🚀 Finnhub MCP 服务器

Finnhub MCP 服务器是一个用于与 Finnhub API 进行交互的工具,它能帮助用户方便地获取 Finnhub 提供的各类金融数据,如市场新闻、股票市场数据、基本财务数据和推荐趋势等。

🚀 快速开始

配置环境

  1. 运行 uv sync 安装依赖项。若要安装 uv,请按照此处的说明进行操作。安装完成后,执行 source .venv/bin/activate 激活虚拟环境。
  2. 使用 Finnhub API 密钥设置 .env 文件:
FINNUB_API_KEY=<FINNHUB_API_KEY>
  1. 执行 fastmcp install server.py 安装服务器。
  2. 打开配置文件,不同系统的配置文件位置如下:
    • 在 macOS 上:~/Library/Application Support/Claude/claude_desktop_config.json
    • 在 Windows 上:%APPDATA%/Claude/claude_desktop_config.json
  3. 找到命令项 uv 并将其替换为 uv 可执行文件的绝对路径,以确保在启动服务器时使用正确的版本。
  4. 重新启动 Claude Desktop 以应用更改。

启动开发服务器

运行 fastmcp dev server.py 启动 MCP 服务器。MCP 检查器有助于本地调查和调试。

✨ 主要特性

工具列表

  • list_news
  • get_market_data
    • 功能:获取特定股票的市场数据。
    • 接口:报价端点
  • get_basic_financials
  • get_recommendation_trends

📦 安装指南

  1. 运行 uv sync 安装依赖项,若未安装 uv,请参考安装说明。
  2. 执行 source .venv/bin/activate 激活虚拟环境。
  3. 使用 Finnhub API 密钥设置 .env 文件。
  4. 执行 fastmcp install server.py 安装服务器。
  5. 按系统类型找到并修改配置文件中的 uv 路径。
  6. 重启 Claude Desktop 应用更改。
READY-TO-PASTE CONFIG

MCP client config generator

Choose your client, fill the required environment variables, then copy a config generated from this server's published metadata

terminal
data_object

This entry does not contain a standard command or remote URL, so a safe client config cannot be generated automatically

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client