MCP Spring Boot Toolkit
MCP Spring Boot Toolkit
MCP (Model Context Protocol) server cung cấp tools, resources và prompts hỗ trợ phát triển dự án Java Spring Boot.
Tính năng
Tools (8 tools)
Tool | Mô tả |
| Tạo JPA Entity class với Lombok annotations, audit fields ( |
| Tạo REST Controller với CRUD endpoints, pagination, validation |
| Tạo Service interface + implementation với |
| Tạo Request/Response DTOs với validation annotations + MapStruct mapper |
| Tạo Spring Data JPA Repository với custom query methods, Specification support |
| Tạo |
| Tạo |
| Phân tích |
Prompts (6 prompts)
Prompt | Mô tả |
| Review REST API controller theo best practices (HTTP conventions, validation, security, performance) |
| Phân tích stack trace và đề xuất cách fix |
| Tối ưu JPA/Hibernate query (N+1, projection, indexing, caching) |
| Audit bảo mật Spring Security config (JWT, CORS, CSRF, input validation) |
| Lên kế hoạch upgrade Spring Boot version (breaking changes, namespace migration) |
| Thiết kế kiến trúc microservice (package structure, API contracts, communication patterns) |
Resources (4 guides)
Resource | URI | Nội dung |
Project Structure |
| Cấu trúc package chuẩn cho ứng dụng Spring Boot |
Security |
| Checklist bảo mật: JWT, OAuth2, CORS, rate limiting |
Layered Architecture |
| Kiến trúc phân lớp Controller → Service → Repository |
API Design |
| Thiết kế RESTful API: versioning, pagination, error handling |
Cài đặt
# Clone hoặc copy project
cd mcp-spring-boot-toolkit
# Cài dependencies
npm install
# Build
npm run buildCách sử dụng
Cấu hình MCP Server
Thêm vào file cấu hình MCP của IDE (ví dụ .kiro/settings/mcp.json, claude_desktop_config.json, hoặc tương đương):
Production (dùng bản build):
{
"mcpServers": {
"spring-boot-toolkit": {
"command": "node",
"args": ["/đường-dẫn-tới/mcp-spring-boot-toolkit/dist/index.js"]
}
}
}Development (dùng tsx, không cần build):
{
"mcpServers": {
"spring-boot-toolkit": {
"command": "npx",
"args": ["tsx", "/đường-dẫn-tới/mcp-spring-boot-toolkit/src/index.ts"]
}
}
}Ví dụ sử dụng tools
Tạo Entity:
Tạo entity Product với fields: name (String, not null), price (BigDecimal), description (String), stock (Integer)Tạo Controller + Service + Repository cho entity:
Tạo full CRUD cho entity Order bao gồm controller, service, repository, DTOsPhân tích pom.xml:
Phân tích file pom.xml của tôi xem có vấn đề gì về dependency khôngTạo config:
Tạo application.yml cho project dùng PostgreSQL, có security, actuator, swagger, với 2 profiles dev và prodVí dụ sử dụng prompts
Review API:
Review controller UserController.java theo best practicesDebug lỗi:
Debug exception này: LazyInitializationException - could not initialize proxy...Tối ưu query:
Tối ưu query trong OrderRepository, đang bị N+1 khi load OrderItemsScripts
Script | Mô tả |
| Compile TypeScript → JavaScript (output vào |
| Chạy trực tiếp từ source bằng tsx |
| Chạy bản đã build |
Tech Stack
Runtime: Node.js
Language: TypeScript
MCP SDK:
@modelcontextprotocol/sdkValidation: Zod
Transport: stdio
Cấu trúc project
mcp-spring-boot-toolkit/
├── src/
│ ├── index.ts # Entry point - khởi tạo MCP server
│ ├── tools.ts # Đăng ký 8 tools code generation
│ ├── prompts.ts # Đăng ký 6 prompts
│ ├── resources.ts # Đăng ký 4 resources
│ └── resources/ # Markdown guides
│ ├── project-structure.md
│ ├── security-checklist.md
│ ├── layered-architecture.md
│ └── api-design.md
├── dist/ # Build output
├── package.json
├── tsconfig.json
└── README.mdLicense
MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nhuson269/mcp-spring-boot-toolkit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server