spring-mcp-remote-sse
spring-mcp-remote-sseは、Springフレームワークを使用したリアルタイムデータストリーミングを提供するライブラリです。特に、Server-Sent Events (SSE)を利用して、クライアントに対して非同期でデータを送信する機能を持っています。これにより、Webアプリケーションにおいてリアルタイムの更新が可能となり、ユーザー体験を向上させます。
GitHubスター
1
ユーザー評価
未評価
お気に入り
0
閲覧数
15
フォーク
0
イシュー
0
Spring MCP Server Demo
A simple demonstration of how to build a remote Model Context Protocol (MCP) server using Spring Boot and Java. This project showcases how to implement and expose tools that can be called by AI models through the MCP protocol.
What's Inside
- Complete MCP server implementation using Spring AI
- Tool registration and callback handling
- RAG search service as a practical example tool
- Docker support for easy deployment
Quick Start
# Run with Maven
mvn spring-boot:run
# Or build and run the JAR
mvn clean package
java -jar target/mcpserver-0.0.1-SNAPSHOT.jar
The server will start at http://localhost:8080
🧪 Testing with MCP Inspector
The MCP Inspector is a tool that allows you to test your MCP server without needing to integrate with an LLM.
# Run the Inspector with your MCP server
npx @modelcontextprotocol/inspector
This will start the MCP Inspector web interface (typically at http://127.0.0.1:6274)
Docker Support
Want to run this in Docker? No problem!
# Build and package everything in one go
./docker-build.sh
# Run the container
docker run -p 8080:8080 mcp-server:latest
That's it! Your MCP server will be available at http://localhost:8080.
Available Tools
Search
Searches through documentation files in the RAG directory.
Parameters:
query
: The search term
Returns: A list of relevant text snippets from the documentation
How It Works
This demo uses Spring AI's MCP server capabilities to expose tools that can be called by AI models. The server implements the Model Context Protocol, allowing AI models to discover and use the tools provided by this server.
The RAG search tool demonstrates how to implement a practical tool that can enhance an AI model's capabilities by providing access to specific information sources.