Mopsfin MCP Server
Click on "Install 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., "@Mopsfin MCP Server查台積電最近12季營收趨勢"
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.
Mopsfin Taiwan Stock MCP Server
A public, read-only, database-free MCP server for Taiwan company financial data. The service is implemented with Next.js 16 App Router and the MCP TypeScript SDK v2, exposing seven tools over Stateless Streamable HTTP at /api/mcp; every financial query accesses MOPS Financial Comparison E-point directly.
This is not an official Taiwan Stock Exchange MCP server, nor does it constitute investment advice.
Architecture
LLM / MCP client
│ Streamable HTTP
▼
Next.js /api/mcp on Vercel
│ 固定 allowlist endpoint、form-urlencoded、無 cookie
▼
mopsfin.twse.com.tw
│
├─ JSON → periods + series
└─ HTML → 展開 rowspan/colspan 的二維 tablesNo database, Redis, or legacy HTTP+SSE transport.
Financial data is not cached; only the dynamic catalog parsed from the homepage is cached in a single Vercel instance's memory for 5 minutes.
Upstream URLs are fully fixed; tool arguments cannot supply URLs, so no arbitrary proxy/SSRF is possible.
Upstream timeout is 20 seconds; network errors, 429, and 5xx are retried once, other 4xx are not retried.
Mopsfin cookies are not retained or forwarded.
The
latestreport probes up to 12 quarters backward from the last completed quarter and verifies the response period to avoid the source site silently falling back to another quarter.Vercel uses Node.js
24.x, Tokyohnd1, 60-second function duration, and Fluid Compute.
Related MCP server: polygon-mcp
MCP Tools
Tool | Purpose |
| Search company codes and names |
| List metrics, endpoint families, industries, financial institutions, and periods in real time |
| Financial trends, ratios, YOY, and cash flow metrics for general companies |
| Balance sheet, comprehensive income statement, cash flow statement |
| Five types of financial statement notes |
| Industry statistics and industry trends, supporting revenue / net income after tax |
| Asset quality and capital adequacy ratios for the financial industry, with optional industry average and simple average of selected institutions |
Each tool has strict Zod input/output schemas and returns a short content summary plus full structuredContent. Tool annotations mark them as read-only, non-destructive, idempotent, and free of open-world side effects.
LLMs can obtain interpretive data from three layers: the server instructions in MCP initialize explain the overall data scope and calling order; tools/list provides purpose and caliber for the seven tools and every input/output field; list_catalog's officialGuidance and each metric's guidance provide formulas, value bases, applicable industry types, and caveats. The warnings in actual query results further carry filing frequency, single-quarter / cumulative, missing values, averages, or pagination warnings directly relevant to the current query.
When the code is unknown, call find_companies or list_catalog first. The family in list_catalog maps as follows:
family | Tool to use |
|
|
|
|
|
|
|
|
|
|
Trends default to the most recent 12 quarters, adjustable with start_period, end_period, or history: "all". Large HTML tables are paginated with offset and limit, defaulting to 100 rows with a maximum of 500 rows. Period format is YYYYQn.
Company metrics can include the industry average and a simple average of selected companies via include_industry_average and include_company_average; financial institution metrics can include the corresponding financial industry average and a simple average of selected institutions via include_industry_average and include_institution_average. These averages are all computed by Mopsfin and are not market-capitalization weighted.
When answering data questions, at least preserve unit, the actual periods/period, the query basis, and warnings. null, NO_DATA, or a missing quarter may indicate not applicable, not yet filed, or not required for that market, and must not be rewritten as 0.
Local Development
Requirements: Node.js 24, npm 11.
npm install
npm run devService:
Homepage:
http://localhost:3000/MCP:
http://localhost:3000/api/mcpHealth check:
http://localhost:3000/api/health
The health check does not call Mopsfin, to avoid monitoring traffic becoming a fixed query load on the source site.
You can verify with the official MCP Inspector or the bundled client:
npm run test:client
# 或指定 Preview URL
npm run test:client -- https://your-preview.vercel.app/api/mcpMCP client configuration example:
{
"mcpServers": {
"mopsfin": {
"url": "https://your-domain.example/api/mcp"
}
}
}Using with ChatGPT
ChatGPT requires a reachable public HTTPS /api/mcp URL; local localhost cannot be handed directly to remote ChatGPT.
Deploy to Vercel first and obtain
https://<your-domain>/api/mcp.In ChatGPT, enable Settings → Security and login → Developer mode.
Go to ChatGPT Plugins and press the plus sign to add a new connection.
Enter a name, e.g.
Mopsfin Taiwan Stocks, and set the Connection URL to the fullhttps://<your-domain>/api/mcp.After creation, confirm ChatGPT can recognize the seven tools.
Start a new conversation, add this MCP connection from the tools menu, then ask about Taiwan stocks directly in natural language.
Whether Developer mode is available depends on the account plan and workspace policy. See the official OpenAI connection guide for details.
Example questions:
"Look up TSMC's operating revenue for the last 12 quarters, organize it into a table, and point out the trend."
"Compare TSMC and MediaTek's ROE over the last 8 quarters."
"List the main items of TSMC's 2025Q4 balance sheet."
"Compare the revenue trend of the semiconductor industry over the last 12 quarters."
"Look up the most recent available banking capital adequacy ratio for Bank of Taiwan."
Verification
npm run lint
npm run type-check
npm test
npm run buildGeneral tests use only fixed fixtures, covering 53 compareItem categories, six endpoint families, missing values, negative numbers, percentages, multiple companies, HTML merged cells, pagination, timeout, 429, 5xx, wrong quarters, and MCP initialize/tools/list/tools/call.
Live contract tests are skipped by default and only query the source site when explicitly set:
npm run test:liveDo not schedule live tests as periodic CI, to avoid creating a fixed query load on Mopsfin.
Deploying to Vercel
Import the repository into Vercel.
Use
npm run buildas the build command; Vercel will run npm install based onpackage-lock.json.package.jsonalready pins Node.js24.x;vercel.jsonalready enables Fluid Compute.After deployment, verify with
npm run test:client -- https://<preview>/api/mcp.Set appropriate rules in the Vercel Firewall depending on public traffic; the application itself does not create a cross-instance rate-limit database.
Suggested Preview acceptance checks: TSMC revenue for the last 12 quarters, TSMC vs. MediaTek ROE, balance sheet for a specified quarter, semiconductor industry trend, Bank of Taiwan capital adequacy ratio, and TSMC financial statement notes.
Error Codes
INVALID_ARGUMENTNOT_FOUNDNO_DATAUPSTREAM_TIMEOUTUPSTREAM_RATE_LIMITEDUPSTREAM_BAD_RESPONSE
Filing quarters differ by market: listed / OTC companies usually have Q1–Q4, emerging and public companies may only have Q2/Q4, and some companies only file annually. NO_DATA does not necessarily mean the company does not exist.
Data Source, Updates, and Terms of Use
The sole data source is Mopsfin. Per its website terms of use, the site data is updated once daily and may lag filings by about one day; this service does not use test fixtures as production data or fallback.
Before public launch, the project owner must independently confirm TWSE/Mopsfin's authorization for public proxying, redistribution, and usage frequency. The website terms' description of data scope and update frequency does not constitute an explicit grant of redistribution rights. Users should also use the original filings on the MOPS public information site as the final check.
Key References
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseCqualityDmaintenanceProvides comprehensive Taiwan stock market data and analysis through MCP tools. Enables querying real-time stock prices, historical data, company information, technical analysis, and market overviews for TWSE and TPEx listed companies.815MIT
- AlicenseCqualityCmaintenanceEnables querying real-time and historical financial market data for stocks, options, forex, and crypto, including quotes, trades, technical indicators, and reference data through a set of MCP tools.713MIT
- AlicenseAqualityCmaintenanceProvides Korean stock market data, including DART electronic disclosures and KRX trading information, enabling users to query company profiles, financial statements, and stock trade details via MCP clients.9MIT
- AlicenseAqualityAmaintenanceWraps Taiwan Stock Exchange OpenAPI into MCP tools for searching datasets, fetching stock data, and obtaining ETF snapshots, enabling AI models to access TWSE market information.529MIT
Related MCP Connectors
Taiwan Stock Exchange (TWSE) open data as MCP tools: stock quotes, ETF data, 140+ public datasets.
SEC MCP — SEC EDGAR public APIs (free, no auth)
Remote MCP for Japan's EDINET DB — 3,800 listed companies' financials & filings (OAuth)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/victorfu/mopsfin-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server