Skip to content

Commit 3e1257c

Browse files
authored
chore: MCP 도입할 때 필요한 npx 패키지 적용 (#367)
* chore: MCP 도입할 때 필요한 npx 패키지 적용 * chore: 부팅 시 외부 프로세스 미실행 (요청 시 연결)
1 parent b508652 commit 3e1257c

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

cs25-service/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ LABEL type="application" module="cs25-service"
2020
# 작업 디렉토리
2121
WORKDIR /apps
2222

23+
# Node.js + npm 설치 후, MCP 서버 전역 설치
24+
RUN apt-get update && apt-get install -y curl ca-certificates gnupg \
25+
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
26+
&& apt-get install -y nodejs \
27+
&& npm install -g @modelcontextprotocol/server-brave-search \
28+
&& node -v && npm -v && which server-brave-search \
29+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
30+
2331
# jar 복사
2432
COPY --from=builder /build/cs25-service/build/libs/*.jar app.jar
2533

cs25-service/src/main/resources/application.properties

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,9 @@ spring.ai.mcp.client.type=SYNC
6868
spring.ai.mcp.client.request-timeout=30s
6969
spring.ai.mcp.client.root-change-notification=false
7070
# STDIO Connect: Brave Search
71-
spring.ai.mcp.client.stdio.connections.brave.command=npx
72-
spring.ai.mcp.client.stdio.connections.brave.args[0]=-y
73-
spring.ai.mcp.client.stdio.connections.brave.args[1]=@modelcontextprotocol/server-brave-search
71+
spring.ai.mcp.client.stdio.connections.brave.command=server-brave-search
7472
spring.ai.mcp.client.stdio.connections.brave.env.BRAVE_API_KEY=${BRAVE_API_KEY}
73+
spring.ai.mcp.client.initialized=false
7574
#MAIL
7675
spring.mail.host=smtp.gmail.com
7776
spring.mail.port=587

0 commit comments

Comments
 (0)