iflow-mcp_harimkang-mcp-korea-tourism-api 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,382 @@
1
+ Metadata-Version: 2.4
2
+ Name: iflow-mcp_harimkang-mcp-korea-tourism-api
3
+ Version: 0.1.2
4
+ Summary: MCP Server for Korea Tourism API
5
+ Project-URL: Repository, https://github.com/harimkang/mcp-korea-tourism-api
6
+ Author-email: Harim Kang <harimkang4422@gmail.com>
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Operating System :: OS Independent
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
17
+ Requires-Python: >=3.11
18
+ Requires-Dist: cachetools>=5.5.2
19
+ Requires-Dist: fastmcp==2.9.0
20
+ Requires-Dist: httpx>=0.28.1
21
+ Requires-Dist: ratelimit>=2.2.1
22
+ Requires-Dist: tenacity>=9.1.2
23
+ Description-Content-Type: text/markdown
24
+
25
+ # Korea Tourism API MCP Server ✈️
26
+
27
+ <!-- Badges -->
28
+
29
+ [![smithery badge](https://smithery.ai/badge/@harimkang/mcp-korea-tourism-api)](https://smithery.ai/interface/@harimkang/mcp-korea-tourism-api)
30
+ [![Verified on MseeP](https://mseep.ai/badge.svg)](https://mseep.ai/app/85b16552-af4c-4029-9d47-a4586438ec02)
31
+ [![PyPI version](https://badge.fury.io/py/mcp-korea-tourism-api.svg)](https://badge.fury.io/py/mcp-korea-tourism-api)
32
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
33
+ [![CI Tests](https://github.com/harimkang/mcp-korea-tourism-api/actions/workflows/ci.yml/badge.svg)](https://github.com/harimkang/mcp-korea-tourism-api/actions/workflows/ci.yml)
34
+
35
+ Unlock the wonders of South Korean tourism directly within your AI assistant! This project provides a Model Context Protocol (MCP) server powered by the official Korea Tourism Organization (KTO) API. Equip your AI with the ability to discover vibrant festivals, serene temples, delicious restaurants, comfortable accommodations, and much more across Korea.
36
+
37
+ **Links:**
38
+
39
+ - **PyPI Package:** [https://pypi.org/project/mcp-korea-tourism-api/](https://pypi.org/project/mcp-korea-tourism-api/)
40
+ - **GitHub Repository:** [https://github.com/harimkang/mcp-korea-tourism-api](https://github.com/harimkang/mcp-korea-tourism-api)
41
+ - **Releases:** [https://github.com/harimkang/mcp-korea-tourism-api/releases](https://github.com/harimkang/mcp-korea-tourism-api/releases)
42
+
43
+ ## ✨ Features
44
+
45
+ - **Comprehensive Search:** Find tourist spots, cultural sites, events, food, lodging, and shopping via keywords, area, or location.
46
+ - **Rich Details:** Access descriptions, operating hours, admission fees, photos, addresses, and contact information.
47
+ - **Location-Aware:** Discover attractions near specific GPS coordinates.
48
+ - **Timely Information:** Find festivals and events based on date ranges.
49
+ - **Multilingual Support:** Get information in various languages supported by the KTO API (including English).
50
+ - **Supported Languages**: English, Japanese, Simplified Chinese, Traditional Chinese, Russian, Spanese, German, French
51
+ - **Efficient & Resilient:**
52
+ - **Response Caching:** Uses time-to-live (TTL) caching to store results and reduce redundant API calls, improving speed.
53
+ - **Rate Limiting:** Respects API usage limits to prevent errors.
54
+ - **Automatic Retries:** Automatically retries requests in case of temporary network or server issues.
55
+ - **MCP Standard:** Seamlessly integrates with AI assistants supporting the Model Context Protocol.
56
+
57
+ ## ⚠️ Prerequisites
58
+
59
+ Before you begin, you **must** obtain an API key from the **Korea Tourism Organization (KTO) Data Portal**.
60
+
61
+ 1. Visit the [KTO Data Portal](https://www.data.go.kr/) (or the specific portal for the tourism API if available).
62
+ 2. Register and request an API key for the "TourAPI" services (you might need to look for services providing information like `areaBasedList`, `searchKeyword`, `detailCommon`, etc.).
63
+ 3. Keep your **Service Key (API Key)** safe. It will be required during installation or runtime.
64
+
65
+ > You need to apply for the API below to make a request for each language.
66
+ >
67
+ > - English: https://www.data.go.kr/data/15101753/openapi.do
68
+ > - Japanese: https://www.data.go.kr/data/15101760/openapi.do
69
+ > - Simplified Chinese: https://www.data.go.kr/data/15101764/openapi.do
70
+ > - Traditional Chinese: https://www.data.go.kr/data/15101769/openapi.do
71
+ > - Russian: https://www.data.go.kr/data/15101831/openapi.do
72
+ > - Spanese: https://www.data.go.kr/data/15101811/openapi.do
73
+ > - German: https://www.data.go.kr/data/15101805/openapi.do
74
+ > - French: https://www.data.go.kr/data/15101808/openapi.do
75
+
76
+ ## 🚀 Installation & Running
77
+
78
+ You can run this MCP server using either `uv` (a fast Python package installer and runner) or `Docker`.
79
+
80
+ ### Installing via Smithery
81
+
82
+ To install Korea Tourism API MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@harimkang/mcp-korea-tourism-api):
83
+
84
+ ```bash
85
+ npx -y @smithery/cli install @harimkang/mcp-korea-tourism-api --client claude
86
+ ```
87
+
88
+ ### Option 1: Using `uv` (Recommended for local development)
89
+
90
+ 1. **Clone the repository:**
91
+ ```bash
92
+ git clone https://github.com/harimkang/mcp-korea-tourism-api.git
93
+ cd mcp-korea-tourism-api
94
+ ```
95
+ 2. **Set the API Key Environment Variable:**
96
+ Replace `"YOUR_KTO_API_KEY"` with the actual key you obtained.
97
+
98
+ ```bash
99
+ # On macOS/Linux
100
+ export KOREA_TOURISM_API_KEY="YOUR_KTO_API_KEY"
101
+
102
+ # On Windows (Command Prompt)
103
+ # set KOREA_TOURISM_API_KEY="YOUR_KTO_API_KEY"
104
+
105
+ # On Windows (PowerShell)
106
+ # $env:KOREA_TOURISM_API_KEY="YOUR_KTO_API_KEY"
107
+ ```
108
+
109
+ _Note: For persistent storage, add this line to your shell's configuration file (e.g., `.zshrc`, `.bashrc`, or use system environment variable settings)._
110
+
111
+ 3. **Install dependencies and run the server:**
112
+ This command uses `uv` to install dependencies based on `uv.lock` (if available) or `pyproject.toml` and then runs the server module.
113
+
114
+ ```bash
115
+ # Install Dependency with uv
116
+ uv sync
117
+
118
+ # Default: stdio transport (for MCP clients)
119
+ uv run -m mcp_tourism.server
120
+
121
+ # HTTP transport for web applications
122
+ uv run -m mcp_tourism.server --transport streamable-http --host 127.0.0.1 --port 8000
123
+
124
+ # SSE transport for real-time applications
125
+ uv run -m mcp_tourism.server --transport sse --host 127.0.0.1 --port 8080
126
+
127
+ # Using environment variables
128
+ export MCP_TRANSPORT=streamable-http
129
+ export MCP_HOST=0.0.0.0
130
+ export MCP_PORT=3000
131
+ uv run -m mcp_tourism.server
132
+ ```
133
+
134
+ The server will start and listen for MCP requests via the specified transport protocol.
135
+
136
+ ### Option 2: Using Docker (Recommended for isolated environment/deployment)
137
+
138
+ 1. **Clone the repository:**
139
+ ```bash
140
+ git clone https://github.com/harimkang/mcp-korea-tourism-api.git
141
+ cd mcp-korea-tourism-api
142
+ ```
143
+ 2. **Build the Docker Image:**
144
+ You can build the image with different transport configurations:
145
+
146
+ ```bash
147
+ # Default build (stdio transport)
148
+ docker build -t mcp-korea-tourism-api .
149
+
150
+ # Build with HTTP transport configuration
151
+ docker build -t mcp-korea-tourism-api \
152
+ --build-arg MCP_TRANSPORT=streamable-http \
153
+ --build-arg MCP_HOST=0.0.0.0 \
154
+ --build-arg MCP_PORT=8000 \
155
+ --build-arg MCP_PATH=/mcp \
156
+ --build-arg MCP_LOG_LEVEL=INFO \
157
+ .
158
+
159
+ # Build with SSE transport configuration
160
+ docker build -t mcp-korea-tourism-api \
161
+ --build-arg MCP_TRANSPORT=sse \
162
+ --build-arg MCP_HOST=0.0.0.0 \
163
+ --build-arg MCP_PORT=8080 \
164
+ .
165
+ ```
166
+
167
+ 3. **Run the Docker Container:**
168
+ You can run the container with different transport configurations:
169
+ - **Stdio Transport (Default - for MCP clients):**
170
+
171
+ ```bash
172
+ docker run --rm -it \
173
+ -e KOREA_TOURISM_API_KEY="YOUR_KTO_API_KEY" \
174
+ mcp-korea-tourism-api
175
+ ```
176
+
177
+ - **HTTP Transport (for web applications):**
178
+
179
+ ```bash
180
+ # Using runtime environment variables
181
+ docker run --rm -p 8000:8000 \
182
+ -e KOREA_TOURISM_API_KEY="YOUR_KTO_API_KEY" \
183
+ -e MCP_TRANSPORT=streamable-http \
184
+ -e MCP_HOST=0.0.0.0 \
185
+ -e MCP_PORT=8000 \
186
+ mcp-korea-tourism-api
187
+
188
+ # Check health: curl http://localhost:8000/health
189
+ ```
190
+
191
+ - **SSE Transport (for real-time applications):**
192
+
193
+ ```bash
194
+ docker run --rm -p 8080:8080 \
195
+ -e KOREA_TOURISM_API_KEY="YOUR_KTO_API_KEY" \
196
+ -e MCP_TRANSPORT=sse \
197
+ -e MCP_HOST=0.0.0.0 \
198
+ -e MCP_PORT=8080 \
199
+ mcp-korea-tourism-api
200
+ ```
201
+
202
+ - **Using Docker Compose (Recommended):**
203
+
204
+ ```bash
205
+ # Copy and configure environment variables
206
+ cp docker.env.example .env
207
+ # Edit .env file with your API key and preferred settings
208
+
209
+ # Run with HTTP transport (default profile)
210
+ docker-compose up mcp-tourism-http
211
+
212
+ # Run with SSE transport
213
+ docker-compose --profile sse up mcp-tourism-sse
214
+
215
+ # Run development setup with debug logging
216
+ docker-compose --profile dev up mcp-tourism-dev
217
+ ```
218
+
219
+ ## 🔧 Transport Configuration
220
+
221
+ The Korea Tourism API MCP Server supports multiple transport protocols to accommodate different use cases:
222
+
223
+ ### Available Transports
224
+
225
+ 1. **`stdio`** (Default): Standard input/output transport for direct MCP client integration
226
+ - Best for: Claude Desktop, Cursor, and other MCP-compatible AI assistants
227
+ - Configuration: No additional setup required
228
+
229
+ 2. **`streamable-http`**: HTTP-based transport for web applications
230
+ - Best for: Web applications, REST API integration, load balancers
231
+ - Features: HTTP endpoints, health checks, JSON responses
232
+ - Default endpoint: `http://localhost:8000/mcp`
233
+
234
+ 3. **`sse`**: Server-Sent Events transport for real-time applications
235
+ - Best for: Real-time web applications, event-driven architectures
236
+ - Features: Real-time streaming, persistent connections
237
+ - Default endpoint: `http://localhost:8080/mcp`
238
+
239
+ ### Configuration Options
240
+
241
+ You can configure the server using command line arguments or environment variables:
242
+
243
+ | Setting | CLI Argument | Environment Variable | Default | Description |
244
+ | --------- | ------------- | -------------------- | ----------- | -------------------------------- |
245
+ | Transport | `--transport` | `MCP_TRANSPORT` | `stdio` | Transport protocol to use |
246
+ | Host | `--host` | `MCP_HOST` | `127.0.0.1` | Host address for HTTP transports |
247
+ | Port | `--port` | `MCP_PORT` | `8000` | Port for HTTP transports |
248
+ | Path | `--path` | `MCP_PATH` | `/mcp` | Path for HTTP endpoints |
249
+ | Log Level | `--log-level` | `MCP_LOG_LEVEL` | `INFO` | Logging level |
250
+
251
+ ### Command Line Examples
252
+
253
+ ```bash
254
+ # Get help for all available options
255
+ python -m mcp_tourism.server --help
256
+
257
+ # Run with HTTP transport on custom port
258
+ python -m mcp_tourism.server --transport streamable-http --port 3000 --log-level DEBUG
259
+
260
+ # Run with SSE transport
261
+ python -m mcp_tourism.server --transport sse --host 0.0.0.0 --port 8080
262
+ ```
263
+
264
+ ### Environment Variable Examples
265
+
266
+ ```bash
267
+ # Set environment variables
268
+ export MCP_TRANSPORT=streamable-http
269
+ export MCP_HOST=0.0.0.0
270
+ export MCP_PORT=8000
271
+ export MCP_LOG_LEVEL=INFO
272
+ export KOREA_TOURISM_API_KEY="your_api_key_here"
273
+
274
+ # Run the server
275
+ python -m mcp_tourism.server
276
+ ```
277
+
278
+ ### Health Check
279
+
280
+ For HTTP and SSE transports, a health check endpoint is available at `/health`:
281
+
282
+ ```bash
283
+ # Check server health
284
+ curl http://localhost:8000/health
285
+
286
+ # Example response
287
+ {
288
+ "status": "healthy",
289
+ "service": "Korea Tourism API MCP Server",
290
+ "transport": "streamable-http",
291
+ "timestamp": 1640995200.0
292
+ }
293
+ ```
294
+
295
+ ## 🛠️ Integrating with Cursor
296
+
297
+ To use this MCP server within Cursor:
298
+
299
+ 1. **Ensure the Docker container is runnable:** Follow the Docker installation steps above to build the image (`mcp-korea-tourism-api`). You don't need to manually run the container; Cursor will do that.
300
+ 2. **Locate your `mcp.json` file:** This file configures MCP tools for Cursor. You can usually find it via Cursor's settings or potentially in a path like `~/.cursor/mcp.json` or similar.
301
+ 3. **Add or Update the MCP Configuration:** Add the following JSON object to the list within your `mcp.json` file. If you already have an entry for this tool, update its `command`. Replace `"YOUR_KTO_API_KEY"` with your actual key.
302
+ ![cursor_integrations](images/cursor_integration.png)
303
+
304
+ ```json
305
+ {
306
+ "mcpServers": {
307
+ "korea-tourism": {
308
+ "command": "docker",
309
+ "args": [
310
+ "run",
311
+ "--rm",
312
+ "-i",
313
+ "-e",
314
+ "KOREA_TOURISM_API_KEY=YOUR_KTO_API_KEY",
315
+ "mcp-korea-tourism-api"
316
+ ]
317
+ }
318
+ }
319
+ }
320
+ ```
321
+
322
+ OR Use uv [local directory]
323
+
324
+ ```json
325
+ {
326
+ "mcpServers": {
327
+ "korea-tourism": {
328
+ "command": "uv",
329
+ "args": [
330
+ "--directory",
331
+ "{LOCAL_PATH}/mcp-korea-tourism-api",
332
+ "run",
333
+ "-m",
334
+ "mcp_tourism.server"
335
+ ],
336
+ "env": {
337
+ "KOREA_TOURISM_API_KEY": "YOUR_KTO_API_KEY"
338
+ }
339
+ }
340
+ }
341
+ }
342
+ ```
343
+
344
+ 4. **Save `mcp.json`**.
345
+ 5. **Restart Cursor or Reload MCP Tools:** Cursor should now detect the tool and use Docker to run it when needed.
346
+
347
+ ## 🛠️ MCP Tools Provided
348
+
349
+ This server exposes the following tools for AI assistants:
350
+
351
+ 1. `search_tourism_by_keyword`: Search for tourism information using keywords (e.g., "Gyeongbokgung", "Bibimbap"). Filter by content type, area code.
352
+ ![search_tourism_by_keyword](images/search_tourism_by_keyword.png)
353
+ 2. `get_tourism_by_area`: Browse tourism information by geographic area codes (e.g., Seoul='1'). Filter by content type, district code.
354
+ ![get_tourism_by_area](images/get_tourism_by_area.png)
355
+ 3. `find_nearby_attractions`: Discover tourism spots near specific GPS coordinates (longitude, latitude). Filter by radius and content type.
356
+ ![find_nearby_attractions](images/find_nearby_attractions.png)
357
+ 4. `search_festivals_by_date`: Find festivals occurring within a specified date range (YYYYMMDD). Filter by area code.
358
+ ![search_festivals_by_date](images/search_festivals_by_date.png)
359
+ 5. `find_accommodations`: Search for hotels, guesthouses, etc. Filter by area and district code.
360
+ ![find_accommodations](images/find_accommodations.png)
361
+ 6. `get_detailed_information`: Retrieve comprehensive details (overview, usage time, parking, etc.) for a specific item using its Content ID. Filter by content type.
362
+ ![get_detailed_information](images/get_detailed_information.png)
363
+ 7. `get_tourism_images`: Get image URLs associated with a specific tourism item using its Content ID.
364
+ ![get_tourism_images](images/get_tourism_images.png)
365
+ 8. `get_area_codes`: Retrieve area codes (for cities/provinces) and optionally sub-area (district) codes.
366
+ ![get_area_codes](images/get_area_codes.png)
367
+
368
+ ## ⚙️ Requirements (for `uv` method)
369
+
370
+ - Python 3.12+
371
+ - `uv` installed (`pip install uv`)
372
+
373
+ ## Example Usage
374
+
375
+ An AI assistant integrated with this MCP could handle queries like:
376
+
377
+ - "Find restaurants near Myeongdong station."
378
+ - "Show me pictures of Bulguksa Temple."
379
+ - "Are there any festivals in Busan next month?"
380
+ - "Tell me more about Gyeongbokgung Palace, content ID 264337."
381
+
382
+ [![MseeP.ai Security Assessment Badge](https://mseep.net/pr/harimkang-mcp-korea-tourism-api-badge.png)](https://mseep.ai/app/harimkang-mcp-korea-tourism-api)
@@ -0,0 +1,8 @@
1
+ mcp_tourism/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ mcp_tourism/api_client.py,sha256=zRKrtfJ8KQHupP-rs_nXkWWaEo_z3qxzR46DcEva_Zg,54404
3
+ mcp_tourism/server.py,sha256=LTIqk8b4Hrg4tJ6QA65k0PAq7bsTLg3U2rkivh1TxqA,44652
4
+ iflow_mcp_harimkang_mcp_korea_tourism_api-0.1.2.dist-info/METADATA,sha256=ndkBhCxrZyjJP7ptfU9VdzETVryNAaW_ys3VCxm7OJY,15501
5
+ iflow_mcp_harimkang_mcp_korea_tourism_api-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
6
+ iflow_mcp_harimkang_mcp_korea_tourism_api-0.1.2.dist-info/entry_points.txt,sha256=nK-GVVFxfHA0wDwLJXuwNAXeoloKzbWrXQsXGLerZ2c,58
7
+ iflow_mcp_harimkang_mcp_korea_tourism_api-0.1.2.dist-info/licenses/LICENSE,sha256=DoTGvszOTqDB63p-uwe-q2O7VzFn4vivIFOCsL55Des,1067
8
+ iflow_mcp_harimkang_mcp_korea_tourism_api-0.1.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ mcp-tourism-server = mcp_tourism.server
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Harim Kang
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
File without changes