Skip to content

[Feat] MCP 서버 골격 + 빈 도구 등록 #93

Description

@kangcheolung

📌 Description

Spring AI 1.1.x MCP Boot Starter(spring-ai-starter-mcp-server-webmvc)를 프로젝트에 연동해 Streamable HTTP 기반 MCP 서버 골격을 구성한다. 실제 검색/조회 로직 없이 빈 핸들러 3개를 등록해, @McpTool 어노테이션 스캔이 이 프로젝트 환경에서 실제로 동작하는지부터 검증한다.

✅ To-do

  • build.gradlespring-ai-bom(1.1.1 이상 — 어노테이션 스캔 버그 #4392가 수정됐다고 알려진 버전대. 정확한 수정 커밋은 미확인이므로 로컬 기동 테스트로 최종 확인) + spring-ai-starter-mcp-server-webmvc 의존성 추가
  • application.ymlspring.ai.mcp.server.name, protocol=STREAMABLE, type=SYNC, annotation-scanner.enabled=true 설정
  • domain/mcp/tool/DocGridMcpTools 생성, @McpTool/@McpToolParam으로 search_documents/get_document_detail/get_indexing_status 빈 핸들러(스텁) 3개 등록
  • SecurityConfig/mcp/** 임시 permitAll() 추가 (Issue 2에서 인증 필터로 교체 예정, TODO 주석 명시)
  • 로컬 기동 후 MCP Inspector 또는 curl로 tools/list JSON-RPC 요청 보내 도구 3개 메타데이터 정상 반환 확인

📒 기타

Spring AI 2.0은 Spring Boot 4.0 + Java 21 필수라 배제, 1.1.x 라인 채택. 관련 이슈 #4882(STATELESS+SYNC 모드에서 AOP 프록시 빈이면 도구 등록 안 되는 버그, spring-ai-starter-mcp-server-webmvc:1.1.0에서 확인됨)는 우리가 쓰는 STREAMABLE 모드엔 해당 안 될 가능성이 높지만, 이 이슈에서 실제 등록 여부를 직접 확인하는 게 목적. SecurityConfig의 permitAll은 임시 상태이며 Issue 2에서 반드시 제거.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions