Finlab Ai

io.github.koreal6803由 GitHub 帳號 koreal6803 發布v1.1.0更新於 Oct 24, 2026

Quantitative trading toolkit with 900+ data columns, backtesting, and 60+ strategy examples.

已驗證Streamable HTTP可網頁執行金融知識與記憶資料與分析

概覽

AI 產生的概覽

FinLab 託管唯讀 MCP 伺服器,讓助理取得台股與美股策略回測、個股因子實證、資料目錄與 FinLab 文件。

可以做什麼
  • 列出並讀取 FinLab 公開台股策略,含回測績效(年化報酬、Sharpe、最大回撤)與可直接執行的 Python 程式碼
  • 查詢單一個股每日更新的實證資料:基本面與估值百分位、籌碼因子、觸發中的量化訊號及歷史前瞻報酬
  • 取得 FinLab 量化資料庫目錄摘要:分類數、欄位數、資料列數、年份範圍與代表性資料集
  • 檢索 FinLab Skill 開發文件,涵蓋資料欄位、sim() 回測 API、策略範例、因子分析與機器學習
  • 取得快速上手說明,介紹如何在本機安裝 FinLab 並跑第一個回測
適用情境
適合讓助理研究台股或美股策略、查看回測績效,或查詢特定個股的因子與訊號實證,而不必自行撰寫爬蟲或回測程式碼。撰寫 finlab Python 程式前查閱資料欄位與 API 用法時也很有用。
執行需求
遠端 streamable HTTP 端點 mcp.finlab.finance;未宣告需要安裝套件、環境變數或請求標頭。README 指出,若要透過另一套 skill 在本機執行策略,需安裝 finlab Python 套件、在瀏覽器登入並擁有 FinLab 帳號(免費帳號含 7 天試用)。
安裝前請注意
託管伺服器被描述為唯讀,但本機 skill 會下載市場資料,並記載券商下單 API;README 稱助理應先預覽並在下真實單前等待確認。登入會建立 FinLab 帳號,試用期有限。策略程式與資料在本機執行,除非你要求否則不上傳。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Finlab Ai,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.koreal6803%2Ffinlab-ai/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "finlab-ai": {
      "type": "http",
      "url": "https://mcp.finlab.finance/mcp"
    }
  }
}

README

FinLab AI

Let AI discover your next alpha.

FinLab AI is an official product of FinLab. FinLab official website: https://finlab.finance

Backtest Taiwan and U.S. stocks from Claude Code, Codex or Gemini CLI: your AI gets real market data and the FinLab backtest engine, with no scraping or backtest code of your own.

用 Claude Code、Codex 回測台股:AI 直接讀還原股價、月營收、財報、三大法人資料,用 FinLab 回測引擎驗證策略。


[Demo]

Installation

bash
npx skills add koreal6803/finlab-ai --skill finlab -g -y

This installs the skill for Claude Code, Codex, Cursor and other tools that read Agent Skills, for every project on this machine. Or use your tool's own plugin command:

ToolCommand
Claude Code/plugin install finlab-plugin --marketplace koreal6803/finlab-ai
Codexcodex plugin marketplace add koreal6803/finlab-ai, then codex plugin add finlab-plugin@finlab-ai
CursorCustomize > From GitHub Repository > koreal6803/finlab-ai

Then ask your AI: "Backtest a Taiwan stock strategy that buys the strongest monthly revenue growth." The first run asks you to sign in to FinLab once in your browser, which creates a free account with a 7-day full trial, no credit card needed.

What it does on your machine

The skill is documentation: it has no hooks and no bundled programs. It tells your AI tool to install the finlab Python package with uv, sign in with python -m finlab login, which opens your browser, and download market data from FinLab. Strategy code runs on your machine, and nothing is uploaded unless you ask for it. It also documents broker order APIs, and tells your AI to show you a preview and wait for your confirmation before placing any real order.

MCP Server

A hosted, read-only MCP server (streamable HTTP) is available — no install required:

bash
claude mcp add --transport http finlab https://mcp.finlab.finance/mcp

Tools: list_strategies, get_strategy (with Python code), get_stock_evidence, get_data_catalog, get_finlab_docs (this skill's docs, always in sync with main), how_to_start. Listed on the MCP Registry as io.github.koreal6803/finlab-ai (see server.json). The old finlab-ai.koreal6803.workers.dev endpoint is retired.

Documentation

DocumentContent
Data Reference900+ columns across 80+ tables
Backtesting Referencesim() API, resampling, metrics
Factor Examples60+ complete strategy examples
Best PracticesPatterns, anti-patterns, tips
ML ReferenceFeature engineering, labels

Learn more

來源:README.md,提交 b4541ea

工具

6

list_strategies

列出 FinLab 策略庫

列出 FinLab 公開策略庫中的台股量化策略,含每一檔策略的真實回測績效摘要(CAGR、Sharpe、最大回撤)與基準比較。想看完整策略內容與 Python 程式碼時,請接著呼叫 get_strategy。

無需輸入參數。

get_strategy

取得單一策略完整內容

取得 FinLab 策略庫中單一策略的完整快照:策略說明、真實回測績效與基準比較、以及可直接執行的 finlab Python 程式碼。slug 可先用 list_strategies 查詢。

輸入參數slug必填

get_stock_evidence

查個股數據實證

查詢台股個股的每日更新數據實證:基本面體質定位(獲利、估值、籌碼因子百分位)、目前正在觸發的量化訊號與其歷史前瞻報酬統計、估值位階等。例如 symbol="2330" 查台積電。資料來自 FinLab 每日以 finlab 套件計算的真實數據。

輸入參數marketsymbol必填

get_data_catalog

FinLab 資料庫目錄摘要

取得 FinLab 量化資料庫的目錄摘要:涵蓋台股與美股的分類數、欄位數、資料列數、年份範圍,以及代表性資料集(股價、月營收、財務指標等)。適合回答「FinLab 有哪些資料」。

無需輸入參數。

get_finlab_docs

FinLab Skill 開發文件

取得 FinLab Skill 的開發文件(與 GitHub koreal6803/finlab-ai main 分支同步,skill 更新後自動生效):不帶參數回傳 SKILL.md 主文件與參考文件清單;帶 doc 參數回傳指定參考文件全文。涵蓋 900+ 資料欄位、sim() 回測 API、60+ 策略範例、因子分析與機器學習等,撰寫 finlab Python 程式前建議先查閱。

輸入參數doc

how_to_start

FinLab 快速上手

取得 FinLab 快速上手指南:如何用 AI 輔助流程(Claude cowork / Codex)在自己電腦安裝 FinLab 並跑第一個台股策略真實回測,以及免費線上體驗入口。適合回答「怎麼開始用 FinLab」「怎麼回測台股」。

無需輸入參數。

版本歷史

1
  1. v1.1.0最新Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。