Skip to main content

FinMind MCP server — Taiwan / global financial data for Claude, Gemini CLI, Cursor, Windsurf, and other MCP hosts

Project description

FinMind-MCP

FinMind 官方 Model Context Protocol server。 讓 Claude、Gemini CLI、Cursor、Windsurf 等支援 MCP 的 AI 工具,能用自然語言查 FinMind 75+ 種台股、期權、總經與全球金融資料。

倉庫同時收錄 FinMind Custom GPT 的 OpenAPI Action schema 與 編譯 instructions 工具——MCP server 與 Custom GPT 共用一份知識包knowledge/)。

快速開始

# 取 Token: https://finmindtrade.com/analysis/#/account/user
export FINMIND_TOKEN=your-token

# 一行裝
uvx finmind-mcp
# 或
pipx install finmind-mcp

在各 host 啟用

Host 安裝指引
Claude Desktop install/claude-desktop.md
Claude Code install/claude-code.md
Claude.ai (Web) install/claude-ai.md
Cursor install/cursor.md
Windsurf install/windsurf.md
Gemini CLI install/gemini-cli.md

範例查詢

  • 「台積電最近一個月股價」
  • 「2330 三大法人近一週買賣」
  • 「台積電今年每月營收」
  • 「美元對台幣匯率近半年走勢」

完整範例見 knowledge/examples.md

倉庫結構

FinMind-MCP/
├── src/finmind_mcp/      # MCP server source
├── tests/                # pytest 31 個測試
├── smoke.py              # stdio smoke test
├── knowledge/            # SSOT markdown(dataset、行為規則、錯誤腳本、Q&A)
├── chatgpt/              # Custom GPT artifacts(OpenAPI + build script)
├── install/              # 各 host 安裝指引
└── docs/                 # 設計 spec 與實作 plan

開發

uv venv --python 3.10
source .venv/bin/activate
uv pip install -e ".[dev]"
uv run pytest -v          # 31 tests
uv run python smoke.py    # stdio integration check

同步發佈

兩條 distribution(ChatGPT 與 MCP)共用一份 knowledge/,但發佈流程不同。

Custom GPT(ChatGPT 線)

python chatgpt/build_instructions.py
# 產出:
# - chatgpt/instructions.txt      → 貼到 OpenAI Custom GPT instructions
# - chatgpt/knowledge_bundle.md   → 上傳到 Custom GPT Knowledge files
# - chatgpt/openapi.yaml          → 在 Custom GPT Action 匯入

MCP server(Claude / Gemini / Cursor / Windsurf 線)

MCP server runtime 直接讀 knowledge/不用 compileknowledge/ 改完後直接 bump version + 發版。knowledge/ 會被 hatch 透過 force-include 打包進 wheel(搬到 finmind_mcp/_knowledge/),pip install 後 server 仍能讀到。

# 1. 改完 knowledge/,跑既有測試
uv run pytest -q

# 2. bump 版本(pyproject.toml [project].version)
# 3. 建 sdist + wheel
uv build
# 產出 dist/finmind-mcp-<ver>.tar.gz、dist/finmind_mcp-<ver>-py3-none-any.whl
# 兩者都已內含 knowledge/(wheel 路徑:finmind_mcp/_knowledge/*.md)

# 4. 發 PyPI
uv publish
# 之後用戶用 `uvx finmind-mcp` 或 `pipx install finmind-mcp` 就會抓到新版

# 5. 部署 remote endpoint mcp.finmindtrade.com(給 Claude.ai integrations)
# 走既有 service repo 的 docker compose + traefik 路徑

各 host 安裝方式見 install/*.md;同一份 server code 在所有 MCP host 共用。

License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

finmind_mcp-0.0.1.tar.gz (35.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

finmind_mcp-0.0.1-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file finmind_mcp-0.0.1.tar.gz.

File metadata

  • Download URL: finmind_mcp-0.0.1.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for finmind_mcp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 20824408f093ec0bec85a1d2c79e7429f434a6c81e1a76a739fc03fcf4674269
MD5 5ddc60c643e05d48b88c27a2b96dd2c5
BLAKE2b-256 1d7f97247936f253fbd216cd9786058cfe15f81ef13a91561595a87a34e37445

See more details on using hashes here.

Provenance

The following attestation bundles were made for finmind_mcp-0.0.1.tar.gz:

Publisher: publish.yml on FinMind/FinMind-MCP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file finmind_mcp-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: finmind_mcp-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for finmind_mcp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 236a2622dbe89b08c1a638784201d81f4148486be20b992d84306bb48803c66c
MD5 ed316dba270731ed22dddc8b25fd6846
BLAKE2b-256 b28f3a0a9727b85b2aef2e1603393e61aa9429f74a15fb067607dac22035b1af

See more details on using hashes here.

Provenance

The following attestation bundles were made for finmind_mcp-0.0.1-py3-none-any.whl:

Publisher: publish.yml on FinMind/FinMind-MCP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page