Taiwan Business Registry 台灣公司登記查詢
Released已發布Model Context Protocol (MCP) server for Taiwan Business Registry. Provides real-time access to company registration data from MOEA GCIS.
台灣公司登記查詢 MCP Server,提供 AI 代理透過自然語言存取相關資料與功能。
Features功能特色
- stdio JSON-RPC 2.0 — Standard MCP transport protocol
@mcp.tool()decorator — Pydantic-typed tool registration- REST connector — Retry support with exponential backoff
- No-auth public API access — Uses the GCIS open data endpoint directly
- E2E testing — Live API test runner
- 9 registered tools — Company search, directors, business items, branch offices, and more
- stdio JSON-RPC 2.0 — 標準 MCP 傳輸協定
@mcp.tool()裝飾器 — Pydantic 型別化工具註冊- REST 連接器 — 內建指數退避重試機制
- 無認證公開 API — 直接使用 GCIS 開放資料端點
- E2E 測試 — 即時 API 測試執行器
- 9 個已註冊工具 — 公司搜尋、董監事、營業項目、分公司等
Quick Start快速開始
# Setup
uv sync
# Test connection
uv run python scripts/auth/test_connection.py
# Run server
uv run python mcp_server.py
# 環境設定
uv sync
# 測試連線
uv run python scripts/auth/test_connection.py
# 啟動伺服器
uv run python mcp_server.py
Available Tools可用工具
| Tool | Description | Key Parameters |
|---|---|---|
get_company_registrations_by_name_keyword |
Search companies by name keyword | company_name_keyword, company_status |
get_company_registration_master_by_number |
Company master profile | business_accounting_no (8 digits) |
get_company_registration_with_business_items_by_number |
Company profile with business items | business_accounting_no (8 digits) |
get_company_directors_by_number |
Directors and supervisors | business_accounting_no (8 digits) |
get_company_name_by_number |
Company name lookup | business_accounting_no (8 digits) |
get_registry_entity_type_by_number |
Entity type classification | no (8 digits) |
get_branch_offices_by_company_number |
Branch offices by company | business_accounting_no (8 digits) |
get_business_registration_profile_by_agency |
Business profile by agency | president_no, agency |
get_business_registration_items_by_number |
Business registration items | president_no (8 digits) |
All tools support skip (default 0) and top (default 50) pagination parameters.
| 工具 | 說明 | 主要參數 |
|---|---|---|
get_company_registrations_by_name_keyword |
依名稱關鍵字搜尋公司 | company_name_keyword, company_status |
get_company_registration_master_by_number |
公司登記主檔 | business_accounting_no(8 碼) |
get_company_registration_with_business_items_by_number |
公司登記含營業項目 | business_accounting_no(8 碼) |
get_company_directors_by_number |
董監事資料 | business_accounting_no(8 碼) |
get_company_name_by_number |
統編查公司名稱 | business_accounting_no(8 碼) |
get_registry_entity_type_by_number |
統編類型判斷 | no(8 碼) |
get_branch_offices_by_company_number |
依公司統編查分公司 | business_accounting_no(8 碼) |
get_business_registration_profile_by_agency |
依機關查商業登記 | president_no, agency |
get_business_registration_items_by_number |
商業登記營業項目 | president_no(8 碼) |
所有工具支援 skip(預設 0)和 top(預設 50)分頁參數。
Contributing貢獻
See CONTRIBUTING.md for development setup and guidelines.
請參閱 CONTRIBUTING.md 了解開發環境設定與貢獻指南。
License授權
MIT License — see LICENSE for details.
MIT License — 詳見 LICENSE。
PrerequisitesPrerequisites
- Python
3.14.x uv- No API key required (public open data)
- Python
3.14.x uv- No API key required (public open data)
InstallInstall
From PyPI
pip install mcp-tw-company
With uvx (no install needed)
uvx mcp-tw-company
From source
git clone https://github.com/asgard-ai-platform/mcp-tw-company.git
cd mcp-tw-company
uv sync
從 PyPI 安裝
pip install mcp-tw-company
使用 uvx(免安裝)
uvx mcp-tw-company
從原始碼安裝
git clone https://github.com/asgard-ai-platform/mcp-tw-company.git
cd mcp-tw-company
uv sync
ConfigurationConfiguration
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"tw-company": {
"command": "uvx",
"args": ["mcp-tw-company"]
}
}
}
Claude Code
Add to .mcp.json in your project:
{
"mcpServers": {
"tw-company": {
"command": "uvx",
"args": ["mcp-tw-company"]
}
}
}
Cursor
Add to Cursor MCP settings:
{
"mcpServers": {
"tw-company": {
"command": "uvx",
"args": ["mcp-tw-company"]
}
}
}
Claude Desktop
加入 claude_desktop_config.json:
{
"mcpServers": {
"tw-company": {
"command": "uvx",
"args": ["mcp-tw-company"]
}
}
}
Claude Code
加入專案中的 .mcp.json:
{
"mcpServers": {
"tw-company": {
"command": "uvx",
"args": ["mcp-tw-company"]
}
}
}
Cursor
加入 Cursor MCP 設定:
{
"mcpServers": {
"tw-company": {
"command": "uvx",
"args": ["mcp-tw-company"]
}
}
}
Usage ExamplesUsage Examples
"Search for companies by name"
You: 幫我查「宏碁」相關的公司
AI calls:
get_company_registrations_by_name_keyword(
company_name_keyword = "宏碁",
company_status = "01",
)
Result: SUCCESS — Returns matching company registrations including name, unified business number, capital, representative, and address.
"Look up a specific company by number"
You: 統一編號 89845559 是哪家公司?
AI calls:
get_company_registration_master_by_number(
business_accounting_no = "89845559",
)
Result: SUCCESS — Returns master registration profile: 森鉅科技材料股份有限公司, capital NT$3B, located in Tainan.
"Find directors and supervisors"
You: 查一下這家公司的董監事名單
AI calls:
get_company_directors_by_number(
business_accounting_no = "89845559",
)
Result: SUCCESS — Returns 9 directors/supervisors with positions, names, corporate representatives, and shareholding.
"Check what business items a company is registered for"
You: 這家公司的營業項目有哪些?
AI calls:
get_company_registration_with_business_items_by_number(
business_accounting_no = "89845559",
)
Result: SUCCESS — Returns company profile with 13 registered business items including manufacturing, trading, and construction.
"Determine entity type by number"
You: 統編 00208407 是公司還是商號?
AI calls:
get_registry_entity_type_by_number(
no = "00208407",
)
Result: SUCCESS — Returns entity classification (company, branch office, or business).
「用名稱搜尋公司」
你: 幫我查「宏碁」相關的公司
AI 呼叫:
get_company_registrations_by_name_keyword(
company_name_keyword = "宏碁",
company_status = "01",
)
結果: SUCCESS — 回傳符合條件的公司登記資料,包含公司名稱、統一編號、資本額、代表人、地址等。
「用統編查公司」
你: 統一編號 89845559 是哪家公司?
AI 呼叫:
get_company_registration_master_by_number(
business_accounting_no = "89845559",
)
結果: SUCCESS — 回傳公司登記主檔:森鉅科技材料股份有限公司,資本額 30 億,位於台南市。
「查董監事」
你: 查一下這家公司的董監事名單
AI 呼叫:
get_company_directors_by_number(
business_accounting_no = "89845559",
)
結果: SUCCESS — 回傳 9 位董監事的職稱、姓名、法人代表、持股數。
「查營業項目」
你: 這家公司的營業項目有哪些?
AI 呼叫:
get_company_registration_with_business_items_by_number(
business_accounting_no = "89845559",
)
結果: SUCCESS — 回傳公司資料及 13 項營業登記項目,涵蓋製造業、貿易業、營建業等。
「判斷統編類型」
你: 統編 00208407 是公司還是商號?
AI 呼叫:
get_registry_entity_type_by_number(
no = "00208407",
)
結果: SUCCESS — 回傳登記類型判斷結果(公司、分公司或商業)。
TodoTodo
- Integrate
company registration basic data (application 2)fromF05D1060-7D57-4763-BDCE-0DAF5975AFE0 - Integrate
business name by numberfrom855A3C87-003A-4930-AA4B-2F4130D713DC - Investigate the upstream access restriction for
business registrations by name keyword(A1B4CBFF-2D3A-409B-8A78-2AD94F63AE4A): the test endpoint currently returnsunauthorized integration IPin this environment - Investigate the upstream access restriction for
branch offices by branch number(23632BB3-5DB7-4423-9643-1D4AC140D479): the test endpoint currently returnsunauthorized integration IPin this environment
- 介接
公司登記基本資料-應用二:F05D1060-7D57-4763-BDCE-0DAF5975AFE0 - 介接
統編查商號名稱:855A3C87-003A-4930-AA4B-2F4130D713DC - 追查
商業登記關鍵字查詢上游端點限制:A1B4CBFF-2D3A-409B-8A78-2AD94F63AE4A目前在此環境回非授權介接之IP - 追查
分公司統編查分公司資料上游端點限制:23632BB3-5DB7-4423-9643-1D4AC140D479目前在此環境回非授權介接之IP
Project StructureProject Structure
mcp-tw-company/
├── app.py # FastMCP singleton
├── mcp_server.py # Entry point (stdio transport)
├── config/settings.py # API endpoints, URL builder, request headers
├── connectors/
│ └── rest_client.py # HTTP REST with retry + pagination
├── auth/
│ └── none.py # No auth (public API)
├── tools/
│ └── company_registry_tools.py
├── tests/test_all_tools.py # E2E test runner
└── scripts/auth/test_connection.py
mcp-tw-company/
├── app.py # FastMCP 單例
├── mcp_server.py # 入口(stdio 傳輸)
├── config/settings.py # API 端點、URL 建構、請求標頭
├── connectors/
│ └── rest_client.py # HTTP REST(含重試+分頁)
├── auth/
│ └── none.py # 無認證(公開 API)
├── tools/
│ └── company_registry_tools.py
├── tests/test_all_tools.py # E2E 測試執行器
└── scripts/auth/test_connection.py
TestingTesting
uv run python scripts/auth/test_connection.py # Validate API connectivity
uv run python tests/test_all_tools.py # Run all tool E2E tests
uv run python scripts/auth/test_connection.py # 驗證 API 連通性
uv run python tests/test_all_tools.py # 執行所有工具 E2E 測試
Data SourceData Source
This project uses Ministry of Economic Affairs GCIS open data endpoints for company and business registration data.
目前使用經濟部商業發展署 GCIS 公司登記與商業登記開放資料端點。
RequirementsRequirements
- Python
3.14.x uv- 不需要 API 金鑰(公開資料)
- Python
3.14.x uv- 不需要 API 金鑰(公開資料)
Tags標籤
Related MCP Servers相關 MCP 伺服器
591 Real Estate 591 房地產資料
An MCP server to fetch and query real estate listings from 591.com.tw for AI assistants.
591 房地產資料 MCP Server,提供 AI 代理透過自然語言存取相關資料與功能。
buy123 Vendor Portal buy123 供應商平台
Model Context Protocol server for read-only buy123 vendor portal queries
mcp-buy123-vendor MCP Server,提供 AI 代理透過自然語言存取相關資料與功能。
CWA Weather 中央氣象署
MCP server for CWA (中央氣象署, Central Weather Administration) Open Data API. Provides 36 read-only tool...
中央氣象署 MCP Server,提供 AI 代理透過自然語言存取相關資料與功能。