About LibraryMcp
LibraryMcp is an MCP server published by furkanozer1 in the Developer Tools category: a basic mcp server that is implemented for a basic library system.
The repository has 2 stars and 1 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.
Install
git clone https://github.com/furkanozer1/LibraryMcpThis server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.
Ask AI
Ask AI about LibraryMcp
Powered by Claude · Grounded in docs
Security checks
- ✓README presentThe repository ships documentation.
5 checks have not been run yet.
README
Book Tracker Backend
A Spring Boot application that provides both REST API and MCP (Model Context Protocol) server functionality for managing books.
Features
- REST API: Traditional HTTP endpoints for book management
- MCP Server: Protocol-compliant server for AI tool integration
- PostgreSQL Database: Persistent storage for book data
- CRUD Operations: Complete book management functionality
Prerequisites
- Java 21+
- PostgreSQL database running on localhost:5432
- Database named
library_db - PostgreSQL user:
postgreswith password:password
Running the Application
# Using Maven wrapper
./mvnw.cmd spring-boot:run
# Or if Maven is installed
mvn spring-boot:run
The application will start on http://localhost:8080
REST API Endpoints
Books Management
GET /api/books- Get all booksGET /api/books/{id}- Get book by IDPOST /api/books- Create new bookPUT /api/books/{id}- Update existing bookDELETE /api/books/{id}- Delete book
Example Book JSON
{
"title": "The Great Gatsby",
"author": "F. Scott Fitzgerald",
"isbn": "978-0-7432-7356-5"
}
MCP Server Endpoints
The MCP server provides the same functionality as REST API but follows the MCP protocol specification.
MCP Protocol Endpoints
POST /mcp/initialize- Initialize MCP server connectionPOST /mcp/tools/list- List available toolsPOST /mcp/tools/call- Execute tool calls
Available MCP Tools
- getAllBooks - Get all books from database
- getBookById - Get book by ID
- Parameters:
id(number)
- Parameters:
- createBook - Create new book
- Parameters:
title(string),author(string),isbn(string)
- Parameters:
- updateBook - Update existing book
- Parameters:
id(number),title(string),author(string),isbn(string)
- Parameters:
- deleteBook - Delete book by ID
- Parameters:
id(number)
- Parameters:
- findBookByTitle - Find books by title
- Parameters:
title(string)
- Parameters:
- findBookByAuthor - Find books by author
- Parameters:
author(string)
- Parameters:
MCP Tool Call Example
{
"name": "createBook",
"arguments": {
"title": "1984",
"author": "George Orwell",
"isbn": "978-0-452-28423-4"
}
}
Database Setup
Create PostgreSQL database:
CREATE DATABASE library_db;
The application will automatically create the book table with the following structure:
id(BIGINT, Primary Key, Auto-increment)title(VARCHAR)author(VARCHAR)isbn(VARCHAR)
Configuration
Database configuration in src/main/resources/application.properties:
spring.datasource.url=jdbc:postgresql://localhost:5432/library_db
spring.datasource.username=postgres
spring.datasource.password=password
API Documentation
When running, visit http://localhost:8080/swagger-ui.html for interactive API documentation.
Architecture
- Controller Layer: REST endpoints (
BookController) and MCP endpoints (McpServerController) - Service Layer: Business logic (
BookTools) - Repository Layer: Data access (
BookRepository) - Model Layer: Entity definitions (
Book)
Error Handling
The application includes basic error handling:
- Invalid book IDs return
null - MCP tool errors are wrapped in error responses
- Database connection issues are logged
Development
The application uses Spring Boot DevTools for hot reloading during development.
config file for claude:
{
"mcpServers": {
"booktracker": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"http://127.0.0.1:8080/mcp"
]
}
}
}
Important Notice
All related files and detailed information about MCP and MCP servers can be found under booktracker_backend directory.
README copy captured when this server was indexed; it may lag the repository. The original is authoritative.