hk-ipo-fee-mcp
Provides lookup of Hong Kong-listed companies by code or name and listings by date range, using open-licensed (CC0) Wikidata data with 24-hour caching.
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., "@hk-ipo-fee-mcp 20 lots at HK$8.88, 500/lot, 10x margin 3.5% 7d: entry fee and break-even?"
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.
hk-ipo-fee-mcp
An MCP server that gives AI assistants exact Hong Kong IPO cost maths, so they can stop guessing. It covers:
the entry fee (amount payable), including the 1% brokerage, SFC, AFRC and trading-fee levies, each rounded to the cent;
margin-financing interest, the break-even sell price, scenario P&L and expected value;
selling costs, with stamp duty rounded up to a whole HK$;
cited rule summaries (Mechanism A/B allocation, Pool A/B, FINI T+2);
open-licensed (Wikidata, CC0) lookups of HK-listed companies and listing dates.
中文简介:港股打新费用计算 MCP 服务器。让 Claude、Cursor 等 AI 助手精确计算入场费(1% 佣金 + 证监会/会财局征费 + 交易费,逐项四舍五入至分)、孖展利息、回本价、情景盈亏与期望值、卖出费用(印花税向上取整至元),并查询机制 A/B、甲乙组、FINI 等规则(附出处)。公司与上市日期查询只使用 Wikidata(CC0)开放数据,不抓取港交所/披露易。免费开源(MIT)。网页版计算器:https://hk-ipo-calc.pages.dev/
Ask things like:
"I'm applying for 20 lots of an IPO at HK$8.88, 500 shares a lot, with 10× margin at 3.5% for 7 days and a HK$100 handling fee. 18,000 out of 120,000 applicants at my size got one lot. What's my entry fee, break-even price and expected value?"
The numbers come from a tested fee engine, not from the model. That engine is the same one used by the web calculator and the HK IPO Ledger Chrome extension, and the two implementations are checked to give identical results on 8,000 test values.
Tools
Tool | What it does |
| Amount payable for N shares: application money + 1% brokerage + 0.0027% SFC levy + 0.00015% AFRC levy + 0.00565% trading fee |
| Full plan: entry fee, total payable, own cash vs margin loan, interest, fixed cost, break-even price, scenario table, expected value (from allotment counts or a rate) |
| Selling costs: 0.1% stamp duty rounded up to HK$1, trading fee, levies, broker commission / platform fee |
| Cited rule summaries: |
| Look up an HK-listed company by code or name (Wikidata, CC0) |
| Listings by date range (Wikidata, CC0, cached 24 h) |
Related MCP server: hk-bank-mcp
Install
You need Python ≥ 3.10. The easiest way to run it is with uv, which needs no install step:
uvx hk-ipo-fee-mcp # runs the stdio server
# or
pipx install hk-ipo-fee-mcp && hk-ipo-fee-mcpClaude Desktop
Edit claude_desktop_config.json. On macOS it is at ~/Library/Application Support/Claude/; on Windows at %APPDATA%\Claude\.
{
"mcpServers": {
"hk-ipo-fee": { "command": "uvx", "args": ["hk-ipo-fee-mcp"] }
}
}Claude Code
claude mcp add hk-ipo-fee -- uvx hk-ipo-fee-mcpCursor
Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in a project:
{
"mcpServers": {
"hk-ipo-fee": { "command": "uvx", "args": ["hk-ipo-fee-mcp"] }
}
}VS Code (GitHub Copilot agent mode)
Add this to .vscode/mcp.json:
{
"servers": {
"hk-ipo-fee": { "type": "stdio", "command": "uvx", "args": ["hk-ipo-fee-mcp"] }
}
}Windsurf / Cline / other clients
Any client that speaks MCP over stdio works. Set the command to uvx and the args to ["hk-ipo-fee-mcp"]. If you installed with pipx, set the command to hk-ipo-fee-mcp with no args.
Environment variables (optional)
Variable | Default | Purpose |
| project URL + maintainer email | Contact string in the Wikidata User-Agent (Wikimedia UA policy). Set your own if you query a lot |
|
| Cache directory for listing data |
Example
hk_ipo_plan(offer_price=8.88, board_lot=500, lots_applied=20, margin_multiple=10, annual_rate=0.035, interest_days=7, handling_fee=100, allotted_lots=1, valid_applications=120000, successful_applicants=18000) returns:
Entry fee (1 lot) | HK$4,484.78 |
Total amount payable (20 lots) | HK$89,695.55 |
Margin interest | HK$54.19 |
Fixed cost (paid either way) | HK$154.19 |
Break-even sell price | HK$9.289 (+4.61%), assuming zero sell commission |
(These are illustrative inputs, not a real IPO.)
Data & compliance
Fees and rules follow published SFC, AFRC, HKEX and IRD (GovHK) rates; every rule summary cites its source.
No HKEX/HKEXnews scraping. HKEX's terms prohibit automated access, so IPO terms (offer price, board lot, allotment results) must come from you or the prospectus. The server never invents them.
Listing lookups use Wikidata (CC0). The data is community-maintained, so verify it before relying on it.
Results are arithmetic, not investment advice. This project is not affiliated with Hong Kong Exchanges and Clearing Limited.
Development
git clone https://github.com/tiezhengzhang/hk-ipo-fee-mcp && cd hk-ipo-fee-mcp
python -m venv .venv && . .venv/bin/activate && pip install -e . pytest
python -m pytest -q # fee anchors + MCP stdio end-to-endMore from the author
🧮 HK IPO Calculator — a free bilingual web calculator using the same fee engine, plus guides on Mechanism A/B, Pool A/B, margin and fees.
📒 HK IPO Ledger (Chrome extension) — an IPO ledger across multiple brokers, with allotment and P&L stats, kept on your device. Free for up to 30 records. Pro is a one-time payment with no subscription.
License
MIT © 2026 Tiezheng Zhang. Listing data from Wikidata is CC0.
Available Tools
6 toolshk_company_lookupA
Find HK-listed companies by English/Chinese name or stock code in Wikidata (CC0, community-maintained; verify before relying on it). Returns code, names, listing date, industry, website, Wikidata id.
Inputs: query (required), limit. Returns: result
hk_ipo_amount_payableA
Amount payable to apply for shares HK IPO shares at offer_price (HK$): application money + 1% brokerage
0.0027% SFC levy + 0.00015% AFRC levy + 0.00565% HKEX trading fee, each rounded to the cent. For the one-lot 'entry fee', pass shares = board lot.
Inputs: shares (required), offer_price (required).
hk_ipo_planB
Full HK IPO subscription plan: entry fee, total payable, own cash vs margin loan, margin interest (loan × rate × days / 365), fixed cost, break-even sell price (after 0.1% stamp duty rounded up to HK$1, trading fee, levies, broker charges) and P&L / expected value under day-one change scenarios. annual_rate and sell_commission_rate are fractions (0.035 = 3.5%). allot_probability is 0..1, or pass valid_applications + successful_applicants from the allotment results announcement.
Inputs: board_lot (required), offer_price (required), annual_rate, handling_fee, +12 more.
hk_ipo_rulesB
Cited summary of HK IPO rules: topic = fees | allocation_mechanisms | pools | settlement | all.
Inputs: topic.
hk_listingsA
HK listings with a listing date in Wikidata (CC0), newest first; since/until are YYYY-MM-DD. Coverage of recent IPOs is incomplete; IPO terms are NOT included.
Inputs: limit, since, until. Returns: result
hk_sell_costsB
Costs of selling HK shares: stamp duty 0.1% (rounded up to HK$1), trading fee 0.00565%, SFC 0.0027%, AFRC 0.00015% (each to the cent) + broker commission/platform fee. Returns total and net proceeds.
Inputs: price (required), shares (required), platform_fee, min_commission, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Most tools have clearly distinct purposes, but hk_ipo_amount_payable overlaps with part of hk_ipo_plan, and hk_company_lookup overlaps with hk_listings because both surface Wikidata company/listing data. The descriptions help clarify boundaries, so the ambiguity is limited rather than severe.
All tools use snake_case with an hk_ prefix, which is predictable and readable. However, the names mix action-oriented and resource-oriented patterns (e.g. hk_company_lookup, hk_ipo_rules, hk_listings) rather than following a uniform verb_noun convention.
Six tools is well-scoped for a niche HK IPO fee and planning server. Each tool corresponds to a meaningful operation or reference surface, with no excessive or trivial tools.
The server covers core workflows: company lookup, rules, application fee calculation, subscription planning, sell costs, and listing lookup. Minor gaps remain, such as no dedicated IPO terms or allotment-results lookup, and hk_listings explicitly lacks IPO terms with incomplete recent coverage.
Maintenance
Related MCP Connectors
Hong Kong IPO model scores, verdicts, allotment forecasts, grey-market outcomes, and backtests.
61AI-powered Hong Kong SFC regulatory intelligence. Bilingual EN/ZH compliance queries.
Live HKEx (Hong Kong Stock Exchange) regulatory filings for AI agents.
HKEX announcements, director dealings and CCASS holdings as JSON. $3/1k filings, $1/1k CCASS rows
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to retrieve live Hong Kong monetary data (HKMA Base Rate, HIBOR fixings, USD/HKD peg band) via typed tools, no API key needed.39 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to retrieve live Hong Kong banking data—ATM and branch locations, HIBOR/HKD rates, and bank legitimacy checks—from official HKMA public APIs, with no credentials or scraping.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to fetch real-time and historical market data across A-shares, Hong Kong and US equities, funds, futures, and options, including technical indicators, sector and capital-flow data, and trading calendars. It also provides composite analysis tools and built-in prompts/skills for full-stock diagnostics, multi-stock comparison, market overviews, conditional screening, and portfolio monitoring.140 npmISC

OptimistFi MCP Serverofficial
AlicenseNot gradedqualityCmaintenanceEnables AI assistants to query live perpetual futures data across 40 venues, prop firm rules and pricing, and dated investment theses on over 6,100 US equities, along with SEC filings, insider and congressional trades, and capital returns. Every response is read-only, timestamped, source-attributed, and requires no API key.1MIT