springdocs-mcp
A Spring documentation MCP server that searches, retrieves, and explains Spring ecosystem content through 12 schema-exposed tools.
🔍 Search documentation —
search_spring_docsqueries Spring Boot docs by keyword, withdocType(guides/reference/api/all) and resultlimit.📦 Explore projects —
search_spring_projectsfinds Spring projects;get_spring_projectreturns full details for one (e.g.spring-boot).📘 Guides & tutorials —
get_all_spring_guideslists/filters guides;get_spring_guidefetches a guide (summary/medium/full);get_spring_tutorialgives leveled (beginner→advanced) step-by-step tutorials.📖 Reference & concepts —
get_spring_referencepulls sections from Boot, Spring AI, or Framework reference docs (with optional subsection);search_spring_conceptsexplains concepts by category (core, web, data, security, testing, production).🌐 Ecosystem-wide search —
search_spring_ecosystemspans projects, guides, docs, APIs, and Spring AI (scope: all|projects|guides|docs|api|ai).🔀 Version comparison —
compare_spring_versionsdiffs two Boot versions with focus on breaking changes, new features, or deprecations.🏆 Best practices —
get_spring_best_practicesreturns guidance by category (architecture, performance, security…) and experience level.🩺 Troubleshooting —
diagnose_spring_issuesanalyzes an error message and optional stack trace per component (startup, web, data, security, actuator, configuration).⚠️ Note: the README advertises 17 tools (e.g.
get_migration_guide,get_release_notes,get_spring_initializr,find_spring_dependency,spring_cache_stats, prompts/resources), but the schema exposes only 12 tools, and itssearch_spring_docsdocTypeenum lacks the documentedprojects/contentvalues.
Provides tools to search and retrieve Spring documentation, guides, reference materials, and tutorials for the Spring ecosystem, including Spring Boot, Spring AI, and other Spring projects.
Allows searching and retrieving Spring Boot-specific documentation, guides, version comparison, and migration details.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@springdocs-mcp Search for Spring Boot security best practices"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🍃 Spring Documentation MCP Server
🚀 Enhanced v1.4.1: 17 powerful tools with Spring AI support, intelligent caching, advanced tutorials, and comprehensive Spring ecosystem access
🌐 Universal MCP Compatibility: Works with Claude Code, Gemini CLI, VS Code, JetBrains IDEs, and all MCP-compatible clients!
🎯 Quick Start
🔌 Universal MCP Compatibility
This server works with ALL MCP-compatible clients:
Claude Desktop/Code
{
"mcpServers": {
"spring-docs": {
"command": "npx",
"args": ["@enokdev/springdocs-mcp@latest"],
"description": "Spring Documentation MCP Server with 17 powerful tools"
}
}
}Gemini CLI
mcp_servers:
spring-docs:
command: "npx"
args: ["@enokdev/springdocs-mcp@latest"]
description: "Spring Documentation Server"VS Code MCP Extension
{
"mcp.servers": {
"spring-docs": {
"command": "npx",
"args": ["@enokdev/springdocs-mcp@latest"]
}
}
}Any MCP Client (NPX)
npx @enokdev/springdocs-mcp@latestGlobal Installation (All Clients)
npm install -g @enokdev/springdocs-mcp
# Then use: springdocs-mcpDocker (Coming Soon - Docker MCP Catalog)
# Via Docker MCP CLI (when available in catalog)
docker mcp add springdocs-mcp
# Via Docker directly
docker pull mcp/springdocs-mcp:latest
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | \
docker run -i mcp/springdocs-mcp:latestBenefits of Docker distribution:
Enhanced security with cryptographic signatures and SBOMs
Isolated execution environment
Reduced token usage in Docker Desktop
Automatic security updates
Config file locations:
Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json(macOS) /%APPDATA%\Claude\claude_desktop_config.json(Windows)Claude Code:
~/.claude-code/mcp-config.jsonVS Code:
~/.vscode/mcp-settings.jsonJetBrains IDEs:
.jetbrains/mcp-config.json
Related MCP server: Snippy
✨ Features & Tools
The server exposes 17 tools.
📚 Core Documentation (8 Tools)
Tool | Purpose | Example Usage |
| Search Spring documentation ( | "Search docs for WebClient" |
| Find Spring projects | "Find projects about security" |
| Project page as markdown (paginated with | "Show the Spring Data project" |
| List the getting-started guides | "List the guides" |
| Complete guide content | "Get the rest-service guide" |
| Reference documentation for 11 projects ( | "Boot reference, web section" |
| Spring Boot / Framework / Batch migration guides and upgrade notes | "Migration guide to Boot 3.4" |
| Explore Spring concepts (optional | "Explain auto-configuration" |
🚀 Advanced Features (6 Tools)
Tool | Purpose | Example Usage |
| Search the whole ecosystem, Spring AI included | "Find Spring AI vector stores" |
| Step-by-step tutorials | "Tutorial on Spring Security" |
| Version comparison and migration notes | "Compare 3.3 and 3.4" |
| GitHub release notes with focus filter | "Release notes of Boot 3.5" |
| Expert guidance by category | "Best practices for testing" |
| Offline stack trace and error diagnosis | "Diagnose this DataSource error" |
🧰 Tooling (3 Tools)
Tool | Purpose | Example Usage |
| Spring Initializr metadata: Boot versions, dependencies (start.spring.io) | "Which Boot versions does Initializr offer?" |
| Find starters for a need, with Maven and Gradle snippets (optional | "Which dependency for Redis caching?" |
| In-memory cache statistics and optional purge | "Show cache stats" |
📎 Resources
spring://project/<slug>: Spring project page as complete markdown (e.g.spring://project/spring-boot);resources/listenumerates the 11 projects of the registry, the template accepts any project of spring.iospring://guide/<id>: Spring getting-started guide as complete markdown (e.g.spring://guide/rest-service), available through the resource template
💬 Prompts
migrate-boot-version(to_version, optionalfrom_version): plans a Spring Boot upgrade by chainingget_migration_guide,get_release_notesandget_spring_referenceexplain-error(error_message, optionalstack_trace): explains a Spring error by chainingdiagnose_spring_issuesandget_spring_reference
📖 Usage Examples
Basic Search
"Search for REST API documentation in Spring Boot"search_spring_docs and search_spring_concepts accept an optional version (3.4 or 3.4.2, the patch is ignored; current or omitted = latest) that targets the Spring Boot reference documentation of that version (a version that is not published gives a dedicated error). Guides and projects are not versioned and ignore it; with docType=content, Boot reference pages of other versions are left out of the results.
get_migration_guide accepts project (spring-boot by default, spring-framework, spring-batch): Framework serves the release notes of its minor version (6.2, section "Upgrading From ..."), Batch its migration guide (5.0, 6.0), both read as raw markdown from the project wiki; section and offset work as for Boot. Spring Security and Spring AI (docs.spring.io pages) are not covered yet.
search_spring_docs accepts docType=content: full-text search (BM25 ranking) over the pages the server has already read (get_spring_project, get_spring_reference, get_spring_guide). It is included in docType=all and stays empty until a page has been read.
🆕 Spring AI Support
"Get Spring AI ChatClient reference documentation"
"Search for RAG and embeddings in Spring AI"
"Show me Spring AI vector store documentation"
"Find Spring AI LLM integration examples"Ecosystem Exploration
"Search the Spring ecosystem for microservices patterns"Learning Path
"Get a beginner tutorial for REST API development"Problem Solving
"Diagnose 'Failed to configure DataSource' error"Migration Planning
"Compare Spring Boot 2.7.0 and 3.0.0 breaking changes"Best Practices
"Get architecture best practices for expert developers"🔧 Advanced Configuration
Performance Optimization
{
"mcpServers": {
"spring-docs": {
"command": "npx",
"args": ["@enokdev/springdocs-mcp@latest"],
"env": {
"NODE_OPTIONS": "--max-old-space-size=4096",
"REQUEST_TIMEOUT": "15000",
"MAX_RETRIES": "3"
}
}
}
}Corporate/Proxy Environment
{
"mcpServers": {
"spring-docs": {
"command": "npx",
"args": ["@enokdev/springdocs-mcp@latest"],
"env": {
"HTTP_PROXY": "http://proxy.company.com:8080",
"HTTPS_PROXY": "http://proxy.company.com:8080"
}
}
}
}Transport HTTP (optionnel)
Par défaut le serveur parle stdio. Pour l'héberger en local ou en conteneur :
npx @enokdev/springdocs-mcp --transport http --port 3000 # écoute sur 127.0.0.1Option | Variable | Défaut |
|
|
|
|
|
|
|
|
|
(aucune) |
| vide : liste de |
Endpoint MCP : POST /mcp (mode sans état) ; santé : GET /healthz. Aucune authentification : l'écoute reste sur loopback par défaut, et les en-têtes Host/Origin sont contrôlés contre le DNS rebinding. Pour un conteneur, MCP_TRANSPORT=http MCP_HOST=0.0.0.0 avec le port publié (-p 127.0.0.1:3000:3000) ; si le port publié diffère du port interne, déclarer le Host utilisé par le client, par exemple MCP_ALLOWED_HOSTS=localhost:8080.
Le Host doit être de la forme nom:port : un Host sans port (client sur le port 80 ou 443 derrière un reverse proxy, par exemple Host: mcp.example.com) est refusé en 403. Il faut alors le déclarer tel que le proxy le transmet, via MCP_ALLOWED_HOSTS=mcp.example.com (liste séparée par des virgules, comparaison exacte avec l'en-tête reçu).
Jeton GitHub (optionnel)
get_release_notes et compare_spring_versions interrogent l'API GitHub, limitée à 60 requêtes/heure sans authentification. Définir GITHUB_TOKEN (jeton sans scope particulier suffit) relève cette limite à 5000/heure ; le jeton n'est envoyé qu'à api.github.com (jamais à un autre hôte ni après une redirection) et n'est jamais journalisé. En cas de limite atteinte, l'outil échoue immédiatement avec un message clair (délai de reprise inclus) au lieu d'attendre. get_release_notes accepte version en X.Y (ex. 3.5) pour obtenir la dernière release stable de cette mineure ; compare_spring_versions applique focus (breaking-changes, new-features, deprecations).
{ "mcpServers": { "springdocs": { "command": "npx", "args": ["@enokdev/springdocs-mcp@latest"], "env": { "GITHUB_TOKEN": "ghp_..." } } } }🧪 Testing & Development
Quick Test
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}' | npx @enokdev/springdocs-mcp@latestDevelopment Setup
git clone https://github.com/tky0065/springdocs-mcp.git
cd springdocs-mcp
npm install
npm run build
npm testLoad Testing
# Test multiple tools quickly
for tool in "search_spring_docs" "search_spring_projects" "search_spring_ecosystem"; do
echo "Testing $tool..."
echo "{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"tools/call\", \"params\": {\"name\": \"$tool\", \"arguments\": {\"query\": \"test\", \"limit\": 2}}}" | npx @enokdev/springdocs-mcp@latest > /dev/null
done🆘 Troubleshooting
Common Issues & Solutions
"Server failed to start"
# Check Node.js version (requires 20.18.1+)
node --version
# Update to latest
npm update -g @enokdev/springdocs-mcp
# Clear cache
npm cache clean --force"Tools not responding"
# Test connectivity
curl -I https://spring.io
# Check Claude Desktop config syntax
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json | jq ."Slow performance"
Enable caching (automatic in v1.2.3+)
Use specific queries instead of broad searches
Increase memory:
NODE_OPTIONS="--max-old-space-size=4096"
"Port 8080 already in use" (Spring Boot error)
Solution: Change port in application.properties:
server.port=8081"Failed to configure DataSource"
Solutions:
Add database dependency to
pom.xmlConfigure datasource in
application.propertiesExclude auto-configuration:
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
Health Check Script
#!/bin/bash
echo "🔍 Testing Spring MCP Server..."
# Test server startup
timeout 10s echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}' | npx @enokdev/springdocs-mcp@latest > /dev/null
echo $? -eq 0 && echo "✅ Server: OK" || echo "❌ Server: FAILED"
# Test network
curl -s --max-time 5 https://spring.io > /dev/null
echo $? -eq 0 && echo "✅ Network: OK" || echo "❌ Network: FAILED"📊 What's New in v1.2.3
🆕 Major Enhancements
5 new advanced tools for comprehensive Spring ecosystem access
In-memory caching of repeated requests (30 min TTL, 24 h for stable content)
Auto-retry with exponential backoff and a 5 MiB response size cap
Clean architecture with modular services and optimized code
🎯 New Capabilities
Ecosystem-wide search across projects, guides, docs, and APIs
Progressive tutorials with beginner/intermediate/advanced levels
Smart version comparison with detailed migration guidance
Expert best practices categorized by domain and experience level
Intelligent diagnostics for common Spring Boot issues
⚡ Performance & Resilience
Repeated requests are served from the in-memory cache (30 min TTL, 24 h for stable content) without a new network call
The cache is bounded by an estimated memory budget (64 MiB by default, LRU eviction, a single value larger than the budget is not cached); override with
MCP_CACHE_MAX_MB(e.g.MCP_CACHE_MAX_MB=32).spring_cache_statsreports entries and estimated memory used / budgetRetry with exponential backoff and request timeouts on all external HTTP calls
Responses larger than 5 MiB are rejected
🔮 Roadmap
v1.5.0 (Next)
Interactive Spring Boot project generator (Initializr metadata and dependency lookup are already available)
Custom tutorial creation
v1.6.0 (Future)
AI-powered code suggestions
Performance bottleneck detection
Security vulnerability scanning
Automated testing recommendations
🤝 Contributing & Support
Quick Links
Discussions: https://github.com/tky0065/springdocs-mcp/discussions
NPM Package: https://www.npmjs.com/package/@enokdev/springdocs-mcp
Getting Help
Search existing issues on GitHub
Create detailed issue with error messages and steps to reproduce
Join community discussions for questions and feature requests
Development
# Setup development environment
git clone https://github.com/tky0065/springdocs-mcp.git
cd springdocs-mcp
npm install
npm run build
# Run tests
npm test
./test-enhanced.sh
# Submit PR
git checkout -b feature/your-feature
# Make changes
git commit -m "feat: add your feature"
git push origin feature/your-feature🌐 CLI Integration Examples
Claude Code
# Direct usage
claude-code --mcp-server "npx @enokdev/springdocs-mcp@latest"
# With config file
claude-code --mcp-config claude-mcp-config.jsonGemini CLI
# Direct integration
gemini --mcp-server "npx @enokdev/springdocs-mcp@latest"
# With YAML config
gemini --mcp-config gemini-config.yaml
# Environment variable
export GEMINI_MCP_SERVERS='[{"name":"spring-docs","command":"npx","args":["@enokdev/springdocs-mcp@latest"]}]'
gemini "Search for Spring Boot security documentation"Custom API Integration
// Express.js API Gateway example
const { spawn } = require('child_process');
app.post('/spring-docs/:tool', async (req, res) => {
const mcp = spawn('npx', ['@enokdev/springdocs-mcp@latest']);
const request = {
jsonrpc: "2.0",
id: Date.now(),
method: "tools/call",
params: {
name: req.params.tool,
arguments: req.body
}
};
mcp.stdin.write(JSON.stringify(request));
// Handle response...
});Compatibility Testing
# Test MCP protocol handshake
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | npx @enokdev/springdocs-mcp@latest
# Test tools listing
echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' | npx @enokdev/springdocs-mcp@latest
# Test tool execution
echo '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "search_spring_projects", "arguments": {"query": "boot", "limit": 1}}}' | npx @enokdev/springdocs-mcp@latest📄 License & Acknowledgments
License: MIT - see LICENSE file
Thanks to:
Spring Framework Team for excellent documentation
Anthropic for the Model Context Protocol
Spring Community for continuous support
🚀 Ready to explore the Spring ecosystem with enhanced intelligence and performance!
🌐 Universal MCP Compatibility: Works seamlessly with Claude Code, Gemini CLI, VS Code, JetBrains IDEs, and any MCP-compatible client!
Made with ❤️ by EnokDev
Available Tools
17 toolscompare_spring_versionsC
Compare different Spring Boot versions and their features
Inputs: version1 (required), version2 (required), focus.
diagnose_spring_issuesC
Diagnose common Spring Boot issues and provide solutions
Inputs: error_message (required), component, stack_trace.
find_spring_dependencyA
Trouve les starters Spring correspondant à un besoin (mots-clés en anglais, ex. 'jpa', 'postgres', 'oauth2') et renvoie leurs coordonnées avec des snippets Maven et Gradle prêts à coller, d'après Spring Initializr
Inputs: need (required), build, bootVersion.
get_all_spring_guidesC
Récupère la liste de tous les guides Spring disponibles, optionnellement filtrés par catégorie
Inputs: limit, category.
get_migration_guideA
Récupère le guide de migration ou les notes de version d'upgrade de Spring Boot (par défaut), Spring Framework ou Spring Batch pour une version cible, avec filtre par section (ex: jakarta)
Inputs: version (required), offset, project, section, +1 more.
get_release_notesB
Récupère les notes de release GitHub d'un projet Spring (version précise ou dernière), avec filtre sur les changements majeurs, nouveautés ou dépréciations
Inputs: focus, project, version.
get_spring_best_practicesB
Get best practices and recommendations for Spring Boot development
Inputs: category (required), experience_level.
get_spring_guideC
Récupère le contenu d'un guide Spring Boot spécifique avec niveau de détail configurable
Inputs: guideId (required), detail_level.
get_spring_initializrC
Liste les options de Spring Initializr (start.spring.io : build, Java, langage, versions de Spring Boot) ou ses dépendances, avec filtre texte sur l'id, le nom ou la description
Inputs: query, section.
get_spring_projectC
Récupère les détails complets d'un projet Spring spécifique
Inputs: projectName (required), offset.
get_spring_referenceC
Get specific section of Spring reference documentation (supports Spring Boot, Spring AI, Spring Framework, etc.)
Inputs: section (required), offset, project, version, +1 more.
get_spring_tutorialC
Get step-by-step tutorials for specific Spring Boot features
Inputs: topic (required), level, detail_level.
search_spring_conceptsC
Recherche des concepts Spring Boot dans la documentation de référence (titres de sections correspondants, extraits)
Inputs: concept (required), version.
search_spring_docsC
Recherche dans la documentation Spring Boot avec des mots-clés
Inputs: query (required), limit, docType, version.
search_spring_ecosystemB
Search across the entire Spring ecosystem including all projects, guides, documentation, and Spring AI
Inputs: query (required), limit, scope.
search_spring_projectsC
Recherche parmi tous les projets Spring disponibles sur spring.io/projects
Inputs: query (required), limit.
spring_cache_statsA
Affiche les statistiques du cache du serveur (entrées, expirées, capacité) et permet de purger les entrées expirées ou tout le cache
Inputs: purge.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
The three search tools (search_spring_docs, search_spring_concepts, search_spring_ecosystem) heavily overlap in purpose, and get_spring_reference vs search_spring_concepts both target reference docs, making selection genuinely ambiguous. List-vs-detail pairs (get_all_spring_guides/get_spring_guide, search_spring_projects/get_spring_project) are clearer, but the search cluster drags this down.
Most tools follow a clean snake_case verb_noun pattern (get_*, search_*, compare_*). A few deviations (spring_cache_stats as a noun-first name, find_spring_dependency vs the get_/search_ verbs) are minor but noticeable.
At 17 tools this sits in the borderline-heavy range. The breadth (guides, projects, reference, initializr, dependencies) justifies most, but several search tools likely could be consolidated, and spring_cache_stats feels like an unrelated maintenance add-on.
The surface covers the Spring docs domain well: search, guides, project details, reference sections, version comparison, migration, Initializr, and dependency lookup. No major lifecycle dead ends, though the overlap between search tools suggests some redundancy rather than true gaps.
Maintenance
Related MCP Connectors
Versioned documentation registry and semantic search for AI tools and coding assistants.
Provide your AI coding tools with token-efficient access to up-to-date technical documentation for…
Build Spring Boot applications, ready for coding agents, including best practices.
Docsy gives AI assistants current, version-specific documentation for libraries, frameworks and SDKs. Resolve library IDs and versions, then search and fetch focused official documentation with original source links using five read-only MCP tools. Hosted Streamable HTTP with OAuth 2.1 sign-in.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to understand and analyze Spring Boot codebases through static analysis, allowing natural language queries about endpoints, classes, dependencies, and architecture without running the application.13MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to discover and invoke tools for saving and retrieving code snippets, generating style guides and wiki documentation, and orchestrating multi-agent documentation workflows with semantic search.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to save and retrieve code snippets, perform semantic code search, generate language-specific style guides and deep wiki documentation, and orchestrate multi-agent workflows for comprehensive documentation.-
- FlicenseNot gradedqualityAmaintenanceEnables AI assistants to discover and invoke tools for saving and retrieving code snippets, generating language-specific style guides and deep wiki documentation, and orchestrating multi-agent documentation workflows backed by semantic vector search.-