visitkorea-medicaltourism
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., "@visitkorea-medicaltourismfind KTO-certified hospitals in Seoul with English service"
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.
VisitKorea Medical Tourism MCP Server
Overview
VisitKorea Medical Tourism MCP Server exposes the Korea Tourism Organization Medical Tourism Open API as eight Model Context Protocol tools. MCP clients can search facilities by area, location, or keyword, retrieve facility details, and synchronize upstream records through Streamable HTTP.
The primary service is a Python package. The repository also contains a pnpm workspace with a React landing page, an Express health API, and shared TypeScript packages used by those applications.
The tourism data comes from the Korea Public Data Portal, service ID 15143913.
Related MCP server: Nonpayment Health MCP Server
Key Features
Eight MCP tools mapped to the
MdclTursmServiceAPIArea, coordinate, keyword, and synchronization queries
Common, introductory, and medical facility details
English, Japanese, Simplified Chinese, Korean, and Russian responses
Parameter validation before upstream requests
Bounded retries, connection pooling, and a process local response cache
Process local rate limiting for upstream requests
Streamable HTTP transport with liveness checks
Tech Stack
Layer | Technology |
MCP service | Python 3.11+, FastMCP from |
Upstream client | HTTPX |
Python packaging | Hatchling, uv |
Landing page | React, Vite, Tailwind CSS |
Health API | Express 5, Pino |
TypeScript workspace | pnpm, TypeScript 5.9 |
Testing | Python |
Architecture
flowchart LR
Client[MCP client] -->|Streamable HTTP /mcp| Server[FastMCP server]
Server --> Validation[Tool validation]
Validation --> Service[Medical tourism service]
Service --> ClientLayer[HTTP client, cache, limiter]
ClientLayer --> KTO[KTO MdclTursmService API]
Server -->|GET /healthz| Health[Liveness response]The Python server creates one HTTP client for its application lifespan. Successful tool calls return a list of dictionaries. Application and upstream failures are converted to typed, client safe errors.
The cache stores up to 256 responses in memory. District code responses use a 24 hour time to live. Other responses use a 5 minute time to live. Cache and rate limit state are not shared between processes.
Repository Structure
.
├── src/mcp_server/ # Python MCP package
│ ├── clients/ # KTO client, cache, and rate limiter
│ ├── config/ # Runtime settings
│ ├── errors/ # Application error types
│ ├── observability/ # Logging configuration
│ ├── services/ # Medical tourism operations
│ ├── tools/ # MCP tool adapters and registry
│ └── transports/ # Streamable HTTP entry point
├── tests/ # Unit, contract, integration, and security tests
├── docs/ # Architecture, capability, deployment, and security notes
├── artifacts/
│ ├── api-server/ # Express health API
│ └── landing/ # React landing page
├── lib/ # Shared TypeScript packages
├── mcp-server/main.py # Compatibility entry point
├── pyproject.toml # Python package and console script
└── pnpm-workspace.yaml # TypeScript workspace boundariesRequirements
MCP service
Python 3.11 or later
An approved API key for the KTO
MdclTursmService
Full workspace
Node.js
pnpm
The MCP service requirements above
The repository does not pin minimum Node.js or pnpm versions. Use a current supported release that can install pnpm-lock.yaml.
Environment Variables
MCP service
Variable | Required | Default | Purpose |
| Yes | None | Encoded or decoded data.go.kr service key |
| No |
| HTTP listener port |
| No | Localhost entries | Comma separated hosts accepted by transport validation |
| No | Localhost entries | Comma separated browser origins accepted by transport validation |
| No | None | Deployment host fallback when |
TypeScript workspace
Variable | Component | Required | Purpose |
| API server | Yes | Listener port |
| Landing page | Yes | Vite development and build configuration |
| API server, landing page | No | Development or production behavior |
| API server | No | Pino log level, default |
| Landing page | Yes | Vite base path, such as |
| Shared database package | When used | PostgreSQL connection string |
| Landing page | No | Deployment domain metadata |
| Landing page | No | Enables development platform plugins when present |
The MCP service does not use a database. DATABASE_URL applies only when the shared database package is imported by a TypeScript application.
Installation
Clone the repository:
git clone https://github.com/leejaew/visitkorea-medicaltourism-mcp.git
cd visitkorea-medicaltourism-mcpInstall the Python project:
uv sync --frozenInstall the TypeScript workspace only if you need the landing page, API server, or shared packages:
pnpm install --frozen-lockfileConfiguration
Request access to service
15143913on the Korea Public Data Portal.Copy the environment template.
Replace the placeholder with the issued service key.
cp .env.example .envBoth the encoded and decoded key variants issued by data.go.kr are accepted. The server normalizes the value at startup.
Never commit .env or a real service key.
Local Development
Start the MCP service:
uv run visitkorea-mcpEquivalent package entry points:
uv run python -m mcp_server
python mcp-server/main.pyThe compatibility script requires the Python dependencies to be installed in the active environment.
MCP endpoints
Method and path | Purpose |
| Streamable HTTP MCP traffic |
| Liveness response |
The default local base URL is http://localhost:8000.
MCP client configuration
Use the deployed HTTPS endpoint in any client that supports Streamable HTTP:
{
"mcpServers": {
"visitkorea-medicaltourism": {
"type": "streamableHttp",
"url": "https://your-domain.example/mcp"
}
}
}This configuration does not add client authentication. Apply access controls at the deployment boundary if the service must not be public.
Supporting applications
Start the Express API:
PORT=8080 pnpm --filter @workspace/api-server run devStart the landing page:
PORT=5173 BASE_PATH=/ pnpm --filter @workspace/landing run devThe Express artifact exposes GET /api/healthz.
MCP Tool Reference
All tools require lang_div_cd. List and search tools default to page 1 with 10 results. Detail tools require a content_id returned by a list or search operation.
Tool | Upstream operation | Purpose | Cache |
|
| List province and district codes | 24 hours |
|
| Search by administrative area | 5 minutes |
|
| Search within 1 to 20,000 metres of WGS84 coordinates | 5 minutes |
|
| Search upstream facility records by keyword | 5 minutes |
|
| Page through synchronization records | 5 minutes |
|
| Retrieve address, contact, location, and overview fields | 5 minutes |
|
| Retrieve hours, parking, capacity, and related fields | 5 minutes |
|
| Retrieve specialties, service languages, and reservation fields | 5 minutes |
Language codes
Code | Language |
| English |
| Japanese |
| Simplified Chinese |
| Korean |
| Russian |
Tool docstrings provide the complete parameter schemas to connected MCP clients.
Build and Packaging
Build Python wheel and source distributions:
uv buildPython packages are written to dist/.
Typecheck and build every TypeScript workspace package that defines a build script:
PORT=5173 BASE_PATH=/ pnpm run buildRelevant output directories:
Component | Output |
Python package |
|
Express API |
|
Landing page |
|
Testing
Run the Python test suite:
uv run --frozen python -m unittest discover -s tests -p 'test_*.py'The suite covers unit behavior, endpoint contracts, ASGI integration, registration, and security boundaries. Tests use mocked upstream responses and do not require a live service key unless a test explicitly performs a live API check.
Code Quality
Typecheck the TypeScript workspace:
pnpm run typecheckThe repository does not currently declare a Python formatter, linter, static type checker, JavaScript test runner, or continuous integration workflow.
External Service
The MCP service calls:
https://apis.data.go.kr/B551011/MdclTursmServiceRequests include the server side VISITKOREA_API_KEY, fixed mobile application metadata, pagination, and tool specific parameters. Upstream quotas, approval status, availability, content freshness, and response semantics remain controlled by data.go.kr and the Korea Tourism Organization.
Security Notes
Store
VISITKOREA_API_KEYin environment secrets. Do not place it in source, examples, logs, or client configuration.The key is excluded from cache keys and application errors.
HTTP client logging is restricted to reduce the risk of query credentials reaching logs.
TLS certificate verification remains enabled.
Host and Origin allowlists protect transport validation. They do not authenticate users.
The MCP endpoint has no application level user authentication or authorization.
Review
docs/security.mdbefore exposing the service publicly.
Deployment
The repository includes Replit artifact configuration for two services:
Service | Build | Start | Port | Health |
MCP server | Managed dependency restore |
|
|
|
Express API |
|
|
|
|
Set VISITKOREA_API_KEY as a deployment secret. Expose /mcp through HTTPS and configure MCP_ALLOWED_HOSTS and MCP_ALLOWED_ORIGINS for the public domain.
For a portable Python deployment, install and start the locked package directly:
uv sync --frozen
uv run --frozen visitkorea-mcpThe landing page builds as static Vite output. The repository does not include deployment configuration for other hosting providers or container platforms.
See docs/deployment.md for the service level deployment contract.
Troubleshooting
VISITKOREA_API_KEY is not set
Create .env from .env.example for local development, or configure the variable through the deployment secret manager.
Host or Origin validation rejects a public request
Add the deployment hostname to MCP_ALLOWED_HOSTS and browser origins to MCP_ALLOWED_ORIGINS. Use comma separated values without credentials or paths.
Upstream authentication or quota errors
Confirm that the data.go.kr key is approved for service 15143913, has not expired, and has remaining quota.
Local rate limit errors
Retry after the interval reported by the tool. The limiter permits 10 upstream calls per minute with a burst capacity of 5. Cache hits do not consume limiter capacity.
Known Limitations
Cache and rate limit state are in memory and scoped to one process.
The service depends on upstream availability, quota, approval, and data quality.
The MCP endpoint does not provide application level authentication.
Only Streamable HTTP transport is configured.
Medical tourism records are informational directory data. They are not medical advice or a guarantee of provider quality, availability, or suitability.
No Docker, Kubernetes, or provider neutral deployment configuration is included.
Contributing
Before submitting a change:
Run the Python test suite.
Run
pnpm run typecheckfor TypeScript changes.Build the affected package or application.
Keep service keys and local environment files out of Git.
Use live API checks only when you have an approved key and the change requires upstream verification.
License
The source code is available under the MIT License.
Tourism data is provided by the Korea Tourism Organization through the Korea Public Data Portal. Data use remains subject to the source terms. KTO Type1 content requires attribution. Type3 content also prohibits modification.
This server cannot be deployed
Maintenance
Related MCP Connectors
Korean fact-verification tools for AI agents: business registration, address, DART, apt prices, laws
- mcpweaveOAuthcom.mcpweave
Korea-native MCP gateway: Korean commerce, payments, messaging, gov & finance APIs for AI agents.
Official Seoul tourism data in 7 languages, in cooperation with the Seoul Tourism Organization.
Travel tools for AI agents: plan and edit real trips, search stays and tours, import travel videos.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to access South Korean tourism information via the official Korea Tourism Organization API, providing comprehensive search for attractions, events, food, and accommodations with multilingual support.827 PyPI9MIT
- FlicenseNot gradedqualityDmaintenanceEnables querying and analyzing non-reimbursable medical treatment costs in South Korea using the Health Insurance Review & Assessment Service API. Supports searching treatment codes, comparing hospital prices, regional statistics analysis, and finding cost-effective healthcare options.-
- FlicenseNot gradedqualityDmaintenanceIntegrates the Korea Tourism Organization's API to provide tourist spot recommendations and detailed information, including attractions, food, and accommodation.1-
- AlicenseNot gradedqualityCmaintenanceWraps Korea Tourism Organization's Wellness Tourism API to let AI agents search wellness spots by area, location, or keyword, with multilingual support and 7 wellness themes.1MIT