Nara Market FastMCP Server

Nara Market FastMCP Server

Provides access to South Korean government procurement (G2B) and Nara Market shopping mall data, enabling users to search bid announcements, procurement statistics, product catalogs, and contract information through 15 specialized tools.

Category
Visit Server

README

πŸš€ Nara Market FastMCP 2.0 Server

ν•œκ΅­ 정뢀쑰달(G2B) 및 λ‚˜λΌμž₯ν„° μ‡Όν•‘λͺ° 데이터λ₯Ό μˆ˜μ§‘ν•˜λŠ” FastMCPμ„œλ²„μž…λ‹ˆλ‹€.

πŸ› οΈ μ‚¬μš© κ°€λŠ₯ν•œ MCP 도ꡬ (총 15개)

πŸ›οΈ κΈ°λ³Έ API 호좜 도ꡬ (4개)

Tool κΈ°λŠ₯ 지원 API
call_public_data_standard_api κ³΅κ³΅λ°μ΄ν„°κ°œλ°©ν‘œμ€€ API 호좜 μž…μ°°κ³΅κ³ , 낙찰정보, 계약정보 λ“±
call_procurement_statistics_api 곡곡쑰달톡계정보 API 호좜 전체/기관별/기업별 쑰달 톡계
call_product_list_api λ¬Όν’ˆλͺ©λ‘μ •보 API 호좜 μƒν’ˆλΆ„λ₯˜, λ¬Όν’ˆμ •λ³΄ λ“±
call_shopping_mall_api μ’…ν•©μ‡Όν•‘λͺ°ν’ˆλͺ©μ •보 API 호좜 MAS 계약 μƒν’ˆμ •λ³΄

πŸ€– AI μΉœν™” κ°„νŽΈ 도ꡬ (4개)

Tool κΈ°λŠ₯ νŠΉμ§•
get_recent_bid_announcements 졜근 μž…μ°°κ³΅κ³  쑰회 ν•œκΈ€ 업무ꡬ뢄, μžλ™ λ‚ μ§œ 계산
get_successful_bids_by_business_type 업무ꡬ뢄별 낙찰정보 쑰회 ν•œκΈ€ μž…λ ₯, μžλ™ μ½”λ“œ λ³€ν™˜
get_procurement_statistics_by_year 연도별 쑰달톡계 쑰회 κ°„λ‹¨ν•œ 연도 μž…λ ₯
search_shopping_mall_products μ‡Όν•‘λͺ° μ œν’ˆ 검색 μ œν’ˆλͺ…/업체λͺ… 검색

🧭 κ³ κΈ‰ 뢄석 도ꡬ (4개)

Tool κΈ°λŠ₯ μš©λ„
get_all_api_services_info 전체 API μ„œλΉ„μŠ€ 정보 μ‚¬μš© κ°€λŠ₯ν•œ λͺ¨λ“  μ„œλΉ„μŠ€ 및 μ˜€νΌλ ˆμ΄μ…˜ 쑰회
get_api_operations μ„œλΉ„μŠ€λ³„ μ˜€νΌλ ˆμ΄μ…˜ λͺ©λ‘ νŠΉμ • μ„œλΉ„μŠ€μ˜ μ„ΈλΆ€ κΈ°λŠ₯ 확인
call_api_with_pagination_support νŽ˜μ΄μ§• 지원 API 호좜 λŒ€λŸ‰ 데이터 쑰회 및 탐색 κ°€μ΄λ“œ
get_data_exploration_guide 데이터 탐색 κ°€μ΄λ“œ νŒŒλΌλ―Έν„° μ‘°ν•© 및 검색 μ „λž΅ 제곡

πŸ“¦ κΈ°λ³Έ κΈ°λŠ₯ 도ꡬ (3개)

Tool κΈ°λŠ₯ μ„€λͺ…
crawl_list λ‚˜λΌμž₯ν„° μƒν’ˆ λͺ©λ‘ 쑰회 κΈ°λ³Έ μƒν’ˆ 리슀트 μˆ˜μ§‘
get_detailed_attributes μƒν’ˆ 상세 속성 쑰회 κ°œλ³„ μƒν’ˆμ˜ μ„ΈλΆ€ 정보
server_info μ„œλ²„ 정보 버전 및 μ‚¬μš© κ°€λŠ₯ν•œ 도ꡬ λͺ©λ‘

πŸ“š AI κ°€μ΄λ“œ λ¦¬μ†ŒμŠ€ (3개 Resource + 3개 Prompt)

MCP Resources

  • api_parameter_requirements - API별 ν•„μˆ˜/선택 νŒŒλΌλ―Έν„° κ°€μ΄λ“œ
  • parameter_value_examples - νŒŒλΌλ―Έν„° κ°’ μ˜ˆμ‹œ 및 ν˜•μ‹ κ°€μ΄λ“œ
  • common_search_patterns - 자주 μ‚¬μš©λ˜λŠ” 검색 νŒ¨ν„΄ 및 μ΅œμ ν™” μ „λž΅

MCP Prompts

  • workflow_guide - 단계별 μ›Œν¬ν”Œλ‘œμš° κ°€μ΄λ“œ (5κ°€μ§€ 뢄석 μ‹œλ‚˜λ¦¬μ˜€)
  • parameter_selection_guide - νŒŒλΌλ―Έν„° 선택 및 μ΅œμ ν™” κ°€μ΄λ“œ
  • real_world_query_examples - μ‹€μ œ 업무 μ‹œλ‚˜λ¦¬μ˜€λ³„ 쿼리 예제 (8κ°€μ§€)

πŸ”§ μ„€μΉ˜ 및 μ‹€ν–‰

μ‹œμŠ€ν…œ μš”κ΅¬μ‚¬ν•­

  • Python: 3.10 이상
  • λ©”λͺ¨λ¦¬: μ΅œμ†Œ 2GB (λŒ€λŸ‰ 데이터 μˆ˜μ§‘ μ‹œ 4GB+ ꢌμž₯)
  • λ””μŠ€ν¬: μˆ˜μ§‘ 데이터 크기에 따라 μ‘°μ •

1. 둜컬 μ„€μΉ˜ (개발/ν…ŒμŠ€νŠΈ)

# μ €μž₯μ†Œ 클둠
git clone <repository-url>
cd naramarketmcp

# ν™˜κ²½ μ„€μ •
cp .env.example .env
# .env νŒŒμΌμ—μ„œ NARAMARKET_SERVICE_KEY μ„€μ •

# μ˜μ‘΄μ„± μ„€μΉ˜
pip install -r requirements.txt

# STDIO λͺ¨λ“œλ‘œ μ‹€ν–‰ (MCP ν΄λΌμ΄μ–ΈνŠΈμš©)
python -m src.main

# HTTP μ„œλ²„ λͺ¨λ“œλ‘œ μ‹€ν–‰ (ν…ŒμŠ€νŠΈμš©)
export FASTMCP_TRANSPORT=http
export FASTMCP_HOST=127.0.0.1
export FASTMCP_PORT=8000
python -m src.main

2. νŒ¨ν‚€μ§€ μ„€μΉ˜

# νŒ¨ν‚€μ§€ μ„€μΉ˜
pip install .

# μ½˜μ†” 슀크립트둜 μ‹€ν–‰
naramarket-mcp

# SSE λͺ¨λ“œ 지원 (선택사항)
pip install .[sse]
export FASTMCP_TRANSPORT=sse
naramarket-mcp

3. Docker μ‹€ν–‰

# 이미지 λΉŒλ“œ
docker build -t naramarket-mcp .

# μ»¨ν…Œμ΄λ„ˆ μ‹€ν–‰
docker run --rm \
  -e NARAMARKET_SERVICE_KEY=your-api-key \
  -p 8000:8000 \
  naramarket-mcp

🏭 Smithery.ai ν΄λΌμš°λ“œ 배포

λΉ λ₯Έ 배포

  1. Smithery CLI μ„€μΉ˜

    npm install -g @smithery/cli
    
  2. API ν‚€ μ€€λΉ„

    • data.go.krμ—μ„œ λ‚˜λΌμž₯ν„° API ν‚€ λ°œκΈ‰
    • Smithery.ai λŒ€μ‹œλ³΄λ“œμ—μ„œ NARAMARKET_SERVICE_KEY μ‹œν¬λ¦Ώ μ„€μ •
  3. 배포 μ‹€ν–‰

    ./deploy.sh
    # λ˜λŠ” μˆ˜λ™: smithery deploy
    

배포 ꡬ성

  • βœ… smithery.yaml: 메인 배포 μ„€μ •
  • βœ… Dockerfile: ν”„λ‘œλ•μ…˜ μ΅œμ ν™” μ»¨ν…Œμ΄λ„ˆ
  • βœ… .env.example: ν™˜κ²½λ³€μˆ˜ ν…œν”Œλ¦Ώ
  • βœ… deploy.sh: μžλ™ 배포 슀크립트

μ£Όμš” 배포 νŠΉμ§•

  • HTTP Transport: Smithery.ai의 HTTP 기반 MCP ν”„λ‘œν† μ½œ
  • 동적 포트: PORT ν™˜κ²½λ³€μˆ˜ μžλ™ 감지
  • ν—¬μŠ€μ²΄ν¬: /mcp μ—”λ“œν¬μΈνŠΈ λͺ¨λ‹ˆν„°λ§
  • μ‹œν¬λ¦Ώ 관리: ν™˜κ²½λ³€μˆ˜ 기반 API ν‚€ μ„€μ •
  • μ˜€ν† μŠ€μΌ€μΌλ§: λ‘œλ“œμ— λ”°λ₯Έ 1-10 μΈμŠ€ν„΄μŠ€ μžλ™ ν™•μž₯

MCP μ—”λ“œν¬μΈνŠΈ

배포 μ™„λ£Œ ν›„ λ‹€μŒ μ—”λ“œν¬μΈνŠΈ μ‚¬μš© κ°€λŠ₯:

  • GET /mcp - ν—¬μŠ€μ²΄ν¬ 및 μ„œλ²„ 정보
  • POST /mcp - MCP 도ꡬ 호좜
  • DELETE /mcp - 리셋/정리 μž‘μ—…

🌐 API μ‚¬μš© μ˜ˆμ‹œ

λ‚˜λΌμž₯ν„° μƒν’ˆ λͺ©λ‘ 쑰회

{
  "method": "tools/call",
  "params": {
    "name": "crawl_list",
    "arguments": {
      "category": "λ°μŠ€ν¬ν†±μ»΄ν“¨ν„°",
      "page_no": 1,
      "num_rows": 50,
      "days_back": 30
    }
  }
}

G2B μž…μ°°κ³΅κ³  정보 쑰회

{
  "method": "tools/call",
  "params": {
    "name": "get_bid_announcement_info",
    "arguments": {
      "num_rows": 20,
      "page_no": 1,
      "start_date": "20240101",
      "end_date": "20240131"
    }
  }
}

λŒ€λŸ‰ 데이터 CSV μˆ˜μ§‘ (λΆ„ν•  처리)

{
  "method": "tools/call",
  "params": {
    "name": "crawl_to_csv",
    "arguments": {
      "category": "λ…ΈνŠΈλΆμ»΄ν“¨ν„°",
      "output_csv": "laptops_2024.csv",
      "total_days": 365,
      "window_days": 30,
      "max_windows_per_call": 2,
      "append": false,
      "explode_attributes": true
    }
  }
}

βš™οΈ ν™˜κ²½ λ³€μˆ˜ μ„€μ •

ν•„μˆ˜ ν™˜κ²½ λ³€μˆ˜

# λ‚˜λΌμž₯ν„° API μ„œλΉ„μŠ€ ν‚€ (ν•„μˆ˜)
NARAMARKET_SERVICE_KEY=your-service-key-here

선택 ν™˜κ²½ λ³€μˆ˜

# FastMCP Transport λͺ¨λ“œ
FASTMCP_TRANSPORT=stdio  # stdio, sse, http

# HTTP λͺ¨λ“œ μ„€μ • (FASTMCP_TRANSPORT=http일 λ•Œ)
FASTMCP_HOST=127.0.0.1
FASTMCP_PORT=8000

# API ν™˜κ²½ μ„€μ •
API_ENVIRONMENT=production  # production, development

# λ‘œκΉ… 레벨
LOG_LEVEL=INFO

πŸ” λŒ€μš©λŸ‰ 데이터 μˆ˜μ§‘ κ°€μ΄λ“œ

μœˆλ„μš° λΆ„ν•  μ „λž΅

λŒ€λŸ‰ 데이터 μˆ˜μ§‘ μ‹œ λ©”λͺ¨λ¦¬ νš¨μœ¨μ„±κ³Ό μž¬μ‹œμž‘ κ°€λŠ₯성을 μœ„ν•΄ μœˆλ„μš° 뢄할을 μ‚¬μš©ν•©λ‹ˆλ‹€.

{
  "method": "tools/call",
  "params": {
    "name": "crawl_to_csv",
    "arguments": {
      "category": "λ°μŠ€ν¬ν†±μ»΄ν“¨ν„°",
      "output_csv": "desktop_full.csv",
      "total_days": 365,
      "window_days": 30,
      "max_windows_per_call": 2,
      "max_runtime_sec": 1800,
      "append": false
    }
  }
}

이어받기 μ‹€ν–‰

{
  "method": "tools/call",
  "params": {
    "name": "crawl_to_csv",
    "arguments": {
      "category": "λ°μŠ€ν¬ν†±μ»΄ν“¨ν„°",
      "output_csv": "desktop_full.csv",
      "total_days": 300,
      "anchor_end_date": "20240301",
      "window_days": 30,
      "max_windows_per_call": 2,
      "append": true
    }
  }
}

μ£Όμš” νŒŒλΌλ―Έν„° μ„€λͺ…

νŒŒλΌλ―Έν„° μ„€λͺ… κΈ°λ³Έκ°’
total_days μˆ˜μ§‘ν•  총 일수 (μ—­μˆœ) 365
window_days μœˆλ„μš° 크기 (일) 30
anchor_end_date μ‹œμž‘ κΈ°μ€€ λ‚ μ§œ (YYYYMMDD) 였늘
max_windows_per_call ν˜ΈμΆœλ‹Ή μ΅œλŒ€ μœˆλ„μš° 수 0 (λ¬΄μ œν•œ)
max_runtime_sec μ΅œλŒ€ μ‹€ν–‰ μ‹œκ°„ (초) None
append κΈ°μ‘΄ νŒŒμΌμ— μΆ”κ°€ μ—¬λΆ€ false
explode_attributes 속성 컬럼 펼치기 false

πŸ“ ν”„λ‘œμ νŠΈ ꡬ쑰

naramarketmcp/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ main.py              # FastMCP μ„œλ²„ μ§„μž…μ 
β”‚   β”œβ”€β”€ core/                # 핡심 λͺ¨λ“ˆ
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   β”œβ”€β”€ config.py        # μ„€μ • 관리
β”‚   β”‚   └── models.py        # 데이터 λͺ¨λΈ
β”‚   β”œβ”€β”€ api/                 # API ν΄λΌμ΄μ–ΈνŠΈ
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   └── client.py        # API 호좜 둜직
β”‚   β”œβ”€β”€ services/            # λΉ„μ¦ˆλ‹ˆμŠ€ 둜직
β”‚   β”‚   β”œβ”€β”€ __init__.py
β”‚   β”‚   └── data_service.py  # 데이터 처리 μ„œλΉ„μŠ€
β”‚   └── tools/               # MCP 도ꡬ
β”‚       β”œβ”€β”€ __init__.py
β”‚       β”œβ”€β”€ base.py          # κΈ°λ³Έ 도ꡬ 클래슀
β”‚       β”œβ”€β”€ naramarket.py    # λ‚˜λΌμž₯ν„° 도ꡬ
β”‚       └── openapi_tools.py # G2B OpenAPI 도ꡬ
β”œβ”€β”€ tests/                   # ν…ŒμŠ€νŠΈ μ½”λ“œ
β”œβ”€β”€ deployments/             # 배포 μ„€μ •
β”œβ”€β”€ .env.example             # ν™˜κ²½λ³€μˆ˜ ν…œν”Œλ¦Ώ
β”œβ”€β”€ .gitignore
β”œβ”€β”€ Dockerfile               # μ»¨ν…Œμ΄λ„ˆ 이미지
β”œβ”€β”€ deploy.sh                # 배포 슀크립트
β”œβ”€β”€ pyproject.toml           # ν”„λ‘œμ νŠΈ μ„€μ •
β”œβ”€β”€ requirements.txt         # μ˜μ‘΄μ„±
β”œβ”€β”€ smithery.yaml            # Smithery 배포 μ„€μ •
└── README.md                # ν”„λ‘œμ νŠΈ λ¬Έμ„œ

πŸ”§ 문제 ν•΄κ²°

일반적인 문제

1. API ν‚€ 였λ₯˜

Error: Missing or invalid NARAMARKET_SERVICE_KEY

해결방법: .env 파일 λ˜λŠ” ν™˜κ²½λ³€μˆ˜μ— μ˜¬λ°”λ₯Έ API ν‚€ μ„€μ •

2. λ©”λͺ¨λ¦¬ λΆ€μ‘±

MemoryError: Unable to allocate array

해결방법: window_days 쀄이기, max_windows_per_call κ°μ†Œ

3. λ„€νŠΈμ›Œν¬ νƒ€μž„μ•„μ›ƒ

requests.exceptions.Timeout

해결방법: max_runtime_sec μ„€μ •, μž¬μ‹œμž‘ κ°€λŠ₯ν•œ 배치둜 λΆ„ν• 

둜그 뢄석

# 둜그 레벨 μ‘°μ •
export LOG_LEVEL=DEBUG

# μ‹€ν–‰ 둜그 확인
python -m src.main 2>&1 | tee server.log

μ„±λŠ₯ μ΅œμ ν™”

  • λ©”λͺ¨λ¦¬: 큰 데이터셋은 CSV 직접 μ €μž₯ μ‚¬μš©
  • λ„€νŠΈμ›Œν¬: μ μ ˆν•œ window_days μ„€μ •μœΌλ‘œ 배치 크기 μ‘°μ •
  • λ””μŠ€ν¬: SSD μ‚¬μš© ꢌμž₯, μΆ©λΆ„ν•œ μ—¬μœ  곡간 확보

🀝 κΈ°μ—¬ 방법

개발 ν™˜κ²½ μ„€μ •

# 개발 μ˜μ‘΄μ„± μ„€μΉ˜
pip install .[dev]

# ν…ŒμŠ€νŠΈ μ‹€ν–‰
pytest tests/

# νƒ€μž… 체크
mypy src/

κΈ°μ—¬ κ°€μ΄λ“œλΌμΈ

  1. 이슈 생성: 버그 리포트 λ˜λŠ” κΈ°λŠ₯ μš”μ²­
  2. 포크 & 브랜치: feature/your-feature-name 브랜치 생성
  3. 개발: ν…ŒμŠ€νŠΈ μ½”λ“œμ™€ ν•¨κ»˜ κ΅¬ν˜„
  4. ν…ŒμŠ€νŠΈ: λͺ¨λ“  ν…ŒμŠ€νŠΈ 톡과 확인
  5. Pull Request: μƒμ„Έν•œ μ„€λͺ…κ³Ό ν•¨κ»˜ PR 생성

μ½”λ“œ μŠ€νƒ€μΌ

  • ν¬λ§€νŒ…: Black μ‚¬μš©
  • λ¦°νŒ…: Flake8 μ€€μˆ˜
  • νƒ€μž…: Type hints ν•„μˆ˜
  • λ¬Έμ„œ: Docstring μž‘μ„±

πŸ“„ λΌμ΄μ„ μŠ€

Apache License 2.0 - μžμ„Έν•œ λ‚΄μš©μ€ LICENSE 파일 μ°Έμ‘°

πŸ”— κ΄€λ ¨ 링크

  • Smithery.ai: https://smithery.ai
  • FastMCP: https://github.com/jlowin/fastmcp
  • λ‚˜λΌμž₯ν„° Open API: https://www.data.go.kr/
  • G2B μ „μžμ‘°λ‹¬μ‹œμŠ€ν…œ: http://www.g2b.go.kr/

πŸ“Š λ³€κ²½ 이λ ₯

v0.1.0 (Latest)

  • βœ… FastMCP 2.0 μ—…κ·Έλ ˆμ΄λ“œ
  • βœ… Smithery.ai 배포 지원 μΆ”κ°€
  • βœ… G2B OpenAPI 5개 도ꡬ 톡합
  • βœ… HTTP Transport 지원
  • βœ… ν”„λ‘œλ•μ…˜ μ€€λΉ„ μ™„λ£Œ

πŸ’‘ λ¬Έμ˜μ‚¬ν•­μ΄λ‚˜ 기술 지원이 ν•„μš”ν•˜μ‹œλ©΄ 이슈λ₯Ό 생성해 μ£Όμ„Έμš”.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured