The Model Context Protocol (MCP) client application utilizes Spring AI and Anthropic Claude models (Or OpenAI). It integrates with MCP protocol-supported servers to enable AI-powered chat interactions.
The MCP Client is a key component in the Model Context Protocol (MCP) architecture, responsible for establishing and managing connections with MCP servers. It implements the client-side of the protocol, handling:
- Protocol version negotiation to ensure compatibility with servers
- Capability negotiation to determine available features
- Message transport and JSON-RPC communication
- Tool discovery and execution
- Resource access and management
- Prompt system interactions
- Optional features like roots management and sampling support
- Supports openai and anthropic models
Java 17+
Maven or Gradle
Docker (Optional)
Anthropic API key Or OpenAI API key
- Anthropic API key from the Anthropic Console.
- OpenAI API key from the OpenAI Console.
git clone <repo-url>
cd spring-ai-mcp-client
The MCP server information must be added to the mcp-servers.json file as follows.