
自托管的只读金融MCP服务器,适用于台湾及全球股票。请自带FinMind和Finnhub账号。
概览
自托管、只读的台湾上市证券和全球股票金融市场服务器。它检索市场数据并计算可重复的指标;不做投资决策或进行交易。 运行你自己的实例。这个项目会引导其他人到维护者的服务器,捆绑 API 凭证,需要 OpenConnector,或者需要托管账户。 - 公开默认情况下,直接调用 FinMind 和 Finnhub,使用本地 .env 的凭证。- FinMind 为可选,支持匿名访问,且限制较低。Finnhub 支持的工具需要你自己的 API 密钥。- 高级部署可以选择 OpenConnector 适配器,因此该过程只保留一个狭窄的运行时令牌。- .env、OAuth 状态、私钥、SQLite 数据库和生成的凭证被 Git 忽略。 要输入 Finnhub API 密钥而不暴露在 shell 历史中,请使用交互式助手并选择是否重启服务: - 不含OAuth的内部MCP:http://127.0.0.
概述(AI 翻译)
自主机、只读的金融市场**MCP(模型上下文协议,AI客户端调用外部工具的标准)**服务器,适用于台湾上市证券和全球股票。它检索市场数据并计算可重复的指标;不做投资决策或交易。
繁體中文
这个仓库存在的原因
运行你自己的实例。本项目不将他人路由到维护者的服务器,捆绑API凭证,要求OpenConnector,也不要求托管账户。
- 公开默认会直接调用FinMind和Finnhub,使用你本地
.env的凭证。 - FinMind为可选,支持匿名访问且限制较低。Finnhub支持的工具需要你自己的API密钥。
- 高级部署可以选择OpenConnector适配器,因此该过程仅保留一个狭窄的运行时令牌。
.env、OAuth 状态、私钥、SQLite 数据库和生成的凭证被 Git 忽略。
三步自主机
要输入 Finnhub API 密钥而不暴露在 shell 历史中,请使用交互式助手并选择是否重启服务:
请核实两个本地服务:
- 不含OAuth的内部MCP:
http://127.0.0.1:8010/mcp
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Pipe Stock Analysis
Self-hostable, read-only financial-market MCP (Model Context Protocol, a standard for AI clients to invoke external tools) server for Taiwan-listed securities and global stocks. It retrieves market data and computes reproducible indicators; it does not make investment decisions or place trades.
Why this repository exists
Run your own instance. This project does not route other people to the maintainer’s server, bundle API credentials, require OpenConnector, or require a hosted account.
- The public default calls FinMind and Finnhub directly with credentials from your local
.env. - FinMind is optional and supports anonymous access with lower limits. Finnhub-backed tools require your own API key.
- Advanced deployments can select the OpenConnector adapter so this process holds only a narrow runtime token.
.env, OAuth state, private keys, SQLite databases, and generated credentials are ignored by Git.
Three-step self-hosting
# 1. Clone
git clone https://github.com/Gratia2533/pipe-stock-analysis.git && cd pipe-stock-analysis
# 2. Create local configuration; optionally add FINMIND_TOKEN / FINNHUB_API_KEY
cp .env.example .env
# 3. Start with the default Direct adapter on a standard Docker bridge network
docker compose up -d --build
To enter a Finnhub API key without exposing it in shell history, use the interactive helper and choose whether to restart the services:
./scripts/set-finnhub-key.sh
Verify both local services:
curl http://127.0.0.1:8010/healthz
curl http://127.0.0.1:8011/healthz
- Internal MCP without OAuth:
http://127.0.0.1:8010/mcp - OAuth-protected MCP:
http://127.0.0.1:8011/mcp
Both endpoints are published only on 127.0.0.1. Keep port 8010 private; expose only port 8011 through a public HTTPS reverse proxy or tunnel.
Data backends
Direct (default)
DATA_BACKEND=direct
FINMIND_TOKEN=
FINNHUB_API_KEY=
The service starts without either optional credential, so TWSE, TPEx, MOPS, news, and deterministic analytics remain available. FinMind uses anonymous limits when its token is empty. A Finnhub tool reports a configuration error only when called without FINNHUB_API_KEY.
OpenConnector (advanced, Linux/WSL)
Use this mode when a dedicated OpenConnector already exposes the curated FinMind and Finnhub Actions. The advanced Compose injects only its runtime token; upstream credentials remain in OpenConnector’s encrypted credential store. For fail-closed separation, FINMIND_TOKEN and FINNHUB_API_KEY must be unset in this mode.
DATA_BACKEND=openconnector
OPEN_CONNECTOR_BASE_URL=http://127.0.0.1:8001
OPEN_CONNECTOR_RUNTIME_TOKEN=your-local-runtime-token
Because a bridged container cannot reach a connector bound to host loopback, the advanced Compose file intentionally uses Linux/WSL host networking while both services remain bound to 127.0.0.1:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →