MCP Client SSE
@Shaamam
Spike Project on building MCP Clients to connect with MCP Servers to access the tools exposed by the servers
概要
What is MCP Client SSE?
MCP Client SSE is a Spring Boot-based Java application that provides a synchronous client implementation for interacting with MCP Servers and tools. It integrates with the Model Context Protocol (MCP) and the OpenAI API, aimed at developers building AI-powered applications with Spring Boot.
How to use MCP Client SSE?
Configure the application.properties file with an OpenAI API key, MCP client settings (server URL, timeouts, etc.), and enable tool callbacks. Build and run the application using Gradle commands (./gradlew build and ./gradlew bootRun). The application starts on port 8080 by default.
Key features of MCP Client SSE
- Synchronous MCP client integration.
- Configurable tool callback provider.
- OpenAI API integration.
- Customizable application properties.
- Spring Boot framework support.
- SSE (Server-Sent Events) based MCP connection.
Use cases of MCP Client SSE
- Building a Java-based client that calls MCP tools via SSE.
- Integrating an OpenAI model with MCP server capabilities.
- Prototyping or deploying synchronous AI tool workflows in Spring Boot applications.
FAQ from MCP Client SSE
What dependencies does MCP Client SSE require?
Spring Boot, the MCP Client Library, and the OpenAI API are required.
How is the MCP server connection configured?
In application.properties, set spring.ai.mcp.client.sse.connections.server1.url=http://localhost:8082 (or your server URL) and enable the MCP client with spring.ai.mcp.client.enabled=true.
Where does configuration data live?
Configuration is stored in the src/main/resources/application.properties file and loaded at runtime by Spring Boot.
What transport/auth does MCP Client SSE use?
It uses SSE (Server-Sent Events) for transport and requires an OpenAI API key (spring.ai.openai.api-key) for OpenAI integration.
Are there any known limitations?
The README mentions only synchronous (SYNC) client type and a configurable request timeout (default 30s). No other limits are documented.