wookja-0/naver-search-mcp
If you are the rightful owner of naver-search-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This guide provides instructions for setting up a Naver Search MCP server and exposing it as an SSE endpoint on Kubernetes.
Naver Search MCP (K8s + SSE Proxy)
Author: Jung Wookjin
๋ค์ด๋ฒ ๊ฒ์/DataLab API๋ฅผ MCP ์๋ฒ๋ก ์ ๊ณตํ๊ณ , Kubernetes์์ SSE(HTTP) ์๋ํฌ์ธํธ๋ก ๋
ธ์ถํ๋ ๊ฐ์ด๋์
๋๋ค.
๋ฐฑ์๋๋ transport="sse"
๋ก /sse
์ ์ฐ๊ฒฐํฉ๋๋ค.
0) Clone
git clone https://github.com/wookja-0/naver-search-mcp.git
cd naver-search-mcp
1) ํ๊ฒฝ ๋ณ์
# ์ปจํ
์ด๋ ๋ ์ง์คํธ๋ฆฌ (์: ghcr.io/org, harbor.example.com/team ๋ฑ)
export REGISTRY="__YOUR_REGISTRY__/__YOUR_PROJECT__"
# ์ด๋ฏธ์ง ํ๊ทธ (์ํ๋ฉด ๋ณ๊ฒฝ)
export IMAGE_BASE="$REGISTRY/mcp-server:v1.0"
export IMAGE_SSE="$REGISTRY/mcp-server:sse-proxy"
2) Docker ์ด๋ฏธ์ง ๋น๋ & ํธ์
2-1. MCP ์๋ฒ ๋ฒ ์ด์ค ์ด๋ฏธ์ง (v1.0)
docker build -t "$IMAGE_BASE" . --network host
docker push "$IMAGE_BASE"
2-2. SSE ํ๋ก์ ์ด๋ฏธ์ง (stdio โ SSE ๋ณํ ํฌํจ)
Dockerfile.sse Base Image ๋ถ๋ถ์ ์ค์ IMAGE_BASE ์ด๋ฏธ์ง๋ก ๋ณ๊ฒฝ
docker build -f Dockerfile.sse -t "$IMAGE_SSE" . --network host
docker push "$IMAGE_SSE"
Dockerfile.sse
๋ ์ปจํ ์ด๋์mcp-proxy
๋ฅผ ์ค์นํ๊ณdocker-entrypoint.sh
๋ก /sse, /status๋ฅผ ๋ ธ์ถํฉ๋๋ค.
3) Kubernetes ๋ฐฐํฌ
์๋ ์์๋ ๋ค์์คํ์ด์ค๋ฅผ
dmp-poc
๋ก ๊ฐ์ ํฉ๋๋ค. ํ๊ฒฝ์ ๋ง๊ฒ ๋ณ๊ฒฝํ์ธ์.
3-1. (์ ํ) ๋ก๊ทธ PVC
kubectl -n dmp-poc apply -f manifest/pvc.yaml
3-2. ์๋ฒ์ฉ Secret (Naver Developers ํค)
kubectl -n dmp-poc create secret generic naver-api-keys --from-literal=NAVER_CLIENT_ID='<your-client-id>' --from-literal=NAVER_CLIENT_SECRET='<your-client-secret>'
3-3. Deployment / Service
kubectl -n dmp-poc apply -f manifest/deployment.yaml
kubectl -n dmp-poc apply -f manifest/service.yaml
# ๋ฐฐํฌ ํ ์ค์ ์ด๋ฏธ์ง๋ก ๊ต์ฒด(์ปจํ
์ด๋ ์ด๋ฆ: sse-proxy)
kubectl -n dmp-poc set image deploy/mcp-server sse-proxy="$IMAGE_SSE"
kubectl -n dmp-poc rollout status deploy/mcp-server
๋งค๋ํ์คํธ์ ๋ฆฌ์์ค ์ด๋ฆ์ด
mcp-server
์ธ์ง ํ์ธํ์ธ์. (Deployment/Service ๋ฉํ๋ฐ์ดํฐ name)
4) ๋์ ํ์ธ
# ์ํ ํ์ธ
kubectl -n dmp-poc port-forward svc/mcp-server 8080:8080
curl http://127.0.0.1:8080/status # JSON ์๋ต์ด๋ฉด OK
๋ก๊ทธ:
# ํ๋ก์ ํ์ค๋ก๊ทธ
kubectl -n dmp-poc logs deploy/mcp-server -f
# ์ฑ ๋ก๊ทธ(PVC ์ฌ์ฉ ์)
# ์) NFS ๊ฒฝ๋ก์ app.log ์์ฑ/์ฆ๊ฐ
5) ๋ฐฑ์๋(ํด๋ผ์ด์ธํธ) ์ฐ๊ฒฐ ์์
from langchain_mcp_adapters.client import MultiServerMCPClient
mcp_client = MultiServerMCPClient(
{
"naver-search-mcp": {
"transport": "sse",
"url": "http://mcp-server.dmp-poc.svc.cluster.local:8080/sse"
}
}
)
Smithery ์ ์ฉ ๊ฒฝ๋ก(
/@org/server/mcp?...
)๋ ์ฌ์ฉํ์ง ์์ต๋๋ค.
์๋ฒ ์ปจํ ์ด๋์๋NAVER_CLIENT_ID/SECRET
(K8s Secret)์ด ์ฃผ์ ๋์ด ๋ค์ด๋ฒ API๋ฅผ ํธ์ถํฉ๋๋ค.
6) ํธ๋ฌ๋ธ์ํ (์งง๊ฒ)
- /status 200 ์๋ โ
kubectl logs
๋ก ํ๋ก์/์ฑ ๋ก๊ทธ ํ์ธ - ์ฐ๊ฒฐ๋๋๋ฐ ๊ฒฐ๊ณผ ์์ โ
transport="sse"
& URL/sse
ํ์ธ - ๋ก๊ทธ ํ์ผ ์ ์์ โ PVC ๊ถํ(fsGroup)ยท๋ง์ดํธ ๊ฒฝ๋ก ์ ๊ฒ
License: MIT