mcp -bookdata
This is simple MCP server built with Spring AI
claude mcp add --transport stdio akyyev-mcp-server-bookdata /opt/homebrew/opt/openjdk@21/bin/java -jar /Users/bmac/Desktop/repos/spring-ai-mcp-server/target/spring-ai-mcp-server-0.0.1-SNAPSHOT.jar
How to use
The MCP BookData Server is a Spring Boot application that exposes an MCP-compliant REST API for managing book data. It provides endpoints to create, read, update, and delete book records, and is designed to be extended with AI-driven features in the future. The server is structured with modular components for configuration, data models, and services, making it straightforward to customize data models or add new AI-powered capabilities as needed. To interact with the server, you would typically send HTTP requests to the REST endpoints defined by the Spring controllers and integrate them into your MCP workflow.
To run the server, use the configured Java command (as shown in the mcp_config) to launch the JAR. Once running, you can connect MCP clients or tooling to the server’s endpoints to query and manage book data. If you need to customize behavior, edit application.properties to tweak settings such as server port, datasource, or any feature flags, and rebuild the JAR.
How to install
Prerequisites:
- Java 21 (or the version compatible with the build, as used by the project)
- Maven or a prebuilt Maven wrapper (mvnw) if you want to run tests or build from source
- Access to the project source tree (clone from the repository)
Install and setup steps:
-
Install Java 21 (or the required JDK) on your system.
- macOS (example with Homebrew): brew install openjdk@21 sudo ln -sfn /usr/local/opt/openjdk@21 /Library/Java/JavaVirtualMachines/openjdk-21.jdk
-
Ensure Maven wrapper or Maven is installed for building and testing:
- If using Maven wrapper: ./mvnw -v
- Otherwise: mvn -v
-
Clone the MCP server repository and navigate into it: git clone https://github.com/your-org/spring-ai-mcp-server.git cd spring-ai-mcp-server
-
Build the project to produce the runnable JAR: ./mvnw clean package -DskipTests=false
or if not using the wrapper:
mvn clean package -DskipTests=false
-
Locate the generated JAR in target/, for example: target/spring-ai-mcp-server-0.0.1-SNAPSHOT.jar
-
Start the server using the provided command configuration (from mcp_config): /opt/homebrew/opt/openjdk@21/bin/java -jar target/spring-ai-mcp-server-0.0.1-SNAPSHOT.jar
-
Verify the server is running by hitting the REST endpoints (e.g., via curl or an API client) and checking logs for startup messages.
Additional notes
Tips and notes:
- If you modify application.properties, you will need to rebuild the JAR to apply changes.
- Ensure the database or data store configuration matches your environment; the server’s properties file controls the data source settings.
- Common issues include Java version mismatches, missing environment variables, or port conflicts. Check the startup logs for indicated configuration problems.
- If you plan to extend models or services, follow the project’s modular layout (model/, service/, config/) and add your components accordingly.
- When deploying in containers or scripts, you can override the JAR path and Java command as needed; the mcp_config section defines how MCP clients should start the server.