MCP Server Demo 项目文档
@liqingdong
关于 MCP Server Demo 项目文档
一个基于Spring Boot 的MCP(Model Control Protocol)服务示例项目
基本信息
配置
工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is MCP Server Demo 项目文档?
MCP Server Demo 项目文档 is a Spring Boot 3.4.4 example project that implements the Model Context Protocol (MCP) for exposing intelligent services. It integrates the Spring AI tool chain and provides templates for numeric operations and weather query services. This project is intended for developers learning or prototyping MCP-based tool servers.
How to use MCP Server Demo 项目文档?
Clone the repository from GitHub and build with mvn clean install. Run the JAR file using either STDIO mode (-Dspring.ai.mcp.server.stdio=true) or SSE mode (default on http://localhost:8081/sse). Connect a compatible MCP client, such as Cherry Studio, to invoke the exposed tools.
Key features of MCP Server Demo 项目文档
- NumberService: even/odd checking and prime detection (extensible).
- WeatherService: mock weather data (random numbers, requires real API integration).
- Services exposed as MCP tools via
@Tooland@ToolParamannotations. - Supports both STDIO and SSE transport protocols.
- Built with Spring Boot 3.4.4 and MCP version 0.7.0.
- Includes unit test classes for application context and MCP protocol testing.
Use cases of MCP Server Demo 项目文档
- Learning how to build an MCP server with Spring AI.
- Prototyping numeric validation tools for AI workflows.
- Demonstrating weather data integration patterns in an MCP environment.
- Testing STDIO and SSE transport modes with MCP clients.
FAQ from MCP Server Demo 项目文档
What is MCP in this project?
MCP stands for Model Control Protocol, a standard for exposing tools and services to AI models. This project demonstrates a Spring Boot implementation of MCP.
What are the runtime requirements?
JDK 17+, Maven 3.8+, and an IDE (IntelliJ IDEA recommended) are required to build and run the server.
Does the weather service return real data?
No. The current weather service uses random number generation as placeholder data. A real implementation would require integration with a third-party API such as OpenWeatherMap.
What transport protocols are supported?
The server supports two modes: STDIO (standard input/output) and SSE (Server-Sent Events). STDIO is enabled with the -Dspring.ai.mcp.server.stdio=true flag; SSE runs on port 8081 by default.
How is the server tested?
The project includes McpApplicationTest for context loading, and SSEMcpTest/StdioMcpTest for protocol-specific MCP service tests.
其他 分类下的更多 MCP 服务器
MCP Go 🚀
mark3labsA Go implementation of the Model Context Protocol (MCP), enabling seamless integration between LLM applications and external data sources and tools.

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
Awesome Mcp Servers
punkpeyeA collection of MCP servers.
Core Philosophy: Connect, Unify, Respond
mindsdbDelegate anything. It comes back done.
🪟 Windows-MCP
CursorTouchMCP Server for Computer Use in Windows
评论