Basic information
About 简单 MCP Server 示例 (Java + Spring Boot + Spring AI)
简单的 MCP Server 示例项目
简单 MCP Server 示例 (Java + Spring Boot + Spring AI) is a MCP server in the Other category listed in the AddMCP.net directory, published by oneinstepGO. Supported transport: stdio. Runtime: java. Source code is hosted on github.com.
Setup
claude mcp add mcp-server-demo-oneinstepgo --transport http http://localhost:8080/sse
[mcp_servers.mcp-server-demo-oneinstepgo] url = "http://localhost:8080/sse"
{
"mcpServers": {
"mcp-server-demo-oneinstepgo": {
"url": "http://localhost:8080/sse"
}
}
}
{
"servers": {
"mcp-server-demo-oneinstepgo": {
"type": "http",
"url": "http://localhost:8080/sse"
}
}
}
简单 MCP Server 示例 (Java + Spring Boot + Spring AI) config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-serve-demo": {
"type": "http",
"url": "http://localhost:8080/sse"
}
}
}
简单 MCP Server 示例 (Java + Spring Boot + Spring AI) tools
Tool list not available yet
This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is 简单 MCP Server 示例 (Java + Spring Boot + Spring AI)?
这是一个基于 Java 21、Spring Boot 3.3.12 和 Spring AI 构建的 MCP(模型上下文协议)服务器示例,使用 SSE 协议通信,旨在为开发者展示如何在 Java/Spring Boot 环境下搭建 MCP 服务器。它提供了天气查询、简单实用工具和 JSON 转换等可调用的工具。
How to use 简单 MCP Server 示例 (Java + Spring Boot + Spring AI)?
使用 Maven 命令 mvn clean package spring-boot:run 编译并启动服务器。服务器端点位于 http://localhost:8080/sse,支持 MCP 协议的客户端(如 Cursor 编辑器)可通过配置 .cursor/mcp.json 文件连接并使用其提供的工具。
Key features of 简单 MCP Server 示例 (Java + Spring Boot + Spring AI)
- 基于 Spring Boot + Spring AI 快速构建 MCP 服务器
- 使用 SSE 协议进行通信
- 提供天气预报、回声、数学运算、时间戳工具
- 支持将 JSON 转换为 Java 类代码及示例输出
- 工具定义自动通过 Java 类型注解生成
- 可与 Cursor 等 MCP 客户端直接集成
Use cases of 简单 MCP Server 示例 (Java + Spring Boot + Spring AI)
- 在支持 MCP 的 IDE(如 Cursor)中通过自然语言查询指定位置的天气预报
- 通过简单回声或数学工具快速验证 MCP 客户端与服务器的连接
- 利用 JsonTool 将 JSON 数据结构转换为 Java 类定义或生成示例 JSON
- 作为学习示例,帮助开发者理解 MCP 服务器在 Java 环境下的实现方式
Frequently asked questions
1 如何启动这个 MCP 服务器?
在项目根目录执行 mvn clean package spring-boot:run 即可编译并运行,
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In