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 分

    请在仓库或注册中心条目中声明许可证。