nara-mcp-server
MCP server for searching Korean government procurement bids (๋๋ผ์ฅํฐ ์ ์ฐฐ๊ณต๊ณ )
Ask AI about nara-mcp-server
Powered by Claude ยท Grounded in docs
I know everything about nara-mcp-server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Nara MCP Server (๋๋ผ์ฅํฐ ์ ์ฐฐ๊ณต๊ณ ๊ฒ์)
MCP server for searching Korean government procurement bid notices from G2B (๋๋ผ์ฅํฐ - Nara Jangteo).
Features
- ๐ ํตํฉ ๊ฒ์: ์ฉ์ญ ์ ์ฐฐ๊ณต๊ณ + ์ฌ์ ๊ท๊ฒฉ์ ํค์๋๋ก ๊ฒ์ (๊ฒ์ ๊ธฐ๊ฐ ์์ ์ค์ , ๊ธฐ๋ณธ 7์ผ)
- ๐ฐ ์์ฐ ์ ๋ณด: ๋ชจ๋ ๊ฒ์ ๊ฒฐ๊ณผ์ ์์ฐ ๊ธ์ก ํ์
- ๐
๋ง๊ฐ ์ํ ํ์: ๋ชจ๋ ๊ณต๊ณ ๋ฅผ ํ์ํ๊ณ
โ ์งํ์ค/๐ด ๋ง๊ฐ์ํ๋ฅผ ๋ช ํํ ๊ตฌ๋ถ - ๐ ํ์ผ ์ถ์ถ: ์ ์์์ฒญ์(RFP) ์๋ ๋ค์ด๋ก๋ ๋ฐ ํ ์คํธ ์ถ์ถ
- ๐๏ธ ์ค๋งํธ ํํฐ๋ง: ์ ์์์ฒญ์/๊ณผ์ ์ง์์ ํ์ผ๋ง ์๋ ์ ๋ณ
- ๐ข ๋ง์ถคํ ์ถ์ฒ: ๋ถ์ ํ๋กํ ๊ธฐ๋ฐ ์ ์ฐํ ์ถ์ฒ (Top N ๋๋ ์ ์ฒด ๋ชฉ๋ก)
- ๐ ๋คํ์ ์ง์: HWP, HWPX, PDF, DOCX, XLSX, ZIP ํ์ผ ์๋ ์ฒ๋ฆฌ
- ๐ฏ ์ ๋ต ๋ถ์: ์ฒจ๋ถํ์ผ ๊ธฐ๋ฐ ์ ์ฐฐ ์ ๋ต ์ ์
Quick Start
Get started in 3 steps:
-
Install from PyPI
pip install nara-mcp-server -
Get API keys (2๊ฐ ํ์)
- ๊ณต๊ณต๋ฐ์ดํฐํฌํธ ์์ "์กฐ๋ฌ์ฒญ_๋๋ผ์ฅํฐ ์
์ฐฐ๊ณต๊ณ ์ ๋ณด์๋น์ค" ํ์ฉ์ ์ฒญ โ
NARA_API_KEY - ๋์ผ ํฌํธ์์ "์กฐ๋ฌ์ฒญ_๋๋ผ์ฅํฐ ์ฌ์ ๊ท๊ฒฉ์ ๋ณด์๋น์ค(HrcspSsstndrdInfoService)" ํ์ฉ์ ์ฒญ โ
NARA_PRESPEC_API_KEY
- ๊ณต๊ณต๋ฐ์ดํฐํฌํธ ์์ "์กฐ๋ฌ์ฒญ_๋๋ผ์ฅํฐ ์
์ฐฐ๊ณต๊ณ ์ ๋ณด์๋น์ค" ํ์ฉ์ ์ฒญ โ
-
Configure Claude Desktop Add to
claude_desktop_config.json:{ "mcpServers": { "nara-jangteo": { "command": "uvx", "args": [ "--python", "3.11", "--from", "nara-mcp-server", "nara-server" ], "env": { "NARA_API_KEY": "์ ์ฐฐ๊ณต๊ณ API KEY", "NARA_PRESPEC_API_KEY": "์ฌ์ ๊ท๊ฒฉ API KEY", "UV_LINK_MODE": "copy" } } } } -
Start using! Restart Claude Desktop and ask: "๋๋ผ์ฅํฐ์์ 'AI' ํค์๋๋ก ์ ์ฐฐ๊ณต๊ณ ๋ฅผ ๊ฒ์ํด์ค"
Prerequisites
1. API ํค ๋ฐ๊ธ (ํ์ โ 2๊ฐ์ง)
๋๋ผ์ฅํฐ API๋ ์ผ๋ฐ ์ ์ฐฐ๊ณต๊ณ ์ ์ฌ์ ๊ท๊ฒฉ์ด ๋ณ๋ ์๋น์ค๋ก ๋ถ๋ฆฌ๋์ด ์์ด ๊ฐ๊ฐ ํ์ฉ์ ์ฒญ์ด ํ์ํฉ๋๋ค.
โ ์
์ฐฐ๊ณต๊ณ API ํค (NARA_API_KEY)
- ๊ณต๊ณต๋ฐ์ดํฐํฌํธ ์ ์ ๋ฐ ํ์๊ฐ์
- "์กฐ๋ฌ์ฒญ_๋๋ผ์ฅํฐ ์ ์ฐฐ๊ณต๊ณ ์ ๋ณด์๋น์ค" ๊ฒ์ ํ ํ์ฉ์ ์ฒญ
- ๋ง์ดํ์ด์ง > ๊ฐ๋ฐ๊ณ์ ์์ ServiceKey ํ์ธ (์ผ๋ฐ ์ธ์ฆํค Decoding ์ฌ์ฉ)
โก ์ฌ์ ๊ท๊ฒฉ API ํค (NARA_PRESPEC_API_KEY)
- ๋์ผ ํฌํธ์์ "์กฐ๋ฌ์ฒญ_๋๋ผ์ฅํฐ ์ฌ์ ๊ท๊ฒฉ์ ๋ณด์๋น์ค(HrcspSsstndrdInfoService)" ๊ฒ์ ํ ํ์ฉ์ ์ฒญ
- ์น์ธ ํ ๋์ผํ๊ฒ ServiceKey ํ์ธ
๋ ์๋น์ค์ ํค๊ฐ ๋์ผํ ์๋ ์์ผ๋, ๊ฐ๊ฐ ํ์ฉ์ ์ฒญ์ด ์๋ฃ๋์ด์ผ ์ ์ ๋์ํฉ๋๋ค.
2. Python ํ๊ฒฝ
- Python 3.10 ์ด์ ํ์
Installation
Option 1: From PyPI (Recommended)
The simplest way to install:
pip install nara-mcp-server
Note: This installs the nara-server command globally for easy access.
Option 2: From Source (For Development)
If you want to contribute or modify the code:
git clone https://github.com/Datajang/narajangteo_mcp_server.git
cd narajangteo_mcp_server
pip install -e .
Configuration
Using .env File (Recommended for Development)
Create a .env file in the project root:
# .env
NARA_API_KEY=์
์ฐฐ๊ณต๊ณ _์๋น์คํค
NARA_PRESPEC_API_KEY=์ฌ์ ๊ท๊ฒฉ_์๋น์คํค
The .env file is automatically loaded when running the server.
Claude Desktop Configuration
์ค์ ํ์ผ ์์น:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"nara-jangteo": {
"command": "uvx",
"args": [
"--python",
"3.11",
"--from",
"nara-mcp-server",
"nara-server"
],
"env": {
"NARA_API_KEY": "์
์ฐฐ๊ณต๊ณ API KEY",
"NARA_PRESPEC_API_KEY": "์ฌ์ ๊ท๊ฒฉ API KEY",
"UV_LINK_MODE": "copy"
}
}
}
}
์ค์ ์ฌํญ:
- PyPI ์ค์น ์
nara-server๋ช ๋ น์ด๊ฐ ์๋์ผ๋ก ๋ฑ๋ก๋ฉ๋๋ค NARA_API_KEYโ ์ ์ฐฐ๊ณต๊ณ ServiceKey ์ ๋ ฅNARA_PRESPEC_API_KEYโ ์ฌ์ ๊ท๊ฒฉ ServiceKey ์ ๋ ฅ (๋ฏธ์ค์ ์ ์ฌ์ ๊ท๊ฒฉ ๊ฒ์ ๋นํ์ฑํ)- Claude Desktop ์ฌ์์ ํ์
Other MCP Clients
Continue, Cline ๋ฑ ๋ค๋ฅธ MCP ํด๋ผ์ด์ธํธ๋ ๋์ผํ ๋ฐฉ์์ผ๋ก ์ค์ ๊ฐ๋ฅํฉ๋๋ค.
Development & Testing
Using .env File (Recommended)
For local development, create a .env file:
# .env
NARA_API_KEY=์
์ฐฐ๊ณต๊ณ _์๋น์คํค
NARA_PRESPEC_API_KEY=์ฌ์ ๊ท๊ฒฉ_์๋น์คํค
The .env file is automatically loaded and not tracked by git (.gitignore).
Example workflow:
# 1. .env ํ์ผ ์์ฑ ํ ๋ API ํค ์
๋ ฅ
# NARA_API_KEY=your_bid_key
# NARA_PRESPEC_API_KEY=your_prespec_key
# 2. Run MCP Inspector (no env setup needed!)
npx @modelcontextprotocol/inspector uv --directory . run python -m nara_server.server
Available Tools
1. get_bids_by_keyword
ํค์๋๋ก ์ฉ์ญ ์ ์ฐฐ๊ณต๊ณ ๋ฐ ์ฌ์ ๊ท๊ฒฉ์ ๊ฒ์ํฉ๋๋ค. (์ต๋ 20๊ฐ ๊ฒฐ๊ณผ)
ํ๋ผ๋ฏธํฐ:
keyword(ํ์): ๊ฒ์ ํค์๋ (์: "์ธ๊ณต์ง๋ฅ", "AI", "ํ๋ซํผ", "์์คํ ๊ตฌ์ถ")days(์ ํ, ๊ธฐ๋ณธ๊ฐ: 7): ๊ฒ์ ๊ธฐ๊ฐ (์ผ). ์ค๋๋ ๊ณต๊ณ ๊ฒ์ ์ ๋๋ฆด ๊ฒ (์: 30, 60, 90)
๋ฐํ ์ ๋ณด:
์ผ๋ฐ ์ ์ฐฐ๊ณต๊ณ :
- ๊ณต๊ณ ๋ช (bidNtceNm)
- ๊ณต๊ณ ๋ฒํธ (bidNtceNo)
- ์์๊ธฐ๊ด (dminsttNm)
- ์์ฐ (bdgtAmt / presmptPrce)
- ๋ง๊ฐ์ผ์ (bidClseDt) + ์งํ์ค/๋ง๊ฐ ์ํ ํ์
- ์ ์์์ฒญ์ ํ์ผ (์ ์์์ฒญ์/์ ์ ํค์๋ ํฌํจ ํ์ผ๋ง ์๋ ํํฐ๋ง)
์ฌ์ ๊ท๊ฒฉ:
- ํ๋ช /์๋น์ค๋ช (prdctClsfcNoNm)
- ์ฌ์ ๊ท๊ฒฉ๋ฒํธ (bfSpecRgstNo)
- ๋ฐ์ฃผ๊ธฐ๊ด (orderInsttNm)
- ๋ฐฐ์ ์์ฐ (asignBdgtAmt)
- ์๊ฒฌ๋ง๊ฐ์ผ์ (opninRgstClseDt)
- ๊ท๊ฒฉ๋ฌธ์ ํ์ผ URL (specDocFileUrl1~5)
์์ ์ง๋ฌธ:
๋๋ผ์ฅํฐ์์ "์ธ๊ณต์ง๋ฅ" ํค์๋๋ก ์
์ฐฐ๊ณต๊ณ ๋ฅผ ๊ฒ์ํด์ค
AI ๊ด๋ จ ์ ๋ถ ํ๋ก์ ํธ ์
์ฐฐ ๊ณต๊ณ ๋ฅผ ์ต๊ทผ 30์ผ ๊ธฐ์ค์ผ๋ก ์ฐพ์์ค
2. recommend_bids_for_dept
๋ถ์/ํ ํ๋กํ์ ๊ธฐ๋ฐ์ผ๋ก ๋ง์ถคํ ์ ์ฐฐ๊ณต๊ณ ๋ฅผ ์ถ์ฒํฉ๋๋ค.
ํ๋ผ๋ฏธํฐ:
keyword(ํ์): ๊ฒ์ ํค์๋department_profile(ํ์): ๋ถ์/ํ ์ค๋ช (์: "UI/UX ๋์์ธํ", "AI/ML ๊ฐ๋ฐํ")days(์ ํ, ๊ธฐ๋ณธ๊ฐ: 7): ๊ฒ์ ๊ธฐ๊ฐ (์ผ). ์ค๋๋ ๊ณต๊ณ ๊ฒ์ ์ ๋๋ฆด ๊ฒ (์: 30, 60, 90)
๊ฒ์ ๋ฒ์:
- ์ต๋ 60๊ฐ ๊ฒฐ๊ณผ (์ผ๋ฐ ์ ์ฐฐ 30๊ฐ + ์ฌ์ ๊ท๊ฒฉ 30๊ฐ)
์ถ๋ ฅ ๋ฐฉ์:
- ์ฌ์ฉ์๊ฐ "Top 5" ๋๋ ํน์ ๊ฐ์๋ฅผ ์์ฒญํ๋ฉด ํด๋น ๊ฐ์๋งํผ ์ถ์ฒ
- "๋ชจ๋ ๊ด๋ จ ๊ณต๊ณ "๋ฅผ ์์ฒญํ๋ฉด ์ ์ฒด ๋ชฉ๋ก์ ์ ํฉ๋ ์์ผ๋ก ํ์
- ์์ฐ์ด ์๋ ํญ๋ชฉ ์ฐ์ ์ถ์ฒ
- ์ ์์์ฒญ์/๊ณผ์ ์ง์์ ํ์ผ๋ง ์๋ ํํฐ๋งํ์ฌ ํ์
์์ ์ง๋ฌธ:
์ฐ๋ฆฌ ํ์ ํด๋ผ์ฐ๋ ์ธํ๋ผ ๊ตฌ์ถ ์ ๋ฌธํ์ด์ผ. "ํด๋ผ์ฐ๋" ํค์๋๋ก ์ฐ๋ฆฌ ํ์ ๋ง๋ ์
์ฐฐ๊ณต๊ณ Top 5๋ฅผ ์ถ์ฒํด์ค
๋ฐ์ดํฐ๋ฒ ์ด์ค ๋ง์ด๊ทธ๋ ์ด์
์ ๋ฌธ๊ฐ์ธ๋ฐ, "DB" ํค์๋๋ก ๊ด๋ จ๋ ๋ชจ๋ ๊ณต๊ณ ๋ฅผ ๋ณด์ฌ์ค
3. analyze_bid_detail
์ ์ฐฐ๊ณต๊ณ ์ฒจ๋ถํ์ผ(์ ์์์ฒญ์)์ ๋ค์ด๋ก๋ํ๊ณ ํ ์คํธ๋ฅผ ์ถ์ถํ์ฌ ๋ถ์ํฉ๋๋ค.
ํ๋ผ๋ฏธํฐ:
file_url(ํ์): ์ฒจ๋ถํ์ผ URL (๊ฒ์ ๊ฒฐ๊ณผ์ ์ ์์์ฒญ์ URL)filename(ํ์): ํ์ผ๋ช (๊ฒ์ ๊ฒฐ๊ณผ์ ํ์ผ๋ช )department_profile(์ ํ): ๋ถ์ ์ค๋ช (์ ๋ ฅ ์ ์ ๋ต ๋ถ์ ํฌํจ)
์ง์ ํ์:
- HWP: ํ๊ธ ๋ฌธ์ (์ฃผ์ ํ์, langchain-teddynote HWPLoader ์ฌ์ฉ)
- HWPX: ํ๊ธ ์คํผ์ค XML ๋ฌธ์
- PDF: ํ ์คํธ ๊ธฐ๋ฐ PDF (์ด๋ฏธ์ง ๊ธฐ๋ฐ PDF๋ ์ ์ธ)
- DOCX: MS Word ๋ฌธ์
- XLSX: Excel ์คํ๋ ๋์ํธ
- ZIP: ์๋์ผ๋ก ๋ด๋ถ ํ์ผ ์ ํ
- ์ฐ์ ์์: ์ ์์์ฒญ์ > ๊ณผ์ ์ง์์ > .hwp/.hwpx > .docx/.pdf
์์ ์ง๋ฌธ:
์ ๊ณต๊ณ ์ ์ฒจ๋ถํ์ผ์ ๋ถ์ํด์ค. ์ฐ๋ฆฌ ํ์ AI ๊ฐ๋ฐํ์ด์ผ.
๋ถ์ ๊ฒฐ๊ณผ:
- Fit Score (0-100): ํ๊ณผ ํ๋ก์ ํธ์ ์ ํฉ๋
- Core Tasks: ํ์ด ์ํํ ํต์ฌ ์ ๋ฌด
- Winning Strategy: ์ ์ฐฐ ์ ๋ต 3๊ฐ์ง
- Risk Factors: ์ํ ์์ (๊ธฐ์ ์คํ, ์ผ์ , ํ๋ํฐ ๋ฑ)
Usage Examples
๊ธฐ๋ณธ ๊ฒ์
Q: ๋๋ผ์ฅํฐ์์ "์์คํ
๊ฐ๋ฐ" ํค์๋๋ก ์
์ฐฐ๊ณต๊ณ ๋ฅผ ๊ฒ์ํด์ค
A: ๐ **์ผ๋ฐ ์
์ฐฐ ๊ณต๊ณ (Regular Bids)**
Found 15 bid notice(s) total, 15 retrieved
๐
Search period: 20260116 ~ 20260123
## 1. AI ๊ธฐ๋ฐ ๊ณ ๊ฐ๊ด๋ฆฌ ์์คํ
๊ฐ๋ฐ ์ฉ์ญ
๐ ๊ณต๊ณ ๋ฒํธ: 20260112345-00
๐ข ์์๊ธฐ๊ด: ์์ธ์์ฒญ
๐ฐ ์์ฐ: 150,000,000์
โฐ ๋ง๊ฐ์ผ์: 202601201430 (โ
์งํ์ค)
๐ ์ ์์์ฒญ์:
- ์ ์์์ฒญ์_AI์์คํ
.hwp: [URL]
================================================================================
๐ **์ฌ์ ๊ท๊ฒฉ ๊ณต๊ณ (Preliminary Specifications)**
Found 3 pre-spec(s) total, 3 retrieved
## 1. ๐ [์ฌ์ ๊ท๊ฒฉ] ๊ณ ๊ฐ๊ด๋ฆฌ ํ๋ซํผ ๊ตฌ์ถ
๐ ์ฌ์ ๊ท๊ฒฉ๋ฒํธ: PRE20260101-01
๐ข ๋ฐ์ฃผ๊ธฐ๊ด: ๊ฒฝ๊ธฐ๋์ฒญ
๐ฐ ๋ฐฐ์ ์์ฐ: 80,000,000์
โฐ ์๊ฒฌ๋ง๊ฐ์ผ์: 202601251700 (๐ด ๋ง๊ฐ)
๐ ๊ท๊ฒฉ๋ฌธ์:
- ๊ท๊ฒฉ๋ฌธ์ 1: [URL]
๋ง์ถคํ ์ถ์ฒ
Q: ์ฐ๋ฆฌ ํ์ React ๊ธฐ๋ฐ ์น ํ๋ก ํธ์๋ ๊ฐ๋ฐ ์ ๋ฌธํ์ด์ผ. "ํ๋ซํผ ๊ตฌ์ถ" ํค์๋๋ก ์ฐ๋ฆฌ ํ์ ๋ง๋ ์
์ฐฐ๊ณต๊ณ Top 5๋ฅผ ์ถ์ฒํด์ค
A: ๐ฏ Department-Filtered Integrated Search Results
๐ Department Profile: React ๊ธฐ๋ฐ ์น ํ๋ก ํธ์๋ ๊ฐ๋ฐ ์ ๋ฌธํ
๐ Keyword: ํ๋ซํผ ๊ตฌ์ถ
๐ Results:
- Regular Bids: 22 open (out of 30 total)
- Pre-Specs: 8 open (out of 30 total)
**Top 5 Recommendations:**
1. โ
[BID] ์๋ฏผ์ฐธ์ฌ ํ๋ซํผ ๊ตฌ์ถ (์ ํฉ๋ 95์ )
- ์์ฐ: 200,000,000์
- ์ด์ : React/TypeScript ๊ธฐ๋ฐ ์น ํ๋ก ํธ์๋ ๊ตฌ์ถ ๋ช
์, UI/UX ๋์์ธ ์ญ๋ ์ค์
2. โ
[PRESPEC] ๊ณต๊ณต์๋น์ค ์นํฌํธ ์ฌ์ ๊ท๊ฒฉ (์ ํฉ๋ 90์ )
- ์์ฐ: 150,000,000์
- ์ด์ : ๋ฐ์ํ ์น ๋์์ธ ์๊ตฌ, ์ฌ์ ์๊ฒฌ ์ ์ถ๋ก ๊ฒฝ์๋ ฅ ํ๋ณด ๊ฐ๋ฅ
...
์ ๋ต ๋ถ์
Q: ์ 1๋ฒ ๊ณต๊ณ ์ ์ฒจ๋ถํ์ผ์ ๋ถ์ํด์ค
A: ๐ Bid Document Analysis
๐ File: ์ ์์์ฒญ์_์๋ฏผ์ฐธ์ฌํ๋ซํผ.hwp
## Strategic Analysis
**Fit Score:** 92/100
- React 18, TypeScript, Tailwind CSS ๊ธฐ์ ์คํ ์๊ตฌ
- ๋ฐ์ํ ์น ๋์์ธ ๋ฐ ์ ๊ทผ์ฑ(WCAG 2.1) ์ค์ ํ์
**Core Tasks:**
1. React ๊ธฐ๋ฐ SPA(Single Page Application) ๊ฐ๋ฐ
2. ์ฌ์ฉ์ ๋์๋ณด๋ ๋ฐ ๊ด๋ฆฌ์ ์ฝ์ UI ๊ตฌํ
3. REST API ์ฐ๋ ๋ฐ ์ํ ๊ด๋ฆฌ (Redux/Zustand)
**Winning Strategy:**
1. ํฌํธํด๋ฆฌ์ค์์ ์ ๋ถ๊ธฐ๊ด ๋ฐ์ํ ์น ์ฌ๋ก ๊ฐ์กฐ
2. ์ ๊ทผ์ฑ ์ค์ ๊ฒฝํ ๋ฐ ์น ํ์ค ์ธ์ฆ์ ์ ์
3. React ์ฑ๋ฅ ์ต์ ํ ๊ธฐ๋ฒ (Code Splitting, Lazy Loading) ๊ฐ์กฐ
**Risk Factors:**
- โ ๏ธ ๊ฐ๋ฐ ๊ธฐ๊ฐ 3๊ฐ์๋ก ์ด๋ฐํจ (์ผ๋ฐ์ ์ผ๋ก 4-5๊ฐ์ ์์)
- โ ๏ธ ์ง์ฒด์๊ธ: ์ผ 0.1% (์ต๋ 10%)
- โ
๊ธฐ์ ์คํ์ ํ ์ญ๋๊ณผ 100% ์ผ์น
Troubleshooting
1. ValueError: NARA_API_KEY / NARA_PRESPEC_API_KEY not found
์์ธ: API ํค๊ฐ ํ๊ฒฝ๋ณ์๋ก ์ค์ ๋์ง ์์์ต๋๋ค.
ํด๊ฒฐ ๋ฐฉ๋ฒ:
- Claude Desktop ์ค์ ํ์ผ์
env์น์ ์NARA_API_KEY์NARA_PRESPEC_API_KEY์ถ๊ฐ - ์ฌ์ ๊ท๊ฒฉ ํค(
NARA_PRESPEC_API_KEY) ๋ฏธ์ค์ ์ ์ฌ์ ๊ท๊ฒฉ ๊ฒ์์ ๋นํ์ฑํ๋์ง๋ง ์ผ๋ฐ ์ ์ฐฐ๊ณต๊ณ ๊ฒ์์ ๊ณ์ ๋์ํฉ๋๋ค - Claude Desktop ์ฌ์์
2. No Results Found
์์ธ: ํด๋น ๊ธฐ๊ฐ์ ํด๋น ํค์๋์ ๊ณต๊ณ ๊ฐ ์์ต๋๋ค.
ํด๊ฒฐ ๋ฐฉ๋ฒ:
- ๋ค๋ฅธ ํค์๋๋ก ๊ฒ์ ์๋ (๋ ์ผ๋ฐ์ ์ธ ํค์๋ ์ฌ์ฉ)
daysํ๋ผ๋ฏธํฐ๋ฅผ ๋๋ ค ๊ฒ์ ๊ธฐ๊ฐ ํ์ฅ (์: days=30, days=60)- ๋ง๊ฐ๋ ๊ณต๊ณ ๋
๐ด ๋ง๊ฐํ์์ ํจ๊ป ๊ทธ๋๋ก ํ์๋๋ฏ๋ก ๋ณ๋ ํ์ธ ๋ถํ์
3. API Error (Code: 20 - Access Denied)
์์ธ: API ํค๊ฐ ์๋ชป๋์๊ฑฐ๋ ํ์ฉ์ ์ฒญ์ด ์น์ธ๋์ง ์์์ต๋๋ค.
ํด๊ฒฐ ๋ฐฉ๋ฒ:
- ๊ณต๊ณต๋ฐ์ดํฐํฌํธ > ๋ง์ดํ์ด์ง์์ ServiceKey ํ์ธ
- ํ์ฉ์ ์ฒญ ์น์ธ ์ฌ๋ถ ํ์ธ
4. HWP ํ์ผ ์ถ์ถ ์คํจ
์์ธ:
- DRM/์ํธํ๋ HWP ํ์ผ
- ๋นํ์ค ์ธ์ฝ๋ฉ ๋๋ ์์๋ ํ์ผ
- ํน์ํ ์์ถ ๋ฐฉ์ ์ฌ์ฉ
ํด๊ฒฐ ๋ฐฉ๋ฒ:
- ์๋ณธ ๋งํฌ์์ ์๋ ๋ค์ด๋ก๋ ์๋
- PDF ๋ฒ์ ํ์ผ์ด ์๋์ง ํ์ธ
- ๋ค๋ฅธ ์ฒจ๋ถํ์ผ(DOCX, PDF ๋ฑ) ์ฌ์ฉ
์ฐธ๊ณ :
- ์ด ์๋ฒ๋
langchain-teddynoteHWPLoader๋ฅผ ์ฌ์ฉํ์ฌ ๋๋ถ๋ถ์ HWP ํ์ผ ์ฒ๋ฆฌ ๊ฐ๋ฅ - ์ถ์ถ ์คํจ ์
olefileํ์๋ก ์๋ ํด๋ฐฑ
API Information
- ๋ฐ์ดํฐ ์ถ์ฒ: ์กฐ๋ฌ์ฒญ ๋๋ผ์ฅํฐ (Korea Public Procurement Service)
- ์๋ํฌ์ธํธ:
- ์ผ๋ฐ ์
์ฐฐ:
http://apis.data.go.kr/1230000/ad/BidPublicInfoService/getBidPblancListInfoServcPPSSrch - ์ฌ์ ๊ท๊ฒฉ:
http://apis.data.go.kr/1230000/ao/HrcspSsstndrdInfoService/getPublicPrcureThngInfoServcPPSSrch
- ์ผ๋ฐ ์
์ฐฐ:
- API ํค: ๋ ์๋น์ค ๊ฐ๊ฐ ๊ณต๊ณต๋ฐ์ดํฐํฌํธ ํ์ฉ์ ์ฒญ ํ์ (
NARA_API_KEY,NARA_PRESPEC_API_KEY) - ๊ณต๊ณ ์ ํ: ์ฉ์ญ (Service) - ์ปจ์คํ , ๊ฐ๋ฐ, SI ํ๋ก์ ํธ
- ๊ฒ์ ๊ธฐ๊ฐ: ๊ธฐ๋ณธ 7์ผ,
daysํ๋ผ๋ฏธํฐ๋ก ์์ ์ค์ ๊ฐ๋ฅ (์: 30, 60, 90์ผ) - ๋ ์ง ์ฒญํฌ ๋ถํ : API ๋ ์ง ๋ฒ์ ์ ํ(~15์ผ) ์๋ ์ฐํ, ๋ด๋ถ์ ์ผ๋ก 15์ผ ๋จ์ ๋ถํ ํ ๊ฒฐ๊ณผ ๋ณํฉ
- ํํฐ๋ง:
- ๋ชจ๋ ๊ณต๊ณ ํ์, ๋ง๊ฐ์ผ์ ์์
โ ์งํ์ค/๐ด ๋ง๊ฐ์ํ ํ์ - ์ฌ์ ๊ท๊ฒฉ ํญ๋ชฉ์
๐ [์ฌ์ ๊ท๊ฒฉ]ํ๊ทธ๋ก ์ผ๋ฐ ์ ์ฐฐ๊ณต๊ณ ์ ๋ช ํํ ๊ตฌ๋ถ
- ๋ชจ๋ ๊ณต๊ณ ํ์, ๋ง๊ฐ์ผ์ ์์
์ฐธ๊ณ :
- ๋ฌผํ ๊ณต๊ณ : ์๋ํฌ์ธํธ ๋ณ๊ฒฝ ํ์ (
getBidPblancListInfoThngPPSSrch) - ๊ณต์ฌ ๊ณต๊ณ : ์๋ํฌ์ธํธ ๋ณ๊ฒฝ ํ์ (
getBidPblancListInfoCnstwkPPSSrch)
Technical Stack
- Python: 3.10+
- MCP Framework:
mcp>=1.15.0- Model Context Protocol SDK
- HTTP Client:
httpx>=0.27.0- Async HTTP requests - File Extraction:
langchain-teddynote>=0.3.9- Enhanced HWP extraction (primary, with zlib compression support)olefile>=0.47- HWP fallback (legacy MS OLE format parser)pypdf>=4.0- PDF text extractionpython-docx>=1.1- DOCX parsingopenpyxl>=3.1- XLSX reading
- LLM Integration:
langchain>=0.1.0,<1.0.0- Document loading frameworklangchain-core>=0.1.0,<1.0.0- Core LangChain utilities
- Utilities:
python-dotenv>=1.0.0- Environment variable management
Project Structure
narajangteo_mcp_server/
โโโ src/
โ โโโ nara_server/
โ โโโ __init__.py # Package initialization
โ โโโ server.py # Main MCP server (STDIO transport)
โ โโโ file_extractor.py # Multi-format file text extraction
โโโ pyproject.toml # Python project metadata & dependencies
โโโ .env # Environment variables (local)
โโโ README.md # This file
โโโ CLAUDE.md # Developer guide
โโโ LICENSE # MIT License
Development
Setting up development environment
# Clone repository
git clone https://github.com/Datajang/narajangteo_mcp_server.git
cd narajangteo_mcp_server
# Install in editable mode
pip install -e .
# Set environment variables
export NARA_API_KEY="your_bid_key" # MacOS/Linux
export NARA_PRESPEC_API_KEY="your_prespec_key"
set NARA_API_KEY=your_bid_key # Windows
set NARA_PRESPEC_API_KEY=your_prespec_key
# Or use .env file (recommended)
echo "NARA_API_KEY=your_bid_key" > .env
echo "NARA_PRESPEC_API_KEY=your_prespec_key" >> .env
Running the server
# Run directly
nara-server
# Or using Python module
python -m nara_server.server
Testing with MCP Inspector
MCP Inspector provides an interactive UI for testing tools:
# Install Inspector
npm install -g @modelcontextprotocol/inspector
# Run with Inspector (automatically loads .env)
npx @modelcontextprotocol/inspector python -m nara_server.server
The Inspector will open http://localhost:6274 with:
- Interactive tool testing
- Real-time request/response logs
- Tool parameter validation
Prerequisites:
- Node.js 18+ (Download)
Contributing
Contributions are welcome! Please follow these guidelines:
- Fork the repository
- Create a feature branch
- Make your changes with clear commit messages
- Test thoroughly with real API calls
- Submit a Pull Request
License
MIT License - see LICENSE file for details
Author
Datajang (GitHub)
Links
- PyPI Package: https://pypi.org/project/nara-mcp-server/
- GitHub Repository: https://github.com/Datajang/narajangteo_mcp_server
- Issues: https://github.com/Datajang/narajangteo_mcp_server/issues
- ๊ณต๊ณต๋ฐ์ดํฐํฌํธ: https://www.data.go.kr/
- ๋๋ผ์ฅํฐ: https://www.g2b.go.kr/
Acknowledgments
- ์กฐ๋ฌ์ฒญ ๋๋ผ์ฅํฐ for providing the public API
- Anthropic for the MCP protocol
- Korean government for open data initiatives
