Spring AI MCP Server Example
@cagritrk
Sample Spring AI MCP Server project built for fun and experimentation. π It implements basic CRUD operations using an in-memory data store with dummy Person data. π€
Overview
What is Spring AI MCP Server Example?
A sample Spring AI MCP Server built for fun and experimentation. It implements basic CRUD operations on dummy Person data using an in-memory data store and demonstrates Spring MCP Tools annotations.
How to use Spring AI MCP Server Example?
Build the project with mvn clean install and start the server with java -jar target/spring-ai-mcp-0.0.1-SNAPSHOT.jar. Configure the MCP client with the JSON shown in the README, pointing to the built JAR file.
Key features of Spring AI MCP Server Example
- In-memory data store for Person entities with CRUD operations
- Eight MCP tools for managing person records
- Search, filter, and update person data by various attributes
- Built with Java 24, Spring Boot 3.4.4, and Spring AI 1.0.0-M6
Use cases of Spring AI MCP Server Example
- Experimenting with Spring AI MCP Server development
- Learning how to implement MCP Tools annotations for CRUD
- Prototyping AI-assisted data management on a small dataset
FAQ from Spring AI MCP Server Example
What tools does the server expose?
It exposes eight tools: ps_create_person, ps_get_all_persons, ps_get_person_by_id, ps_update_person, ps_delete_person, ps_search_by_job_title, ps_filter_by_sex, and ps_filter_by_age.
Is the data persistent?
No. The server uses an in-memory data store with dummy Person data loaded from a CSV file. All data is lost when the server stops.
What are the runtime requirements?
Java 24 and the built JAR artifact produced by mvn clean install. There are no external database or service dependencies.
How do I configure a client to use this server?
Use the JSON configuration shown in the README, specifying "command": "java" and "args": ["-jar", "<YOUR_PATH>/spring-ai-mcp/target/spring-ai-mcp-0.0.1-SNAPSHOT.jar"].
What transports does the server support?
The README only shows a stdio-based transport configuration via a local JAR execution; no network transports are documented.