About Spring MCP Server Claude Desktop Example
Spring MCP Server Claude Desktop Example is an MCP server published by farrar142-examples in the Search category.
The repository has 1 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/farrar142-examples/spring-mcp-server-claude-desktop-exampleThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about Spring MCP Server Claude Desktop Example
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
개요
이 예제는 Spring AI의 Model Context Protocol(MCP) 기능을 활용하여 Claude AI에서 외부 툴(도구)을 호출하는 방법을 보여줍니다.
핵심 기능
MyTool.getWeather: 임의의 날씨 정보를 반환하는 도구 메서드 McpConfig.myTools: MyTool을 ToolCallbackProvider로 등록
실행 방법
- Spring Boot 애플리케이션 실행
./gradlew bootRun - Claude Desktop 애플리케이션 실행
- Claude Desktop 설정에서 MCP 서버 추가
{ "mcpServers": { "spring-ai-mcp-weather": { "command": "npx", "args": ["-y", "mcp-remote", "http://localhost:8080/mcp", "--allow-http"] } } } - Claude Desktop 재시작
- Claude AI와 대화 시작
- 예: "오늘 서울의 날씨는 어때?"
커밋 로그
- Spring Initializr로 프로젝트 생성
- Model Context Protocol Server
- Spring Web
- Spring AI Version을 1.1.0-M1으로 변경
- 현재 1.0.3버전에서는 Streamable HTTP를 지원안함
// build.gradle.kts extra["springAiVersion"] = "1.1.0-M1" - application.yml 설정
#application.yml spring: ai: mcp: server: protocol: STREAMABLE enabled: true - Tool 작성
//MyTool.kt class MyTool { private val weathers = arrayOf("Sunny","Rainy","Cloudy") @Tool fun getWeather(location:String) = weathers.random() } - Tool을 Bean으로 등록
@Configuration class McpConfig { @Bean fun myTools(): ToolCallbackProvider = MethodToolCallbackProvider.builder().toolObjects(MyTool()).build() } - claude_desktop_config.json 수정
{ "mcpServers": { "spring-ai-mcp-weather": { "command": "npx", "args": ["-y", "mcp-remote", "http://localhost:8080/mcp", "--allow-http"] } } } - SpringBoot 실행 후 Claude Desktop 재시작
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.