MCP-CRUD-Interview-Question
LocalAbout MCP-CRUD-Interview-Question
MCP-CRUD-Interview-Question is a Spring Boot and Spring AI server for managing interview-question records in MySQL. It supports category filtering and CRUD operations through MCP tools for agents and AI models.
Key features
- 01Create, retrieve, update, and delete questions
- 02Filter questions by category
- 03Persist records in MySQL
- 04Expose operations as Spring AI tools
Use cases
- 01Retrieving questions for a selected category
- 02Maintaining an interview-question database
- 03Connecting agents to question records
MCP support
The MCP server exposes tools to retrieve all questions or filter by category, save or update a question, and delete questions. It communicates via STDIO according to the project tagline.
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 READMEMCP-CRUD-Interview-Question
A Spring Boot-based Model Control Protocol (MCP) server designed to manage a database of interview questions. This project leverages Spring AI's MCP capabilities to provide tool-based access to interview questions data.
Overview
This project serves as an MCP (Model Control Protocol) server built with Spring Boot and Spring AI. It provides a service for managing interview questions through tool-based interactions, making it easy to retrieve, create, update, and delete interview questions from a database.
Features
- Interview Question Management: Create, read, update, and delete interview questions
- Category-based Filtering: Retrieve questions by specific categories
- Tool-based API: Spring AI's tool annotations for easy integration
- MySQL Database Integration: Persistence for interview questions
Project Structure
src/
├── main/
│ ├── java/
│ │ └── io/
│ │ └── michaeljgkopp/
│ │ └── github/
│ │ ├── dao/
│ │ │ └── InterviewQuestionRepository.java
│ │ ├── entity/
│ │ │ └── InterviewQuestion.java
│ │ ├── service/
│ │ │ └── InterviewQuestionService.java
│ │ └── SpringMcpServerApplication.java
│ └── resources/
│ ├── application.properties
│ └── create_db.sql
Requirements
- Java 24
- MySQL Database
- Maven 3.6+ or compatible build tool
Installation
Clone the Repository
git clone https://github.com/MichaelJGKopp/MCP-CRUD-Interview-Question.git
cd MCP-CRUD-Interview-Question
Database Setup
- Create the required MySQL database:
CREATE DATABASE IF NOT EXISTS mcp_interview_questions_db;
- Configure a MySQL user with appropriate permissions (or use existing credentials with proper access)
Configuration
The application is configured via application.properties. You can customize these settings or override them using environment variables:
spring.application.name=interview-questions-mcp-server
spring.main.web-application-type=none
spring.ai.mcp.server.name=interview-questions-mcp-server
spring.ai.mcp.server.version=0.0.1
server.port=${SERVER_PORT:3001}
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=${DB_URL:jdbc:mysql://localhost:3306/mcp_interview_questions_db}
spring.datasource.username=${DB_USERNAME:springstudent}
spring.datasource.password=${DB_PASSWORD:springstudent}
Build the Project
mvn clean package
Run the Server
java -jar target/spring-mcp-server-0.0.1-SNAPSHOT.jar
Or with custom environment variables:
SERVER_PORT=3002 DB_USERNAME=custom_user DB_PASSWORD=secure_password java -jar target/spring-mcp-server-0.0.1-SNAPSHOT.jar
Available Tools
The MCP server exposes the following tools for interaction:
| Tool Name | Description |
|---|---|
iqs_get_interview_questions_by_category | Retrieves interview questions filtered by a specific category |
iqs_get_interview_questions_all | Retrieves all interview questions in the database |
iqs_save_interview_question | Creates a new interview question or updates an existing one |
iqs_delete_interview_question_by_id | Deletes an interview question by its ID |
iqs_delete_all_interview_questions | Deletes all interview questions (use with caution) |
Interview Question Model
Each interview question consists of the following fields:
| Field | Description |
|---|---|
| id | Unique identifier (auto-generated) |
| difficulty | Difficulty level of the question (limited to 10 characters) |
| category | Category of the question (e.g., "Java", "SQL", "Spring") |
| title | Brief title for the question |
| question | The interview question text (limited to 1000 characters) |
| answer | The answer or solution (limited to 10000 characters) |
Integration with AI Models
This MCP server is designed to work with Spring AI, allowing AI models to interact with the interview questions database using the provided tools. The server does not expose a traditional web interface as indicated by spring.main.web-application-type=none in the configuration.
Development
Adding New Categories
The system supports any string-based category. To add questions in a new category, simply use that category name when creating questions.
Extending the Model
To extend the InterviewQuestion model with additional fields:
- Update the
InterviewQuestion.javaentity class - Add appropriate getters and setters
- Restart the application (the database schema will update automatically due to
spring.jpa.hibernate.ddl-auto=update)
License
This project is open source. For detailed license information, please contact the repository owner.
Contact
For questions or support, please contact Michael J.G. Kopp.
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.