
Financial Hub Mcp
io.github.ykshah1309由 GitHub 帳號 ykshah1309 發布v1.3.1更新於 Oct 28, 2026
SEC EDGAR filings, XBRL financials, FRED economic data, and real-time market quotes
概覽
本機 MCP 伺服器,讓助理取得 SEC EDGAR 申報文件、XBRL 財務資料、FRED 經濟序列與 Finnhub 行情,用於公司研究。
- 可以做什麼
- 依名稱或代號搜尋 SEC 註冊公司、全文檢索申報文件,並依 CIK 取得近期申報與 8-K 公司事件
- 讀取去重後的 XBRL 指標、財務摘要、計算比率、成長與健康評分,並比較 2 至 5 家公司
- 依交易所、產業、名稱與健康評分篩選公司
- 搜尋並取得 FRED 經濟序列,並以資源形式瀏覽精選指標目錄
- 透過 Finnhub 取得即時股價、市場新聞、內部人交易與公司概覽
- 提供財務分析、同業比較與美國經濟概覽的引導式提示詞
- 適用情境
- 適合需要助理研究上市公司、比較財務數據、篩選股票,或把公司基本面與美國總體經濟指標合併分析的場合。
- 執行需求
- 透過 npx(Node.js)以 stdio 在本機執行。必須設定 SEC_USER_AGENT_EMAIL,否則伺服器會立即結束;經濟類工具需要 FRED_API_KEY,行情類工具需要 FINNHUB_API_KEY。需要連線至 SEC、FRED 與 Finnhub 介面的網路,並在 FRED 與 Finnhub 申請免費金鑰。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Financial Hub Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Financial Hub MCP Server
A TypeScript MCP server for financial data aggregation. Connects any MCP-compatible AI assistant to SEC EDGAR filings, XBRL financial statements, FRED economic indicators, and real-time market data — with built-in XBRL normalization, fact deduplication, computed analytics, stock screening, and rate-limit protection.
Core Concepts
SEC EDGAR
All SEC EDGAR data comes directly from the SEC's free public APIs at data.sec.gov. No API key is required. The server automatically handles:
- XBRL concept resolution — Different companies use different XBRL tags for the same metric. The server normalizes across 20+ financial concepts (e.g.,
revenueresolves toRevenues,RevenueFromContractWithCustomerExcludingAssessedTax,SalesRevenueNet, and 11 other variants). - Fact deduplication — Raw XBRL data contains duplicate values from overlapping 10-K/10-Q filings and amendments. The server collapses these to one clean value per fiscal period.
- Rate limiting — SEC enforces 10 requests/second. A token-bucket rate limiter with bounded queuing (max 50 pending, 30s timeout) prevents IP bans.
FRED
FRED (Federal Reserve Economic Data) provides 800,000+ time series from 100+ sources. Requires a free API key from fred.stlouisfed.org. Rate limited to 120 requests/minute (enforced via 2 req/s token bucket). Includes a curated catalog of ~50 essential economic indicators across 9 categories for zero-API-call browsing.
Finnhub Market Data
Real-time stock quotes, company profiles, market news, insider transactions, and financial metrics via the Finnhub API. Free tier provides 30 API calls/second with no credit card required. The server rate-limits to 25 req/s to stay safely under the threshold. Quotes are never cached (stale prices are worse than no cache), while profiles (24h), news (5min), and financial metrics (1h) use appropriate TTLs.
Caching
In-memory LRU cache with TTL expiry reduces redundant API calls:
Eviction is LRU — frequently accessed entries are promoted on read, so the least recently used entry is evicted when capacity is full. Expired entries are proactively swept on every write.
API
Tools
-
search_companies
- Search SEC-registered companies by name or ticker
- Input:
query(string) - Returns matching company names, tickers, and CIK numbers
-
get_company_filings
- Get recent SEC filings for a company
- Inputs:
cik(string): SEC's unique company identifierformType(string, optional): Filter by form type (10-K, 10-Q, 8-K, DEF 14A)
- Returns filing metadata: form type, dates, document links
-
get_financial_metric
- Get deduplicated historical values of a financial metric with trend analysis
- Inputs:
cik(string): Company CIK numberconcept(string): Friendly name or raw XBRL tagtaxonomy(string, optional): XBRL taxonomy (default:us-gaap)annualOnly(boolean, optional): Return only annual data points
- Accepts friendly names:
revenue,net_income,gross_profit,operating_income,eps,total_assets,total_liabilities,stockholders_equity,cash,long_term_debt,current_assets,current_liabilities,operating_cash_flow,capex,shares_outstanding - Also accepts raw XBRL tags:
Revenues,NetIncomeLoss,Assets, etc. - Returns deduplicated values (one per fiscal period), YoY growth rates, and trend direction
-
get_financial_summary
- Get a comprehensive financial snapshot with computed ratios
- Input:
cik(string) - Returns latest metrics: revenue, net income, assets, liabilities, equity, cash, debt, EPS, operating cash flow, free cash flow
- Computed ratios: profit margin, debt-to-equity, current ratio, ROE, ROA
- All values deduplicated from the most recent annual filing
-
get_company_facts_summary
- Get a compact index of all available XBRL data for a company
- Inputs:
cik(string): Company CIK numberlimit(number, optional): Max concepts to return (default 40, max 100)
- Returns concept names, latest values, and data point counts — not the full time series
- Use this to discover what data is available before drilling into specific metrics
-
analyze_financials
- Deep financial analysis with computed ratios, growth metrics, and health scoring
- Input:
cik(string) - Returns:
- Financial ratios: profit margin, gross margin, operating margin, ROE, ROA, debt-to-equity, current ratio
- Growth analysis: YoY rates, 3-year and 5-year CAGR, trend detection
- Composite health grade (A-F) with explanatory factors
- Uses
Promise.allSettledinternally — individual metric failures don't crash the analysis
-
compare_companies
- Side-by-side financial comparison of 2-5 companies
- Input:
ciks(string[], 2-5 CIK numbers) - Compares revenue, income, assets, cash, EPS, free cash flow, ratios, and health scores
- Identifies winners by revenue, profitability, growth, and overall health
- Individual company failures are isolated — partial comparisons still return
-
search_filings
- Full-text search across all SEC EDGAR filings with pagination
- Inputs:
query(string): Search termsforms(string, optional): Comma-separated form typesstartDate(string, optional): YYYY-MM-DDendDate(string, optional): YYYY-MM-DDlimit(number, optional): Results per page (default 20, max 50)offset(number, optional): Skip N results for pagination
- Returns results array + total hit count for pagination
- Searches the full text of any filing since 2001
-
screen_stocks
- Screen SEC-registered companies by exchange, industry, name, and financial health
- Inputs:
exchange(string, optional): Filter by exchange (e.g. NYSE, Nasdaq)industry(string, optional): SIC industry group (technology, finance, healthcare, energy, manufacturing, retail, transportation, utilities, services, public_admin)nameContains(string, optional): Case-insensitive substring match on company nameminHealthScore(number, optional): Minimum health grade (0-100) from financial analysislimit(number, optional): Max results (default 20, max 50)
- Two-phase screening: instant client-side filtering on 10,000+ companies, then optional deep filtering via SEC API for industry and health metrics
-
get_corporate_events
- Get recent 8-K corporate events with significance classification
- Inputs:
cik(string): Company CIK numbersignificance(string, optional): Filter byhigh,medium, orlowsignificancelimit(number, optional): Max events (default 15, max 50)
- Classifies 25 SEC 8-K item numbers into human-readable categories with significance levels
- High significance: CEO changes, M&A, bankruptcy, material agreements, auditor changes
- Medium: earnings releases, departures, asset sales, amendments
- Uses existing submissions data — zero additional API calls
-
search_economic_data
- Search the FRED database for economic data series
- Input:
query(string) - Returns series IDs, titles, frequencies, and units
- Use returned series IDs with
get_economic_data
-
get_economic_data
- Get time series observations for a FRED economic data series
- Inputs:
seriesId(string): FRED series IDstartDate(string, optional): YYYY-MM-DDendDate(string, optional): YYYY-MM-DD
- Common series:
GDP,CPIAUCSL(CPI),UNRATE(unemployment),FEDFUNDS,DGS10(10-year treasury),SP500,MORTGAGE30US
-
get_stock_quote
- Get a real-time stock price quote from Finnhub
- Input:
symbol(string): Stock ticker (e.g. AAPL, MSFT, GOOGL) - Returns current price, daily change, percent change, day high/low, open, and previous close
- Live data — never cached
-
get_market_news
- Get latest financial news headlines
- Inputs:
symbol(string, optional): Stock ticker for company-specific news. Omit for general market newscategory(string, optional):general,forex,crypto,merger(only for general news)
- Returns up to 20 articles with headline, summary, source, URL, and datetime
-
get_insider_transactions
- Get recent insider trading activity for a company
- Input:
symbol(string): Stock ticker (e.g. AAPL, TSLA) - Returns insider names, share counts, transaction dates, prices, and buy/sell codes
- Transaction codes: P = Purchase, S = Sale, M = Option Exercise, A = Grant/Award, G = Gift, F = Tax withholding
-
get_company_overview
- Get a comprehensive company overview combining profile, market metrics, and peers
- Input:
symbol(string): Stock ticker (e.g. AAPL, MSFT) - Returns name, exchange, industry, market cap, PE ratio, beta, 52-week range, EPS, dividend yield, and peer tickers
- Merges data from 4 parallel Finnhub API calls (profile, financials, peers, quote)
Resources
-
sec://company/{ticker}
- Company profile with SEC metadata and recent filings
- Includes: name, CIK, tickers, exchanges, SIC code, fiscal year end, and the 10 most recent filings
- Browsable from any MCP client that supports resources
-
fred://catalog/{category}
- Browse curated FRED economic indicators by category
- Categories: gdp, labor, inflation, rates, housing, markets, money, trade, consumer
- Returns series IDs, titles, frequencies, and descriptions — zero API calls
-
fred://indicator/{seriesId}
- FRED indicator detail with latest observations
- Returns series metadata from the catalog plus the 10 most recent data points
- Use this to inspect a specific indicator before pulling full time series
Prompts
-
financial_analysis
- Guided company financial health analysis
- Input:
ticker(string) - Walks through revenue trends, profitability, balance sheet health, and risk assessment
-
peer_comparison
- Side-by-side comparison of two companies
- Input:
ticker1(string),ticker2(string)
-
economic_overview
- Current US economic conditions dashboard
- No input required
- Pulls GDP, unemployment, CPI, fed funds rate, treasury yields, and mortgage rates
Tool Annotations
All tools set MCP ToolAnnotations for safe agent composition:
Error Handling
All tools return MCP-compliant error envelopes with isError: true on failure:
This allows the LLM to receive semantic error messages, correct parameters, and retry — rather than receiving opaque transport-level JSON-RPC errors that break the agent loop.
Usage with Claude Desktop
Add this to your claude_desktop_config.json:
NPX
Usage with VS Code
For manual installation, add the configuration to your user-level MCP configuration file. Open the Command Palette (Ctrl + Shift + P) and run MCP: Open User Configuration, then add:
NPX
For more details about MCP configuration in VS Code, see the official VS Code MCP documentation.
Environment Variables
Architecture
Data Pipeline
Raw XBRL data from SEC EDGAR goes through several processing stages:
- Rate-limited fetch — Token bucket ensures SEC's 10 req/s limit is never exceeded. Queue rejects after 50 pending requests or 30s wait.
- Caching — Company facts cached for 1 hour, max 15 entries to avoid OOM on large payloads.
- Concept resolution — Friendly names like
revenueare mapped to all known XBRL tag variants across the us-gaap taxonomy. - Deduplication — Overlapping 10-K/10-Q/amendment values are collapsed to one per fiscal period. Prefers 10-K over 10-Q, latest filing date over earlier.
- Analysis — Growth rates, CAGR, financial ratios, and health scores are computed from clean data.
- Serialization — Minified JSON output to minimize context window usage.
Building from Source
Run locally:
Contributing
Pull requests welcome. See CONTRIBUTING.md for the development loop, commit style, and PR checklist. By participating you agree to the Code of Conduct.
Security
Please report security issues privately — see SECURITY.md. Do not file public issues for vulnerabilities or credential leaks.
Changelog
See CHANGELOG.md for release notes.
License
MIT — see LICENSE.
Badges
來源:README.md,提交 1ee163d
工具
0版本歷史
1- v1.3.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分