๐
Spring MCP Server Claude Desktop Example
No description available
0 installs
Trust: 30 โ Low
Search
Ask AI about Spring MCP Server Claude Desktop Example
Powered by Claude ยท Grounded in docs
I know everything about Spring MCP Server Claude Desktop Example. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
๊ฐ์
์ด ์์ ๋ 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 ์ฌ์์
