
cagritrk/spring-ai-mcp-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
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. 🤖
概要
This is a 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. The project demonstrates: - Implementation of a PersonService with CRUD operations - In-memory data storage for Person entities - Spring MCP Tools annotations and required code to create an MCP Server - : Delete a person record by ID from the in-memory store. : id (integer) - : Search for persons by job title in the in-memory store. : jobTitleQuery (string) - : Filter persons by sex (case-insensitive). : sex (string) - : Filter persons by age. : age (integer) - : Update an existing person record by ID in the in-memory store. : id (integer), updatedPersonData (object) - : Create a new person record in the in-memory store. : personData (object)
README
以下は原文 README の抜粋です。原文を見る。
Spring AI MCP Server Example
This is a 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.
Project Overview
The project demonstrates:
- Implementation of a PersonService with CRUD operations
- In-memory data storage for Person entities
- Spring MCP Tools annotations and required code to create an MCP Server
Technologies
- Java 24
- Spring Boot 3.4.4
- Spring AI 1.0.0-M6
How to Run
- Build the project:
mvn clean install
- Start the MCP server:
java -jar target/spring-ai-mcp-0.0.1-SNAPSHOT.jar
MCP Server Configuration
{
"mcpServers": {
"cagritrk-inmemory-data-mcp-server": {
"command": "java",
"args": [
"-jar",
"\\spring-ai-mcp\\target\\spring-ai-mcp-0.0.1-SNAPSHOT.jar"
]
}
}
}
Tools of cagritrk-inmemory-data-mcp-server
-
ps_delete_person: Delete a person record by ID from the in-memory store.
Input:id(integer) -
ps_search_by_job_title: Search for persons by job title in the in-memory store.
Input:jobTitleQuery(string) -
ps_filter_by_sex: Filter persons by sex (case-insensitive).
Input:sex(string) -
ps_filter_by_age: Filter persons by age.
Input:age(integer) -
ps_update_person: Update an existing person record by ID in the in-memory store.
Input:id(integer),updatedPersonData(object) -
ps_create_person: Create a new person record in the in-memory store.
Input:personData(object) -
ps_get_all_persons: Retrieve all person records from the in-memory store.
Input: None -
ps_get_person_by_id: Retrieve a person record by ID from the in-memory store.
Input:id(integer)
Demo Screenshots
Create new Person
Get the list of Persons
How many male person records are there?
CSV Data
The project uses the following sample CSV data:
Index,User Id,First Name,Last Name,Sex,Email,Phone,Date of birth,Job Title
1,88F7B33d2bcf9f5,Shelby,Terrell,Male,[email protected],001-084-906-7849x73518,1945-10-26,Games developer
2,f90cD3E76f1A9b9,Phillip,Summers,Female,[email protected],214.112.6044x4913,1910-03-24,Phytotherapist
3,DbeAb8CcdfeFC2c,Kristine,Travis,Male,[email protected],277.609.7938,1992-07-02,Homeopath
4,A31Bee3c201ef58,Yesenia,Martinez,Male,[email protected],584.094.6111,2017-08-03,Market researcher
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"cagritrk-inmemory-data-mcp-server": {
"command": "java",
"args": [
"-jar",
"<YOUR_PATH>\\spring-ai-mcp\\target\\spring-ai-mcp-0.0.1-SNAPSHOT.jar"
]
}
}
}