返回资讯中心
外部精选
软件工程
#开发者实时流

Show HN: Korea-data-MCP – Korean public APIs that agents can't misread

Pass Korean public APIs straight to an AI agent and it gets answers wrong. korea-data-mcp gives it the right ones.

Hacker News 最新youngtip2026/10/30 · 19 天前18 分钟阅读

以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。

Pass Korean public APIs straight to an AI agent and it gets answers wrong. korea-data-mcp gives it the right ones.

An MCP server for Korean corporate filings and financials, stock prices, apartment sale prices, business registration status, public holidays, statutes and court rulings, from the official free APIs of OpenDART, data.go.kr and law.go.kr.

Example: "What was Samsung Electronics' revenue in the first half of 2025?" Here is what OpenDART actually returns:

{ "account_nm": "매출액", "thstrm_dt": "2025.01.01 ~ 2025.06.30", "thstrm_amount": "74,566,317,000,000", "thstrm_add_amount": "153,706,820,000,000" }

The period says January to June, so an agent reads thstrm_amount and answers ₩74.6 trillion. That is wrong: it is the second quarter only. The half-year figure, ₩153.7 trillion, is in a different field. Most Korean MCP servers pass this response on as is. korea-data-mcp returns:

{ "name": "매출액", "statement_type": "income_statement", "current_period": "2025-01-01 ~ 2025-06-30", "current_amount": 153706820000000, "current_quarter_amount": 74566317000000 }

So the agent gets it right, and can even split out the second quarter:

Three more traps, each of which silently produces a wrong answer:

Law that is not law yet. Ask law.go.kr for the current Labor Standards Act (근로기준법) and the text includes 제44조의4, labeled as in effect since 2026-10-08. It actually takes effect on 2027-01-01; the official "current law" text already contains amendments that are only promulgated. korea-data-mcp returns the text in force on the date you ask for (today by default) and lists what is coming in upcoming (tool output shortened):

Deals that never happened. Apartment trade data keeps cancelled deals, marked only by a flag: 12 of 233 Gangnam trades in September 2025, including a ₩7.5 billion one. Averages that include them are wrong. korea-data-mcp leaves them out.

Codes that quietly stop working. In 2026, 광주광역시 and 전라남도 merged, 화성시 was split into four 구, and 인천 reorganized its districts. The old district codes, which most code tables still list, now return zero trades, even for past months. With korea-data-mcp, an agent just says 광주 북구 or 화성시.

There is more: errors returned as HTTP 200, stale records mixed with current ones, business numbers that fail when written with hyphens, stock history split by a company rename, and a TLS handshake that fails from Go. See all 47: What korea-data-mcp handles for you.

Connect korea-data-mcp to Claude (or any MCP client) and ask in English or Korean:

All three keys are free. You can start with just one.

Claude Desktop, in one click: download korea-data-mcp.mcpb, open it (or drag it into Settings → Extensions), and enter the keys you have (how to get them). Nothing else to install; skip to step 4.

Download a binary for macOS, Linux or Windows (Intel or ARM) from Releases, extract it, and note the absolute path of korea-data-mcp (korea-data-mcp.exe on Windows). For example, on an Apple Silicon Mac:

curl -L https://github.com/YoungsoonLee/korea-data-mcp/releases/latest/download/korea-data-mcp_darwin_arm64.tar.gz | tar xz ./korea-data-mcp -version

On macOS, a binary downloaded with a browser is blocked as coming from an unidentified developer; run xattr -d com.apple.quarantine korea-data-mcp once. curl downloads are not affected.

Or with Go 1.26 or later (Go 1.21+ downloads the right toolchain automatically):

go install github.com/YoungsoonLee/korea-data-mcp/cmd/korea-data-mcp@latest

The binary is installed to $(go env GOPATH)/bin/korea-data-mcp.

Use absolute paths. Leave out the keys you don't have.

claude mcp add korea-data-mcp
-e OPENDART_API_KEY=...
-e DATAGOKR_SERVICE_KEY=...
-e LAWGOKR_OC=...
-- /absolute/path/to/korea-data-mcp

Claude Desktop: edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows), then restart Claude Desktop:

{ "mcpServers": { "korea-data-mcp": { "command": "/absolute/path/to/korea-data-mcp", "env": { "OPENDART_API_KEY": "...", "DATAGOKR_SERVICE_KEY": "...", "LAWGOKR_OC": "..." } } } }

Other MCP clients take the same command and environment variables.

To keep keys in one file instead, copy .env.example to .env, fill it in, and pass -env-file /absolute/path/to/.env as an argument. A variable set in the environment takes precedence over the file.

Ask your agent "Which korea-data-mcp providers are enabled?". It calls hub_list_providers, which lists the enabled providers and any missing keys. Then try one of the questions above.

Step-by-step instructions and troubleshooting: Getting API keys. All three are free, but signing up usually requires Korean identity verification. If you can't get them, join the hosted waitlist.

data.go.kr: The portal issues two keys, Encoding and Decoding. Use the Decoding key. The Encoding key gets URL-encoded twice and fails with SERVICE_KEY_IS_NOT_REGISTERED_ERROR. One key covers every API you apply for.

law.go.kr: The OC is a value you choose under 마이페이지 → API인증키관리. A wrong OC gives the error "사용자 정보 검증에 실패하였습니다". law.go.kr puts the OC in every link it returns, so don't reuse another key as the OC (korea-data-mcp never passes those links on).

Every OpenDART tool that takes corp_code also accepts a 6-character stock code (e.g. 005930).

data.go.kr (DATAGOKR_SERVICE_KEY). Each API needs its own application (활용신청) on data.go.kr; the links are below.

Hub: hub_list_providers lists the enabled providers and the keys that are missing.

Your keys stay on your machine. korea-data-mcp runs locally and sends each key only to the service that issued it. There is no telemetry. Error messages never include keys or query strings.

HTTP mode has no authentication. -http serves the tools to anyone who can reach the port, using your keys. Bind it to localhost (-http 127.0.0.1:8080) unless it is behind an authenticating proxy. The default stdio mode does not open a port.

Upstream quotas apply. A data.go.kr development account allows 10,000 calls per day for each API; OpenDART and law.go.kr have their own limits. korea-data-mcp caches responses for 10 minutes and the DART company list for 24 hours.

Data is as fresh as the source. Apartment deals can be reported up to 30 days after the contract, so the latest month fills in over time. Stock prices are daily, updated after each trading day.

Roadmap

OpenDART: companies, disclosures, financials

data.go.kr: holidays, corporation info, business status, apartment trades, stock prices

law.go.kr: statutes, court rulings

Bank of Korea ECOS, KOSIS (Korean Statistical Information Service)

A sibling server for Japan, starting with EDINET (corporate disclosures)

Want a data source added? Request it. Found an API behaving oddly? Open an issue. No Korean API keys? Join the hosted waitlist. To build, test or add a provider, see docs/DEVELOPMENT.md.

Apache License 2.0. Data returned by the tools comes from the upstream services and is subject to their terms of use.

正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。

打开原文
去社区讨论 →