About Spring MCP Server
An MCP server project built with Spring AI v1.0.0 for developers exploring Spring AI and the MCP protocol. The repository also includes a chat server and a tool for making MCP tool requests.
Key features
- 01MCP server built with Spring AI
- 02Includes a chat server module
- 03Tool for MCP tool requests
- 04SSE and stdio test modes
Use cases
- 01Run MCP server tests
- 02Explore MCP tool requests
- 03Check formatting and build artifacts
MCP support
The project includes an MCP server built with Spring AI and a tool for making MCP tool requests. It provides commands for running SSE and stdio tests.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMESpring MCP Server
Working against Spring AI v1.0.0
Repo
- mcp-server
- MCP server built using Spring AI
- chat-server
- Chat server built using Spring AI
- mcp-tool
- Tool to make MCP tool requests, to help understand the protocol
Setup
Ubuntu Setup
If you are working under Ubuntu install the required packages:
sudo apt-get update
sudo apt-get install -y openjdk-21-jdk gradle locales
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
Ensure Java 21 is configured as the default JDK and run gradle commands directly from the project directory.
Common Gradle commands
gradle test
gradle :mcp-app:bootJar
gradle :mcp-server:runMcpTestSse
gradle :mcp-server:runMcpTestStdio
gradle spotlessCheck # verify formatting
gradle spotlessApply # automatically format sources
Configuration
The mcp-server module reads a tool-context.home property to populate
environment information returned from ToolContextService. The default
application.yml maps this property to the TOOL_CONTEXT_HOME environment
variable falling back to HOME:
tool-context:
home: ${TOOL_CONTEXT_HOME:${HOME}}
You can override this value using Spring configuration or by exporting the
TOOL_CONTEXT_HOME variable when running the server.
License
This project is licensed under the MIT License.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.