Xfinlab

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

Financial intelligence for AI agents: market events, sentiment, technicals, news feed.

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取金融資料與分析

概覽

AI 產生的概覽

遠端金融情報 MCP 伺服器,讓助理取得市場新聞、FinBERT 情緒、技術訊號、全球宏觀快照與依日期還原的 SEC 基本面資料。

可以做什麼
取得近期市場與公司新聞標題,可依股票代號篩選,回傳標題、來源與連結但不含正文。取得某檔股票近期標題的 FinBERT 情緒標籤、信心度與平均分數。依據 OHLC 價格資料擷取趨勢、MACD、成交量、圖表型態與市場結構訊號。讀取 AI 分群的事件流,含實體、情緒脈絡與撰寫的敘述摘要。取得跨區域全球市場快照,含宏觀指標、區域新聞與情緒。依指定日期查詢美股公司的時點 SEC 10-K 基本面資料。
適用情境
適合助理需要回答市場新聞、情緒、技術型態或公司基本面問題,並希望答案立基於實際計算或官方來源資料而非模型記憶的情境。適用於研究、篩選與分析工作流程,尤其是想直接使用託管資料來源而不自行建置的情況。
執行需求
使用託管於 api.xfinlab.com 的遠端端點,無需本機安裝。需要 XFINLAB API 金鑰,透過 X-API-Key 標頭傳送;免費額度金鑰須在服務商網站申請。需要能連線至服務商的網路。
安裝前請注意
API 金鑰屬機密,經 X-API-Key 標頭傳遞,應避免寫入共用設定或日誌。股票代號與日期等查詢會傳送至第三方託管服務。回傳的是市場資料與模型推導的情緒或訊號,不構成投資建議;README 說明尚未量測正常運行時間或回應時間 SLA。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Xfinlab,將其新增到工作區。
  2. 連接 X-API-Key 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
  3. 為需要使用其工具的對話啟用該服務。

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

交給代理程式安裝

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

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

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

其他 MCP 客戶端

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

{
  "mcpServers": {
    "xfinlab": {
      "type": "http",
      "url": "https://api.xfinlab.com/api/mcp",
      "headers": {
        "X-API-Key": "<YOUR_API_KEY>"
      }
    }
  }
}

README

XFINLAB

Financial Intelligence Infrastructure — APIs, SDKs, and an MCP server for developers and AI agents, plus a consumer research platform built on the same backend.

Real market events, FinBERT sentiment, technical/market-structure analysis, SEC/CFTC/FDIC/USDA/CBOE official data, and Monte Carlo stress testing. Every field is traceable to a real computation or an official data source — nothing fabricated or interpolated.

Architecture · Get a free API key · API docs · llms.txt · Consumer product

Quick start (API)

bash
pip install "git+https://github.com/lnanology/Xfinlab.git#subdirectory=sdk/python"
python
from xfinlab_intelligence import XfinlabClient
client = XfinlabClient(api_key="xfl_...")  # free tier, issued instantlysentiment = client.sentiment("AAPL")technical = client.technical("AAPL", period="6mo")fundamentals = client.fundamentals("AAPL")

Or JavaScript/Node:

bash
npm install "github:lnanology/Xfinlab#path:sdk/js"
js
const { XfinlabClient } = require('xfinlab-intelligence');const client = new XfinlabClient('xfl_...');const sentiment = await client.sentiment('AAPL');

19 endpoints total — market events, sentiment, AI debate, technical/market-structure, Monte Carlo stress testing, insider trading, institutional ownership, short interest, SEC XBRL fundamentals, CBOE VIX term structure, FDIC bank health, USDA agriculture, EIA energy, crypto, cross-region market map, and Pro-tier webhooks. Full reference: intelligence-api.html.

MCP server (for Claude and other AI agents)

Every field this server returns is either a real computation/real official-source value, or null with an explanation — the MCP ecosystem has a lot of servers now, few of them say anything about the actual quality of the data behind the tool calls. This one does, in public: xfinlab.com/trust.html shows every underlying data collector's live/down status in real time.

Already live in production — no setup needed, just point an MCP-compatible client at it:

json
{  "mcpServers": {    "xfinlab": {      "url": "https://api.xfinlab.com/api/mcp",      "headers": { "X-API-Key": "xfl_..." }    }  }}

Hosted service (the server implementation is proprietary and runs at api.xfinlab.com). Tools (6): get_market_events, get_sentiment, get_technical_analysis, get_intelligence_feed, get_global_market_map, get_fundamentals_as_of (point-in-time SEC fundamentals). Same auth and free tier as the REST API. Docs: intelligence-api.html#mcp.

Production usage

Early-stage, honest numbers — pulled from the platform's own admin metrics on 2026-09-22, not curated for effect. Individual emails aren't published here even though they're visible in the admin panel — no reason to expose real people's addresses in a public README.

  • 15 API keys issued (14 active, 1 revoked) since the self-serve free tier launched, to roughly 13 distinct outside developers/researchers — not counting the operator's own test key, which shows 0 calls, so none of the volume below is self-generated traffic.
  • 669 weighted API calls served all-time, concentrated in a small number of real integrations: the single heaviest account alone accounts for more than half of all-time volume, the second-heaviest for roughly another fifth.
  • One signup used a .edu email address — an early, small signal of academic/research interest rather than only casual trials.
  • 5 organic accounts on the consumer research site (xfinlab.com), separate from the API-only signups above. Of 7 total registered accounts, 2 are the operator's own account and an internal LINE-bot integration, not external users — excluded from that count.
  • No response-time or uptime SLA number is published here — it isn't actually measured yet, and this project holds itself to the same zero-fabrication policy it markets to users, so an unmeasured number doesn't get invented for a case study either. Per-data-source status (not per-request latency) is live on that same page.

Two real bugs this surfaced, fixed the same day each was found:

  • SEC Form 4 false positives (Sept 2026). SEC EDGAR's own browse-edgar type filter turned out to behave as a prefix wildcard, not an exact match — type=4 was silently matching unrelated 424B-series filings as "insider trading" activity. Caught by the platform's own data-source health alerting (not a user bug report), confirmed against SEC's live responses — its own pagination link rewrites type=4 to type=4%25, which is what gave the bug away.
  • Point-in-time/vintage data store (Sept 2026). A quant researcher's comment on r/quant pointed out that treating a filing's period-end date as "known on that date" ignores real filing lag and later restatements — a classic look-ahead-bias source in backtests. Built a dedicated (proprietary) store where every fundamentals value carries a real filing-availability timestamp instead of the period it describes, and a restated value is stored as a new immutable row rather than overwriting the original — so "what did we know on date X" and "what's the latest known value" are two different, both-correct queries.

SDKs & examples

Both SDKs are MIT-licensed (sdk/LICENSE) and have zero required dependencies beyond the standard library / native fetch.

Consumer product

The same backend also powers xfinlab.com, a retail investment-research platform:

ModulePath
Homepageindex.html
AI Market Research™ai-analysis.html
Chart Research™chart-analysis.html
Company Compare™company-compare.html
Event Intelligence™news-denoise.html
Risk Engine™stress-lab.html

Local development

bash
python3 mock-server.py

Then open http://localhost:8080. The production backend is a separate, private service (deployed as api.xfinlab.com); the static site above deploys separately on Vercel as xfinlab.com.

More docs

來源:README.md,提交 bf54dd7

工具

6

get_market_events

Market events

Get recent market/company news headlines from XFINLAB's aggregated real-time news feed (RSS-sourced, deduplicated). Optionally filter by ticker/company name. Returns title, source, kind, published_at, url for each item -- no article body text.

輸入參數limittickerapi_keymarketplace_license_key

get_sentiment

Headline sentiment

Get FinBERT-based sentiment analysis of recent headlines for a ticker. Returns per-headline label/confidence/score plus an average score. Real model inference, not a fabricated estimate.

輸入參數limitticker必填api_keymarketplace_license_key

get_technical_analysis

Technical analysis

Get confluence direction/confidence, trend, MACD, volume, chart patterns, and market-structure signals (BOS/CHOCH/liquidity-sweep/order-flow/volume-profile/institutional-footprint) for one ticker, computed from real OHLC price data -- the same engine that powers XFINLAB's chart-analysis and ai-analysis pages.

輸入參數langperiodticker必填api_keyintervalmarketplace_license_key

get_intelligence_feed

Intelligence feed

Get AI-structured event clusters from recent news: same-story headline clusters with entity/sentiment/quant-context fields and an AI-written narrative summary. Optionally scoped to one ticker; otherwise returns the latest cross-market feed. This is structured fact extraction, not republished article text, and never includes a directional trading signal or probability estimate.

輸入參數langlimittickerapi_keymarketplace_license_key

get_global_market_map

Global market map

Get a cross-region global market snapshot ('World Engine'): macro indicators (GDP growth/inflation/unemployment, with source attribution -- world_bank/fred/ecb), filtered regional headlines, and FinBERT sentiment for each requested region, plus a top-level global headlines feed (GDELT). Regions: us, europe, japan, korea, china, hk, tw, sea, me, latam. No AI narrative, no directional signal -- structured real data only.

輸入參數api_keyregionsnews_limitinclude_sentimentmarketplace_license_key

get_fundamentals_as_of

Point-in-time fundamentals

Point-in-time company fundamentals (fundamentals_as_of): what an investor could actually have known about a US-listed company on a given date. For a symbol and an as_of date (YYYY-MM-DD) it returns the annual SEC 10-K figures (revenue, net income, diluted EPS, total assets, total liabilities, operating cash flow) that had already been filed and were available by that date, each with the period it describes (data_time) and the SEC filing date (publication_time). Later restatements are never leaked back into an earlier date, which avoids look-ahead bias in backtests and research. Fields with no data public by that date are listed in unavailable_fields, never filled with zeros. Also returns source, quality and limitations. US SEC filers, annual data only; not investment advice.

輸入參數as_of必填symbol必填api_keymarketplace_license_key

版本歷史

2
  1. v1.0.1最新Oct 8, 2026
  2. v1.0.0Sep 16, 2026

評分

已滿足適用檢查項的 90%

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

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

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