spring-mcp-example
This project demonstrates a Spring Boot + Spring AI MCP server that exposes a tool over the Model Context Protocol (MCP). It includes a Docker Compose setup for running the app and the MCP Inspector together.
Power your agent
การติดตั้งจากผู้เผยแพร่ ไม่ใช่เอนด์พอยต์ของ PlugMCP
URL แบบรีโมตหรือคำสั่งบนเครื่องของคุณ? การติดตั้งสองแบบต่างกันอย่างไร
รันบน PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
เปิดจากผู้เผยแพร่
This project demonstrates a Spring Boot + Spring AI MCP server that exposes a tool over the Model Context Protocol (MCP). It includes a Docker Compose setup for running the app and the MCP Inspector together.
This project demonstrates a Spring Boot + Spring AI MCP server that exposes a tool over the Model Context Protocol (MCP). It includes a Docker Compose setup for running the app and the MCP Inspector together.
Start the backend and inspector together:
task all
The required Spring AI and MCP dependencies are declared in:
Relevant section:
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
</dependency>
This is the dependency that enables the Spring MCP server support used by the application.
The sample tool is defined here:
Example implementation:
@Service
public class DataProductTool {
@Autowired
private DataProductService dataProductService;
@McpTool(description = "Get information about a data product by its ID")
public String getDataProductInfo(
@McpToolParam(description = "The ID of the data product") String dataProductId
) {
return String.format("Data Product Info: %s", dataProductService.getDataProduct(dataProductId));
}
}
This is the core of the MCP server: the method is exposed as an MCP tool and can be discovered and invoked by an MCP client such as the inspector.
Open the Swagger UI here to explore the REST API:
http://localhost:8080/swagger-ui/index.html#
Open the MCP Inspector UI here:
http://localhost:6274
The Spring MCP server is exposed at:
http://localhost:8080/mcp
When you open the inspector, connect to that URL.
On macOS with Docker Desktop, the Compose default is set to use host.docker.internal, which resolves correctly from the container to the host machine.
If you are running Docker on Linux, use the internal Compose service name instead:
http://backend:8080/mcp
If you prefer to start the inspector outside Docker:
npx @modelcontextprotocol/inspector@latest
Then point it to:
http://localhost:8080/mcp
This project demonstrates a Spring Boot + Spring AI MCP server that exposes a tool over the Model Context Protocol (MCP). It includes a Docker Compose setup for running the app and the MCP Inspector t
ภาพรวม
This project demonstrates a Spring Boot + Spring AI MCP server that exposes a tool over the Model Context Protocol (MCP). It includes a Docker Compose setup for running the app and the MCP Inspector together.
เครื่องมือ
ยังไม่มีรายการเครื่องมือ เซิร์ฟเวอร์แบบรีโมตจะได้รายการหลังการตรวจสอบสถานะครั้งแรก
FAQ
คัดลอกคอนฟิก stdio สำหรับ Cursor, Claude Desktop, Claude Code หรือ VS Code ได้ในหน้านี้ คอนฟิกนี้ใช้การติดตั้งของผู้เผยแพร่ ไม่ใช่พร็อกซีของ PlugMCP
ระเบียนนี้ไม่ได้ระบุตัวแปรสภาพแวดล้อมที่จำเป็น
Spring MCP Example ทำงานแบบโลคัลผ่าน stdio
ตรวจสอบล่าสุดเมื่อ 2026-10-28 This project demonstrates a Spring Boot + Spring AI MCP server that exposes a tool over the Model Context Protocol (MCP). It includes a Docker Compose setup for running the app and the MCP Inspector together.