asian-etf-mcp

asian-etf-mcp

Exposes Asian ETF Tracker data (HK, A-Share, Taiwan, South Korea, US) as tools for LLM agents, enabling market discovery, performance analysis, and momentum tracking.

Category
Visit Server

README

asian-etf-mcp

An MCP server that exposes thematic ETF data across 5 Asian markets + the US (Hong Kong, China A-Share, Taiwan, South Korea, US) as tools an LLM agent — or Claude Code / Claude Desktop — can call.

It fetches public OHLCV data from Yahoo Finance, computes industry returns / momentum / rankings, and serves them through a small set of well-described tools. Every result carries its source files and as_of date, so answers built on it are auditable.

Tools

tool args returns
list_markets every market → industries → ETFs (call first to discover)
get_etf_performance market, industry, start?, end? each ETF's total return vs the benchmark
get_industry_momentum market, end_date? per-industry 5d / 21d / 63d / YTD return, absolute + relative
get_industry_ranking market, start?, end? industries ranked by return
get_etf_ohlcv code, market, start?, end? raw daily OHLCV bars

market accepts hk / cn / tw / sk / us (or full names). Dates are ISO strings like 2025-06-01.

Quick start

git clone https://github.com/ivyyy0601/etf-mcp.git
cd etf-mcp                       # (or the asian-etf-mcp directory)
python3.10+ -m venv .venv
./.venv/bin/pip install -r requirements.txt

# Build the data cache once (fetches ~55 symbols from Yahoo Finance, ~2-3 min)
./.venv/bin/python build_cache.py

That's it — the server is self-contained. The market/industry/ETF definitions ship in configs/, and the data comes from public Yahoo Finance, so you don't need any account, API key, or access to anyone's server.

Use with Claude Code

claude mcp add asian-etf -- /abs/path/to/.venv/bin/python /abs/path/to/src/server.py

Then ask, e.g. “use asian-etf to show which US sector has the strongest momentum.”

How it works

Two layers, kept separate on purpose:

src/server.py        the "menu": thin FastMCP wrapper, one @mcp.tool() per function
   │ calls
src/data_access.py   the "kitchen": reads CSVs, computes returns/momentum/rankings

data_access.py has no MCP dependency — it returns plain Python objects and can be imported by anything (tests, a notebook, a LangGraph agent). server.py only adds the protocol + tool descriptions.

Caching (fast reads). build_cache.py precomputes every standard view into cache.json once. Default-parameter tool calls are served from that cache (instant); only custom date ranges are computed on the fly.

Refresh-on-use (always current, zero babysitting). When a tool is called and the cache is older than the latest trading day, the server rebuilds it first (fetches the latest data), then answers. So you never have to run a cron or open anything — it self-maintains.

Configuration

env var default meaning
ASIAN_ETF_ROOT ./data where OHLCV CSVs are stored (generated)
ASIAN_ETF_CONFIG_DIR ./configs market/industry/ETF definitions (shipped)

To add a market or ETF, edit the JSON files in configs/ — no code changes.

Keeping it fresh

  • Anyone: nothing to do — refresh-on-use fetches the latest from Yahoo Finance when needed. Or run python build_cache.py whenever you want.
  • Maintainer fast-path (optional): if you run the companion data collector on a server, sync_data.sh can pull its daily CSVs and build_cache.py --no-live recomputes from them in seconds. Requires SSH access to that server; everyone else simply uses the live Yahoo Finance path.

Project layout

src/server.py        MCP server (5 tools)
src/data_access.py   Streamlit-free data + cache layer
build_cache.py       refresh job: fetch + precompute → cache.json
configs/             market definitions (committed)
sync_data.sh         maintainer fast-path (optional)
test_data_access.py  smoke test for the data layer (no MCP needed)

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured