Quota-guarded MCP layer over Korean public data APIs (data.go.kr), compiled from OpenAPI specs
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
The missing bridge between data.go.kr and the global MCP ecosystem. MCPortal normalizes Korean public-API specifications into standard OpenAPI 3.1, compiles them into MCP servers, and puts every outbound call behind a hard daily budget with backoff and caching. Fully open source, fully self-hosted.
νκ΅μ΄ λ¬Έμ: README.ko.md β this English README is the
canonical document and the Korean file is a translation of it.
Accuracy disclaimer
data.go.kr publishes no "remaining quota" endpoint. MCPortal's usage ledger therefore counts only the calls that went through MCPortal, which makes it a best-effort estimate. Calls that the same
serviceKeyspends outside MCPortal β another script, the portal console, a different tool β never reach the ledger, so the ledger value is always a lower-bound approximation of real consumption. The axis of trust is not that estimate but the hard budget cap (CALL_BUDGET). Even when the ledger is wrong, the hard guard physically blocks calls beyond the daily cap, so the safety line against quota-related account sanctions always comes fromCALL_BUDGET.
| Works without any API key | Needs a data.go.kr service key |
|---|---|
| Replaying record/replay cassettes | Live API calls |
The full test suite (pytest), including the record-mode tests, which run on synthetic transports | Live response sampling |
Standing up an MCP server from a committed spec plus its cassette (mcportal serve <id> --replay) β from a repo checkout, or from a PyPI install pointed at one (note 1) | Ad-hoc conversion of an API that has no cassette yet |
Regenerating the compile demo (examples/compile_demo.py) | Recording new cassettes |
Regenerating and listing the preset bundles (mcportal compile / mcportal presets) β bundled in the wheel since 0.2.0 (note 1) | Sampling a response schema that is still unresolved (mcportal sample) |
Reading quota status (mcportal quota status) | The key-dependent benchmark items K1βK3 |
Running the benchmark harness (the five key-free items in benchmarks/PROTOCOL.md) | β |
Every demo, development and CI path in MCPortal runs without a key. The
record/replay layer replays cassettes that were recorded earlier, so the same
response flow can be reproduced and the whole test suite can go green with no
serviceKey present. Spec-to-MCP conversion has already happened at build
time β the compiled artifacts are committed under specs/ β so clone the
repository and even standing up an MCP server and answering tool calls needs no
key: mcportal serve 15000115 --replay serves eight tools over stdio with no
serviceKey anywhere in the environment.
That sentence says clone on purpose. Replay needs a cassette, and cassettes
are recorded upstream responses that stay in the repository instead of going out
in the wheel (note 1), so a bare pip install mcportal has nothing to replay
until it is pointed at a checkout with --presets-root <path> or
MCPORTAL_PRESETS=<path>. Cassettes exist for three of the four bundles β
15081808 has none in the repository either, because it was deliberately left
out of sampling (see Presets below), so that one bundle is live-only.
What does need a key is narrow: live traffic to data.go.kr, and sampling or converting an API that has no cassette yet.
Note 1 β what the wheel carries, and what it does not. Since 0.2.0, the published wheel carries the four preset bundles (16 bundle files plus the two
presets/documents, measured on the built artifact), so a plainpip install mcportalcan runmcportal presetswith no checkout. Since 0.2.2 the wheel also carries the threesampled_schemas.jsonfiles β15000115,15101612and15102108;15081808has none, because it was deliberately left out of sampling. They ship becausemcportal compile --checkneeds them:--checkdoes not diff files, it re-synthesizesopenapi.jsonfrom its source + curation + sampled layers, so without the sampled layer an installed copy cannot reproduce the veryopenapi.jsonit shipped. On 0.2.1 as published,compile --checkfrom a plain install reports 3 of 4 drifted and exits 3 (measured 2026-08-15); on that version pass--presets-root <checkout>/presets. 0.2.2 restores it to 4 of 4 matched, exit 0, from the install alone. Those three files carry only the field names and types inferred from the responses β zero response values β and that structure already ships insideopenapi.json, so nothing is exposed that the wheel did not already carry. What the wheel still leaves out is the recorded upstream traffic itself:cassettes/andsamples/stay in the repository only, which is whymcportal serve --replayis a checkout path. To use a different bundle set β or to give a PyPI install the cassettes β point MCPortal at a checkout with--presets-root <path>or the environment variableMCPORTAL_PRESETS=<path>. Whenmcportal presetsfinds no bundle it prints the paths it searched.
Dependency policy: the core runtime depends on httpx and nothing else. The
spec-normalizing compiler (mcportal.compiler) uses only the standard library
and httpx. fastmcp is required solely by
mcportal.mcp and ships as the optional [mcp] extra β without it,
import mcportal and the entire test suite still work, and calling into the MCP
layer raises a Korean ImportError that explains how to install it. The [mcp]
extra also declares anyio, because the sync-to-async bridge imports
anyio.to_thread directly; httpx pulls anyio in transitively, but a direct
import deserves a direct declaration so that pins and lockfiles constrain it.
import mcportal does not import mcportal.mcp β that is what keeps the
import working without fastmcp installed. The MCP symbols are resolved lazily on
first attribute access through a module __getattr__
(PEP 562), so from mcportal.mcp import build_server and mcportal.build_server refer to the same object. Either
spelling is fine.
MCPortal's data.go.kr profile does not support multi-key rotation. data.go.kr issues one key per development account and meters a daily call limit against it; cycling several keys to escape that limit risks violating the service's operating policy and inviting account sanctions. MCPortal respects the structure as it is and accepts a single key. When the limit is too low, the supported answer is data.go.kr's own path β registering a use case and applying for the operational tier β not more keys.
The CLI uses the standard library argparse only. Zero new runtime
dependencies is a binding rule for this project, so even the terminal tables
are laid out by hand (Hangul counted as double width, ASCII rules, safe on a
Windows cp949 console).
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mcportal)<a href="https://allmcps.com/mcp/mcportal"><img src="https://allmcps.com/api/badge/mcportal?style=directory" alt="Mcportal on AllMCPs" /></a>