unified-finance-mcp
One MCP server for finance data: Yahoo Finance, TradingView, FMP, Alpha Vantage, marketaux, Futu OpenD and the Kimi Datasource meta-source behind a single tool surface, with market-aware auto-routing across sources.
Features
| Surface | Tools | Notes |
|---|---|---|
| Unified tools | 18 | Domain-organized, cross-source tools with a source parameter: auto routes by market coverage, or pin one source explicitly |
| TradingView containers | 3 | tv_scan, tv_analyze, egx_market — scanner/analysis containers selected by action (unknown actions return the available list) |
| Futu OpenD mount | 53 | All futu-opend-mcp tools are mounted alongside the unified tools (get_snapshot, get_kline, futu_get_option_chain, …) when OpenD is configured |
| L2 self-describing containers | 2 | quant_backtest and kimi_datasource keep secondary functionality out of the primary tool list; call with action='help' / action='list' to discover them |
| Diagnostics | 1 | get_service_status reports provider availability, coverage and mounted tool counts (read-only, no network I/O) |
Data sources: Yahoo Finance · TradingView · FMP · Alpha Vantage · marketaux · Futu OpenD · Kimi Datasource (tianyancha CN company data, World Bank / IMF macro series, SEC EDGAR, S&P Capital IQ, gildata screener data, and more).
The unified tools accept futu (HK.00700), Yahoo (0700.HK, COMI.CA) and
TradingView (EGX:COMI) symbol forms; bare tickers default to US.
Install
Requires Python ≥ 3.10.
uvx unified-finance-mcp # ephemeral run (uv)
pipx install unified-finance-mcp # persistent install
pip install unified-finance-mcp # classic install
The console entry point is unified-finance-mcp. By default it serves stdio
(MCP client spawns it directly); --transport http serves streamable HTTP
with a /health endpoint.
Configuration
All configuration is via environment variables. The server's own knobs use the
FINANCE_MCP_* prefix; third-party credentials keep their vendor names.
Every key is optional — each provider activates only when its credential is
present, and auto-routing skips unavailable sources.
Core (all providers)
| Variable | Purpose | Default |
|---|---|---|
FINANCE_MCP_TRANSPORT |
stdio or http (or CLI --transport) |
stdio |
FINANCE_MCP_HOST |
HTTP listen host (or CLI --host) |
127.0.0.1 |
FINANCE_MCP_PORT |
HTTP listen port (or CLI --port) |
8000 |
FINANCE_MCP_REQUEST_TIMEOUT |
Per-source request timeout (seconds) | 20 |
FINANCE_MCP_MAX_RETRIES |
HTTP retry count | 3 |
FINANCE_MCP_MIN_HOST_DELAY |
Minimum delay between requests to one host (seconds) | 0.5 |
FINANCE_MCP_FUTU |
0 disables the Futu OpenD mount entirely |
true |
FMP
| Variable | Purpose | Default |
|---|---|---|
FMP_API_KEY |
FMP API key | — |
FMP_BASE_URL |
FMP endpoint override; point it at your multi-key rotator, e.g. http://api-key-rotator:8788/fmp |
https://financialmodelingprep.com |
Alpha Vantage
| Variable | Purpose | Default |
|---|---|---|
ALPHAVANTAGE_API_KEY |
Alpha Vantage API key | — |
ALPHAVANTAGE_BASE_URL |
Endpoint override (rotator-friendly) | https://www.alphavantage.co |
marketaux
| Variable | Purpose | Default |
|---|---|---|
MARKETAUX_API_TOKEN |
marketaux news API token | — |
MARKETAUX_BASE_URL |
Endpoint override (rotator-friendly) | https://api.marketaux.com |
Kimi Datasource
Auth resolution order: KIMI_PROXY_URL → KIMI_ACCESS_TOKEN → KIMI_AUTH_FILE.
Exactly one way needs to be configured for the kimi tools to activate.
| Variable | Purpose | Default |
|---|---|---|
KIMI_PROXY_URL |
Primary. URL of the kimi-datasource-proxy container, e.g. http://kimi-datasource-proxy:8788/coding/v1/tools. The proxy holds and refreshes the credentials; the client sends no Authorization header |
— |
KIMI_AUTH_FILE |
Fallback. Path (or glob) to a cliproxy kimi credential JSON, e.g. /mnt/docker/cliproxy/auths/kimi-*.json — the first file with disabled != true is used; the client self-refreshes the token when it expires |
— |
KIMI_ACCESS_TOKEN |
Fallback. Direct Kimi Code token (standalone use, no cliproxy/proxy); no refresh logic | — |
KIMI_BASE_URL |
Upstream endpoint used with the two fallback paths | https://api.kimi.com/coding/v1/tools |
KIMI_FILES_DIR |
Where datasource result files are written | /tmp/unified_finance_mcp |
Futu OpenD (inherited from futu-opend-mcp)
| Variable | Purpose | Default |
|---|---|---|
FUTU_OPEND_HOST |
OpenD gateway host | 127.0.0.1 |
FUTU_OPEND_PORT |
OpenD gateway port | 11111 |
FUTU_OPEND_ENCRYPT |
Use encrypted protocol | true |
FUTU_OPEND_RSA_KEY / FUTU_OPEND_RSA_KEY_FILE |
RSA private key (inline or file) for encrypted OpenD | — |
Client configuration
Claude Code
# stdio (default transport)
claude mcp add finance -- uvx unified-finance-mcp
# with environment, e.g. your API keys + rotator endpoints
claude mcp add finance \
--env FMP_API_KEY=<your-fmp-key> \
--env FMP_BASE_URL=http://api-key-rotator:8788/fmp \
--env KIMI_PROXY_URL=http://kimi-datasource-proxy:8788/coding/v1/tools \
--env FUTU_OPEND_HOST=192.168.1.10 \
-- uvx unified-finance-mcp
# streamable HTTP mode (server started with --transport http)
claude mcp add --transport http finance http://127.0.0.1:8000/mcp
claude_desktop_config.json
{
"mcpServers": {
"finance": {
"command": "uvx",
"args": ["unified-finance-mcp"],
"env": {
"FMP_API_KEY": "<your-fmp-key>",
"FMP_BASE_URL": "http://api-key-rotator:8788/fmp",
"ALPHAVANTAGE_API_KEY": "<your-av-key>",
"KIMI_PROXY_URL": "http://kimi-datasource-proxy:8788/coding/v1/tools",
"FUTU_OPEND_HOST": "127.0.0.1"
}
}
}
}
Streamable HTTP (any MCP client)
Start the server:
FINANCE_MCP_TRANSPORT=http unified-finance-mcp --port 8000
# or: unified-finance-mcp --transport http --port 8000
then connect to http://127.0.0.1:8000/mcp (health probe at
http://127.0.0.1:8000/health).
Migrating from mcpo (5 servers → 1)
Replace the mcpo-aggregated stack — futu-opend, yfinance, tradingview (wrapped through mcpo) plus FMP and Alpha Vantage over streamable HTTP — with a single unified-finance-mcp entry.
Before (mcpo config, five servers):
{
"mcpServers": {
"futu": { "command": "uvx", "args": ["futu-opend-mcp"] },
"yfinance": { "command": "mcpo", "args": ["--config", "/path/to/yfinance-mcp.json"] },
"tradingview": { "command": "mcpo", "args": ["--config", "/path/to/tradingview-mcp.json"] },
"fmp": { "type": "sse", "url": "http://localhost:8788/fmp" },
"alphavantage":{ "type": "sse", "url": "http://localhost:8788/alphavantage" }
}
}
After:
{
"mcpServers": {
"finance": {
"command": "uvx",
"args": ["unified-finance-mcp"],
"env": {
"FMP_API_KEY": "<your-fmp-key>",
"FMP_BASE_URL": "http://api-key-rotator:8788/fmp",
"ALPHAVANTAGE_API_KEY": "<your-av-key>",
"MARKETAUX_API_TOKEN": "<your-marketaux-token>",
"KIMI_PROXY_URL": "http://kimi-datasource-proxy:8788/coding/v1/tools",
"FUTU_OPEND_HOST": "127.0.0.1"
}
}
}
}
The same credentials carry over; yfinance and tradingview need no key (they are
backed by yfinance and tradingview-ta/tradingview-screener in-process, which
also removes the Python ≥3.14 wrapper constraint mcpo hit).
Tool quick reference
| Tool | What it does |
|---|---|
get_quote |
Latest snapshot for one or more symbols (futu/yahoo/TV symbol forms) |
get_history |
OHLCV history; interval 1m–1mo, start/end dates |
get_company_info |
Company profile: name, sector, market cap, description |
get_financial_report |
Income / balance / cashflow statements, annual or quarterly |
get_news |
Symbol news, or global headlines with symbol=None |
get_technical_indicators |
Ratings summary + indicator values (summary or named indicators) |
run_screener |
Screen stocks by market and numeric filters, sorted and limited |
get_ownership |
Major / institutional / mutual-fund holders, insider transactions |
get_events_calendar |
Earnings, dividends, IPO calendar (date range optional) |
get_economic_data |
Macro series: GDP, CPI, unemployment, rates, treasury yields, … |
search_symbols |
Search symbols by company name or ticker |
get_company_risk_cn |
CN company risk profile from tianyancha (via kimi) |
quant_backtest |
Strategy backtest container: run / compare / walk_forward; action='help' for the full parameter guide |
kimi_datasource |
Self-describing datasource access: action='list' / 'describe' / 'call' |
tv_scan |
TradingView exchange-wide scans (top gainers/losers, volume breakout, …) by action |
tv_analyze |
TradingView symbol analysis (summary, candle patterns, multi-timeframe, …) by action |
egx_market |
Egyptian Exchange tools (overview, sector scan, index, screener, trade plan, fibonacci) by action |
get_service_status |
Provider availability/coverage and mounted tool counts (read-only) |
Plus the 53 mounted futu-opend-mcp tools (get_snapshot, get_kline,
futu_get_option_chain, get_capital_flow, …) for HK/CN/US depth from OpenD.
Development
pip install -e ".[dev]"
ruff check . # lint
pytest -q -m "not integration" # unit suite (integration marker needs live APIs/OpenD)
Layout: src/unified_finance_mcp/ — providers/ (Yahoo, TradingView, FMP,
Alpha Vantage, marketaux, Futu bridge, Kimi), tools/ (the 14 tool modules
registered from ALL_MODULES), config.py (env Settings), http.py
(polite per-host rate-limited client).
Release process
- Push your changes to
mainand confirm CI is green (ruff + pytest). - On PyPI, add this repository as a pending trusted publisher (one-time setup).
- Tag and push:
git tag v0.1.0 && git push origin v0.1.0
publish.yml builds the wheel/sdist and publishes to PyPI via OIDC trusted
publishing (no tokens stored in the repo).
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unified_finance_mcp-0.1.0.tar.gz.
File metadata
- Download URL: unified_finance_mcp-0.1.0.tar.gz
- Upload date:
- Size: 253.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f92e1ccebf7781c409278360bc086e448728a248d2a02bd5c7c3e0886466d81
|
|
| MD5 |
43d237721de4e0f109ded8dc0dcf6f87
|
|
| BLAKE2b-256 |
4833ad3b2f6ffc80c5af9db43196d4c543db4dca033aefcd865925d9fc8f351a
|
Provenance
The following attestation bundles were made for unified_finance_mcp-0.1.0.tar.gz:
Publisher:
publish.yml on xyonium/finance-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unified_finance_mcp-0.1.0.tar.gz -
Subject digest:
7f92e1ccebf7781c409278360bc086e448728a248d2a02bd5c7c3e0886466d81 - Sigstore transparency entry: 2788970570
- Sigstore integration time:
-
Permalink:
xyonium/finance-mcp@18c26e83c5f5368aa2d87866b2b91787f996b098 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xyonium
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@18c26e83c5f5368aa2d87866b2b91787f996b098 -
Trigger Event:
push
-
Statement type:
File details
Details for the file unified_finance_mcp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: unified_finance_mcp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 180.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
185e4528adce596593a48374326caabaf59b54f7e2efe3a6f69c0c0677a43222
|
|
| MD5 |
9e6231a656579cb59bc285d78fa362e0
|
|
| BLAKE2b-256 |
1497455b8f9fe6ae7d3b518aae8a7141668b07d8541b2fe62f2a7cc549be62a6
|
Provenance
The following attestation bundles were made for unified_finance_mcp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on xyonium/finance-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
unified_finance_mcp-0.1.0-py3-none-any.whl -
Subject digest:
185e4528adce596593a48374326caabaf59b54f7e2efe3a6f69c0c0677a43222 - Sigstore transparency entry: 2788970627
- Sigstore integration time:
-
Permalink:
xyonium/finance-mcp@18c26e83c5f5368aa2d87866b2b91787f996b098 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xyonium
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@18c26e83c5f5368aa2d87866b2b91787f996b098 -
Trigger Event:
push
-
Statement type: