Morningstar China MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Morningstar China MCPSearch for funds with keyword 易方达 and show top 5 results."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Morningstar China MCP
简体中文 | English
An MCP server for querying Morningstar China fund data. It supports fund search, screening, latest day-end ranking, performance, portfolio, fees, managers, ownership, strategy, documents, and market data.
This project calls internal frontend APIs used by the Morningstar China website. It is not an official Morningstar SDK. The APIs may change without notice, and Morningstar data remains subject to its licensing terms. Use the server only with an account and data access you are authorized to use. Do not use it for unauthorized bulk collection or redistribution.
Features
15 read-only MCP tools
216 allowlisted fund screener fields
Current rolling returns from the latest trading day's
dayEnddataFund, category, and benchmark performance comparisons
Portfolio allocation, holdings, fixed-income exposure, fees, managers, and ownership
Stateless per-request token isolation
Bounded pagination, concurrency, response size, and time-series output
HTTP and Morningstar business-status validation
Related MCP server: Stock Data MCP Server
Requirements
Node.js 20 or later
npm
A valid Morningstar China JWT obtained through an authorized Morningstar session
An MCP client that supports Streamable HTTP and custom request headers
Install and run
npm install
npm run build
npm startThe server listens on the loopback interface by default:
MCP endpoint: http://127.0.0.1:3845/mcp
Health check: http://127.0.0.1:3845/healthSet a different host or port when needed:
MCP_HOST=127.0.0.1 MCP_PORT=4000 npm startMCP_PORT must be an integer from 1 to 65535. Keep the default loopback binding for local use. Put remote deployments behind HTTPS, authentication, request-size limits, and a trusted reverse proxy.
Authentication
The X-Morningstar-Token header is optional for connection setup, tools/list, and tools backed by Morningstar endpoints that currently allow anonymous access:
X-Morningstar-Token: <morningstar-jwt>screen_funds and rank_funds_day_end require the header. The other 13 tools can be discovered and called without it while their upstream Morningstar endpoints remain public. If Morningstar later protects one of those endpoints, the tool will return the upstream authentication error.
When supplied, the server maps the value to Morningstar's custom token header. It creates a separate stateless MCP server and Morningstar client for each HTTP request, so concurrent callers do not share tokens.
The server does not acquire, refresh, persist, or log tokens. An expired supplied token receives HTTP 401. A protected tool called without a token returns an MCP AUTH_REQUIRED tool error.
MCP client configuration
Start the HTTP server, then add the following Streamable HTTP server configuration to your MCP client:
{
"mcpServers": {
"morningstar-cn": {
"url": "http://127.0.0.1:3845/mcp",
"headers": {
"X-Morningstar-Token": "${MORNINGSTAR_TOKEN}"
}
}
}
}The headers block is optional if you only need tool discovery or anonymous tools. Set MORNINGSTAR_TOKEN in the MCP client's environment when using the two protected screening tools. The client resolves the variable and sends its value as an HTTP request header; the MCP server process does not receive it as an environment variable.
Do not place a real token directly in a committed configuration file. The client must support Streamable HTTP, custom request headers configured through headers, and environment-variable interpolation; if its configuration format differs, use the equivalent endpoint and header settings.
Tools
Tool | Purpose | Main inputs |
| Search mainland China funds by name or code |
|
| Search fund managers by name |
|
| Find valid screener fields, types, units, and enum values |
|
| Screen funds with allowlisted Morningstar fields; token required |
|
| Rank a bounded candidate set with latest day-end returns and category ranks; token required |
|
| Read NAV, category, rating, size, manager, risk level, and subscription status |
|
| Read day-end/month-end returns, ratings, risk, and investor returns |
|
| Read a downsampled fund/category/benchmark growth series |
|
| Read allocation, holdings, fixed-income exposure, dividends, and size history |
|
| Read explicit, implicit, management, custody, and share-class fees |
|
| Read current and former managers and optional manager performance |
|
| Read institutional, individual, employee, manager, and FOF ownership |
|
| Read strategy dates, outlook dates, and benchmark analytics |
|
| List announcements and periodic reports |
|
| Read fund flows, overseas trends, asset-class ranks, or fee trends |
|
All tools advertise the MCP readOnlyHint. The server does not expose watch-list, portfolio, template, feedback, or account mutations.
Usage examples
Inspect one fund
{
"code": "002276",
"sections": ["dayEnd", "monthEnd", "rating", "risk"]
}Call get_fund_performance with these arguments.
Discover screener fields
Before building filters, call list_screener_fields:
{
"query": "晨星评级"
}Then pass valid fields to screen_funds:
{
"filters": {
"rating3Y": ["5"],
"returnYTD_M": ">5"
},
"pageSize": 20,
"sortBy": "returnYTD_M",
"orderBy": "desc"
}The server rejects unknown filter and sort fields before it sends a request to Morningstar.
Rank bond funds with latest day-end data
{
"category": "pureBond",
"periods": ["M1", "M6", "Y1"],
"candidateLimit": 60,
"limit": 10,
"minFundSize": "1",
"inceptionYears": "3",
"purchasableOnly": true
}Call rank_funds_day_end with these arguments. Supported categories are pureBond, shortBond, rateBond, creditBond, ordinaryBond, activeBond, and convertibleBond.
Morningstar's bulk screener exposes month-end return fields only. This tool uses those fields to form a bounded candidate pool, then fetches each candidate's latest performance.dayEnd data and ranks the funds by their category percentiles. It minimizes the worst percentile across the selected periods, followed by the average percentile.
Return-period semantics
Morningstar uses different conventions for current and standardized research data:
dayEnduses rolling periods ending on the latest available trading day.monthEnduses the most recent completed month-end.dayEndvalues forY3,Y5, andY10are cumulative returns.Long-period
monthEndvalues are annualized returns.
Do not compare a cumulative dayEnd.Y3 value directly with an annualized monthEnd.Y3 value. Use dayEnd for current momentum and monthEnd for consistent cross-sectional research.
Development
npm run dev # run the TypeScript source
npm run typecheck # strict TypeScript check
npm test # run Vitest once
npm run build # compile to dist/
npm run check # typecheck, test, and buildThis server cannot be deployed
Maintenance
Related MCP Connectors
Provide access to Chinese stock market data including historical prices, real-time data, news, and…
Access real-time and historical market data for China A-shares and Hong Kong stocks, along with ne…
China A-share market data for research, backtesting and AI agents via MCP.
Financial data and research MCP for US/CN/JP equities: filings, statements, ownership, signals.
Related MCP Servers
- AlicenseBqualityCmaintenanceProvides comprehensive access to Chinese stock market data including real-time quotes, historical prices, financial statements, technical indicators, news, and macroeconomic data for A/B/H shares through multiple data sources.3041 PyPI46MIT
- AlicenseNot gradedqualityDmaintenanceEnables querying financial data including stocks, indices, funds, and futures from Chinese, Hong Kong, and US markets. Provides real-time market information, financial indicators, news, and trading suggestions through Eastmoney and Sina data sources.8 npm3ISC
- AlicenseNot gradedqualityFmaintenanceProvides access to Chinese mainland financial data including A-stock quotes, financial statements, industry analysis, and macroeconomics through 42 MCP tools, with automatic data source fallback and no API key required.40Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables querying Chinese A-share and index financial data, including real-time quotes, historical bars, and index snapshots, with built-in fallback for unstable endpoints.MIT