
Publicdata Kr
io.github.fieldcure由 GitHub 帳號 fieldcure 發布v1.0.3更新於 Oct 24, 2026
Korean public data API gateway for discovering and calling data.go.kr APIs from MCP clients.
發布方自己的服務:publicdata.au
概覽
本機 MCP 伺服器,讓助理搜尋、檢視並呼叫 data.go.kr 上的韓國公共資料 API,並自動注入 API 金鑰。
- 可以做什麼
- 依關鍵字搜尋 data.go.kr 上的 API,回傳名稱、提供者與端點,依服務去重,每頁最多 50 筆(discover_api)。依服務 ID 取得某個 API 的操作、請求參數與回應欄位(describe_api)。呼叫白名單內的任意 data.go.kr 端點,查詢參數以 JSON 字串傳入,服務金鑰自動注入,XML 轉為 JSON,回應長度受限,錯誤碼轉譯為韓文提示(call_api)。
- 適用情境
- 適合在助理工作階段中取得韓國公共資料,例如天氣、空氣品質、房地產、企業登記或交通資訊,並希望助理自行找到合適的 API、了解其參數並完成查詢,而不必直接處理金鑰。
- 執行需求
- 以 .NET 工具形式在本機執行(dotnet tool install),需要 .NET 8.0 或更新版本的執行階段。需要 data.go.kr 帳號與 API 金鑰,透過環境變數 DATA_GO_KR_API_KEY 提供,或於首次使用時經 MCP Elicitation 互動輸入。帳號需訂閱 목록조회서비스 列表查詢 API 才能探索介面,並需為每個要查詢的 API 個別申請。需要存取獲准的政府主機網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Publicdata Kr,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
FieldCure MCP PublicData.Kr
Korean public data API gateway. A Model Context Protocol (MCP) server that lets any MCP client discover, inspect, and call 80,000+ APIs on data.go.kr — weather, real estate, business registration, air quality, transit, and more. Built with C# and the official MCP C# SDK.
Features
- 3 tools — search APIs by keyword, inspect parameters/response fields, call any data.go.kr API
- Automatic serviceKey injection — the API key is added to every request; never leaked to the LLM
- Lazy key resolution — env var → MCP Elicitation → soft-fail chain (no hard-fail on startup). Hosts that support MCP Elicitation can prompt the user for the key on first use; on upstream
401/403orSERVICE_KEY_IS_NOT_REGISTEREDthe cached key is invalidated and a re-elicit is attempted (session cap: 2 re-elicits) - XML → JSON normalization — strips the
response/header/body/itemswrapper, returns clean JSON - Error code mapping — translates data.go.kr error codes into Korean guidance messages the LLM can relay directly
- SSRF protection — domain whitelist limits calls to approved government hosts
- EUC-KR support — legacy encoding from older government APIs is auto-detected and converted
- Stateless — no cache, no database, no local files; every call is independent
- Stdio transport — standard MCP subprocess model via JSON-RPC over stdin/stdout
Installation
dotnet tool (recommended)
After installation, the fieldcure-mcp-publicdata-kr command is available globally.
From source
Prerequisites
- Sign up at data.go.kr and get your API key (data.go.kr 회원가입 후 인증키 발급)
- Subscribe to 목록조회서비스 (Required)
—
discover_apianddescribe_apidepend on this API (discover_api, describe_api 도구가 이 API를 사용합니다) - Subscribe to each individual API you want to query (조회하려는 개별 API도 각각 활용신청 필요)
Requirements
- .NET 8.0 Runtime or later
Authentication
This server requires a data.go.kr API key (공공데이터포털 인증키). Key resolution is lazy (on first tool call) and follows the FieldCure MCP Credential ADR:
- Environment variable —
DATA_GO_KR_API_KEY(canonical) orPUBLICDATA_API_KEY(legacy alias) - MCP Elicitation — if no env var is found, the server requests the key interactively on the first tool call (requires a client that supports MCP Elicitation — e.g. Claude Code ≥ 2.1.76, AssistStudio). The resolved key is cached in process memory for the session lifetime and is never written to disk by the server.
- Soft-fail — if both paths fail,
tools/liststill works and tool calls return a structured error message asking the user to set the env var.
--api-key <value> is also accepted as a CLI arg but is intended for manual testing only,
not as a supported configuration path.
Setup by host
Claude Code / Claude Desktop — add the key to your MCP config:
On Claude Code (≥ 2.1.76), if the env var is omitted the server prompts for the key via Elicitation on first use.
AssistStudio — the key is requested via Elicitation on first use and stored in Windows PasswordVault for subsequent launches; the host then injects it as an env var when starting the server.
Docker / CI — pass the key as a standard environment variable:
Key validation and re-elicitation
If the server receives an HTTP 401/403 or a resultCode=22 / SERVICE_KEY_IS_NOT_REGISTERED_ERROR
body from data.go.kr, it invalidates the cached key and re-requests via Elicitation
(session cap: 2 re-elicits per ApiKeyResolver lifetime). After exhausting retries, the
tool returns a soft-fail error message.
Note: On data.go.kr an HTTP 401 can mean either an invalid key or an API that you have not applied for (활용신청). If a re-elicitation prompt appears right after calling an API you haven't subscribed to, entering the same key will produce the final error envelope with details — at that point visit the API's data.go.kr page and apply for access.
Configuration
Claude Desktop
Add to claude_desktop_config.json:
Claude Code (v2.1.76+)
Claude Code supports MCP Elicitation, so DATA_GO_KR_API_KEY may be omitted — the
server will prompt for the key on first tool use.
VS Code (Copilot)
Add to .vscode/mcp.json:
From source (without dotnet tool)
AssistStudio
Install the dotnet tool first. AssistStudio does not auto-install external MCP servers (only built-in ones are managed via the AssistStudio auto-update path). The
fieldcure-mcp-publicdata-krcommand must be on PATH before you add the server, otherwise the connection fails with a generic "server shut down unexpectedly" message.
Then: Settings > MCP Servers > Add Server:
Tools
Workflow
discover_api
Search Korean public data APIs on data.go.kr by keyword. Results are deduplicated by service — each API appears once even if it has multiple operations.
describe_api
Get the request parameters and response fields of a specific API. Use the serviceId from discover_api results.
call_api
Call a Korean public data API. The serviceKey is automatically injected — never pass it yourself. If the call fails with ACCESS_DENIED, the user needs to apply for access to that specific API at data.go.kr.
Error Code Mapping
When a data.go.kr API returns an error, the server translates it into a Korean guidance message the LLM can relay directly:
Environment Variables
CLI args (--api-key, --timeout, --max-response-length) override environment variables
and are intended for manual testing only — DATA_GO_KR_API_KEY and Elicitation are the
supported paths.
Naming note: the API key follows the external service naming convention (
DATA_GO_KR_API_KEY), while server-local configuration uses thePUBLICDATA_prefix. This keeps the key aligned with data.go.kr's own documentation so users don't have to configure it twice, while local tunables stay grouped under a single package namespace.
Security
- API key masking — the serviceKey is replaced with
***in any error output visible to the LLM - Domain whitelist —
call_apionly allows requests to approved hosts:api.odcloud.kr,apis.data.go.kr,api.data.go.kr,openapi.data.go.kr,www.law.go.kr,open.neis.go.kr - Response size limit — configurable via
PUBLICDATA_MAX_RESPONSE_LENGTH(default: 50,000 chars) - No log leaks — the API key is never printed to stdout or stderr
Project Structure
Development
See Also
Part of the AssistStudio ecosystem.
License
來源:README.md,提交 33b5448
工具
0版本歷史
1- v1.0.3最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分