@enokdev/springdocs-mcp 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -1
- package/build/debug.d.ts +3 -0
- package/build/debug.d.ts.map +1 -0
- package/build/debug.js +292 -0
- package/build/debug.js.map +1 -0
- package/build/index.js +16 -10
- package/build/index.js.map +1 -1
- package/package.json +11 -3
- package/.github/workflows/publish.yml +0 -64
- package/CHANGELOG.md +0 -82
- package/CHANGELOG_v1.2.0.md +0 -71
- package/CONTRIBUTING.md +0 -215
- package/EXAMPLES.md +0 -186
- package/EXAMPLES_FR.md +0 -186
- package/INSTALL.md +0 -123
- package/INSTALL_FR.md +0 -123
- package/JETBRAINS_SETUP.md +0 -171
- package/README_FR.md +0 -219
- package/RELEASE_NOTES_v1.1.0.md +0 -106
- package/RELEASE_NOTES_v1.2.0.md +0 -138
- package/TROUBLESHOOTING.md +0 -163
- package/claude_desktop_config.json +0 -7
- package/diagnostic.sh +0 -55
- package/docs/index.html +0 -147
- package/guid.md +0 -92
- package/publish.sh +0 -130
- package/setup-jetbrains.sh +0 -164
- package/src/index.ts +0 -287
- package/src/services/springboot-docs.ts +0 -615
- package/src/tools/index.ts +0 -144
- package/test-jetbrains.sh +0 -125
- package/test.sh +0 -64
- package/tsconfig.json +0 -24
package/src/tools/index.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Définitions des outils MCP pour l'accès à la documentation Spring Boot
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export class ToolDefinitions {
|
|
6
|
-
static getToolList() {
|
|
7
|
-
return [
|
|
8
|
-
{
|
|
9
|
-
name: "search_spring_docs",
|
|
10
|
-
description: "Recherche dans la documentation Spring Boot avec des mots-clés",
|
|
11
|
-
inputSchema: {
|
|
12
|
-
type: "object",
|
|
13
|
-
properties: {
|
|
14
|
-
query: {
|
|
15
|
-
type: "string",
|
|
16
|
-
description: "Les mots-clés à rechercher dans la documentation",
|
|
17
|
-
},
|
|
18
|
-
docType: {
|
|
19
|
-
type: "string",
|
|
20
|
-
enum: ["guides", "reference", "api", "all"],
|
|
21
|
-
description: "Type de documentation à rechercher",
|
|
22
|
-
default: "all",
|
|
23
|
-
},
|
|
24
|
-
limit: {
|
|
25
|
-
type: "number",
|
|
26
|
-
description: "Nombre maximum de résultats à retourner",
|
|
27
|
-
default: 10,
|
|
28
|
-
minimum: 1,
|
|
29
|
-
maximum: 50,
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
required: ["query"],
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: "search_spring_projects",
|
|
37
|
-
description: "Recherche parmi tous les projets Spring disponibles sur spring.io/projects",
|
|
38
|
-
inputSchema: {
|
|
39
|
-
type: "object",
|
|
40
|
-
properties: {
|
|
41
|
-
query: {
|
|
42
|
-
type: "string",
|
|
43
|
-
description: "Les mots-clés à rechercher dans les projets Spring (ex: 'security', 'data', 'cloud')",
|
|
44
|
-
},
|
|
45
|
-
limit: {
|
|
46
|
-
type: "number",
|
|
47
|
-
description: "Nombre maximum de projets à retourner",
|
|
48
|
-
default: 10,
|
|
49
|
-
minimum: 1,
|
|
50
|
-
maximum: 20,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
required: ["query"],
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
name: "get_spring_project",
|
|
58
|
-
description: "Récupère les détails complets d'un projet Spring spécifique",
|
|
59
|
-
inputSchema: {
|
|
60
|
-
type: "object",
|
|
61
|
-
properties: {
|
|
62
|
-
projectName: {
|
|
63
|
-
type: "string",
|
|
64
|
-
description: "Le nom du projet Spring (ex: 'spring-boot', 'spring-security', 'spring-data')",
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
required: ["projectName"],
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: "get_all_spring_guides",
|
|
72
|
-
description: "Récupère la liste de tous les guides Spring disponibles, optionnellement filtrés par catégorie",
|
|
73
|
-
inputSchema: {
|
|
74
|
-
type: "object",
|
|
75
|
-
properties: {
|
|
76
|
-
category: {
|
|
77
|
-
type: "string",
|
|
78
|
-
description: "Catégorie de guides à filtrer (ex: 'Web', 'Data', 'Security', 'Testing')",
|
|
79
|
-
},
|
|
80
|
-
limit: {
|
|
81
|
-
type: "number",
|
|
82
|
-
description: "Nombre maximum de guides à retourner",
|
|
83
|
-
default: 20,
|
|
84
|
-
minimum: 1,
|
|
85
|
-
maximum: 50,
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
required: [],
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
name: "get_spring_guide",
|
|
93
|
-
description: "Récupère le contenu complet d'un guide Spring Boot spécifique",
|
|
94
|
-
inputSchema: {
|
|
95
|
-
type: "object",
|
|
96
|
-
properties: {
|
|
97
|
-
guideId: {
|
|
98
|
-
type: "string",
|
|
99
|
-
description: "L'identifiant du guide Spring Boot (par exemple: 'gs-rest-service', 'gs-accessing-data-jpa')",
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
|
-
required: ["guideId"],
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
name: "get_spring_reference",
|
|
107
|
-
description: "Récupère une section spécifique de la documentation de référence Spring Boot",
|
|
108
|
-
inputSchema: {
|
|
109
|
-
type: "object",
|
|
110
|
-
properties: {
|
|
111
|
-
section: {
|
|
112
|
-
type: "string",
|
|
113
|
-
description: "La section de la documentation de référence (par exemple: 'web', 'data', 'security')",
|
|
114
|
-
},
|
|
115
|
-
subsection: {
|
|
116
|
-
type: "string",
|
|
117
|
-
description: "Sous-section optionnelle pour une recherche plus précise",
|
|
118
|
-
},
|
|
119
|
-
},
|
|
120
|
-
required: ["section"],
|
|
121
|
-
},
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
name: "search_spring_concepts",
|
|
125
|
-
description: "Recherche des concepts Spring Boot par catégorie avec des explications détaillées",
|
|
126
|
-
inputSchema: {
|
|
127
|
-
type: "object",
|
|
128
|
-
properties: {
|
|
129
|
-
concept: {
|
|
130
|
-
type: "string",
|
|
131
|
-
description: "Le concept Spring Boot à rechercher (par exemple: 'auto-configuration', 'profiles', 'actuator')",
|
|
132
|
-
},
|
|
133
|
-
category: {
|
|
134
|
-
type: "string",
|
|
135
|
-
enum: ["core", "web", "data", "security", "testing", "production"],
|
|
136
|
-
description: "Catégorie du concept pour filtrer les résultats",
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
required: ["concept"],
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
];
|
|
143
|
-
}
|
|
144
|
-
}
|
package/test-jetbrains.sh
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
echo "🧪 Test des configurations JetBrains IDEs"
|
|
4
|
-
echo "========================================="
|
|
5
|
-
echo
|
|
6
|
-
|
|
7
|
-
# Couleurs
|
|
8
|
-
GREEN='\033[0;32m'
|
|
9
|
-
YELLOW='\033[1;33m'
|
|
10
|
-
BLUE='\033[0;34m'
|
|
11
|
-
RED='\033[0;31m'
|
|
12
|
-
NC='\033[0m'
|
|
13
|
-
|
|
14
|
-
# Fonction de test
|
|
15
|
-
test_config_file() {
|
|
16
|
-
local file="$1"
|
|
17
|
-
local description="$2"
|
|
18
|
-
|
|
19
|
-
if [ -f "$file" ]; then
|
|
20
|
-
echo -e "${GREEN}✅ $description${NC}"
|
|
21
|
-
echo -e "${BLUE} 📁 $file${NC}"
|
|
22
|
-
|
|
23
|
-
# Vérifier si c'est un fichier JSON valide
|
|
24
|
-
if [[ "$file" == *.json ]]; then
|
|
25
|
-
if python3 -m json.tool "$file" > /dev/null 2>&1; then
|
|
26
|
-
echo -e "${GREEN} ✅ JSON valide${NC}"
|
|
27
|
-
else
|
|
28
|
-
echo -e "${RED} ❌ JSON invalide${NC}"
|
|
29
|
-
fi
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
# Vérifier si c'est un fichier XML valide
|
|
33
|
-
if [[ "$file" == *.xml ]]; then
|
|
34
|
-
if command -v xmllint &> /dev/null; then
|
|
35
|
-
if xmllint --noout "$file" 2>/dev/null; then
|
|
36
|
-
echo -e "${GREEN} ✅ XML valide${NC}"
|
|
37
|
-
else
|
|
38
|
-
echo -e "${RED} ❌ XML invalide${NC}"
|
|
39
|
-
fi
|
|
40
|
-
else
|
|
41
|
-
echo -e "${YELLOW} ⚠️ xmllint non disponible (optionnel)${NC}"
|
|
42
|
-
fi
|
|
43
|
-
fi
|
|
44
|
-
echo
|
|
45
|
-
else
|
|
46
|
-
echo -e "${YELLOW}⚠️ $description - Non trouvé${NC}"
|
|
47
|
-
echo -e "${BLUE} 📁 $file${NC}"
|
|
48
|
-
echo
|
|
49
|
-
fi
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
echo -e "${YELLOW}🔍 Vérification des configurations créées...${NC}"
|
|
53
|
-
echo
|
|
54
|
-
|
|
55
|
-
# Configuration générique
|
|
56
|
-
test_config_file "$HOME/.jetbrains/claude_mcp_config.json" "Configuration générique JetBrains"
|
|
57
|
-
|
|
58
|
-
# IDEs spécifiques
|
|
59
|
-
JETBRAINS_BASE="$HOME/Library/Application Support/JetBrains"
|
|
60
|
-
|
|
61
|
-
if [ -d "$JETBRAINS_BASE" ]; then
|
|
62
|
-
echo -e "${BLUE}📍 Recherche des configurations IDE...${NC}"
|
|
63
|
-
echo
|
|
64
|
-
|
|
65
|
-
# IntelliJ IDEA
|
|
66
|
-
find "$JETBRAINS_BASE" -name "IntelliJIdea*" -type d | while read -r ide_dir; do
|
|
67
|
-
claude_xml="$ide_dir/options/claude.xml"
|
|
68
|
-
test_config_file "$claude_xml" "IntelliJ IDEA $(basename "$ide_dir")"
|
|
69
|
-
done
|
|
70
|
-
|
|
71
|
-
# WebStorm
|
|
72
|
-
find "$JETBRAINS_BASE" -name "WebStorm*" -type d | while read -r ide_dir; do
|
|
73
|
-
claude_xml="$ide_dir/options/claude.xml"
|
|
74
|
-
test_config_file "$claude_xml" "WebStorm $(basename "$ide_dir")"
|
|
75
|
-
done
|
|
76
|
-
|
|
77
|
-
# GoLand
|
|
78
|
-
find "$JETBRAINS_BASE" -name "GoLand*" -type d | while read -r ide_dir; do
|
|
79
|
-
claude_xml="$ide_dir/options/claude.xml"
|
|
80
|
-
test_config_file "$claude_xml" "GoLand $(basename "$ide_dir")"
|
|
81
|
-
done
|
|
82
|
-
|
|
83
|
-
# PyCharm
|
|
84
|
-
find "$JETBRAINS_BASE" -name "PyCharm*" -type d | while read -r ide_dir; do
|
|
85
|
-
claude_xml="$ide_dir/options/claude.xml"
|
|
86
|
-
test_config_file "$claude_xml" "PyCharm $(basename "$ide_dir")"
|
|
87
|
-
done
|
|
88
|
-
|
|
89
|
-
else
|
|
90
|
-
echo -e "${RED}❌ Dossier JetBrains non trouvé: $JETBRAINS_BASE${NC}"
|
|
91
|
-
fi
|
|
92
|
-
|
|
93
|
-
echo -e "${YELLOW}🧪 Test du serveur MCP...${NC}"
|
|
94
|
-
echo
|
|
95
|
-
|
|
96
|
-
# Test du serveur MCP
|
|
97
|
-
if command -v springdocs-mcp &> /dev/null; then
|
|
98
|
-
echo -e "${GREEN}✅ Commande springdocs-mcp disponible${NC}"
|
|
99
|
-
|
|
100
|
-
# Test rapide du serveur
|
|
101
|
-
echo -e "${BLUE}🔄 Test d'initialisation...${NC}"
|
|
102
|
-
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s springdocs-mcp > /dev/null 2>&1
|
|
103
|
-
|
|
104
|
-
if [ $? -eq 0 ]; then
|
|
105
|
-
echo -e "${GREEN}✅ Serveur MCP répond correctement${NC}"
|
|
106
|
-
else
|
|
107
|
-
echo -e "${RED}❌ Problème avec le serveur MCP${NC}"
|
|
108
|
-
fi
|
|
109
|
-
else
|
|
110
|
-
echo -e "${RED}❌ Commande springdocs-mcp non disponible${NC}"
|
|
111
|
-
echo "Exécutez: npm install -g @enokdev/springdocs-mcp"
|
|
112
|
-
fi
|
|
113
|
-
|
|
114
|
-
echo
|
|
115
|
-
echo -e "${YELLOW}📋 Résumé des tests${NC}"
|
|
116
|
-
echo -e "${GREEN}✅ = Configuration trouvée et valide${NC}"
|
|
117
|
-
echo -e "${YELLOW}⚠️ = Configuration manquante (normal si IDE non installé)${NC}"
|
|
118
|
-
echo -e "${RED}❌ = Problème détecté${NC}"
|
|
119
|
-
echo
|
|
120
|
-
echo -e "${BLUE}💡 Prochaines étapes:${NC}"
|
|
121
|
-
echo "1. Redémarrer vos IDEs JetBrains"
|
|
122
|
-
echo "2. Installer le plugin Claude dans chaque IDE"
|
|
123
|
-
echo "3. Tester avec: 'Quels sont les projets Spring pour la sécurité ?'"
|
|
124
|
-
echo
|
|
125
|
-
echo -e "${GREEN}🎉 Configuration JetBrains terminée !${NC}"
|
package/test.sh
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Script de test pour le serveur MCP Spring Boot Documentation
|
|
4
|
-
# Ce script teste les différentes fonctionnalités du serveur
|
|
5
|
-
|
|
6
|
-
echo "🧪 Test du serveur MCP Spring Boot Documentation"
|
|
7
|
-
echo "================================================"
|
|
8
|
-
|
|
9
|
-
# Fonction pour envoyer une requête JSON-RPC et afficher la réponse
|
|
10
|
-
send_request() {
|
|
11
|
-
local request="$1"
|
|
12
|
-
local description="$2"
|
|
13
|
-
|
|
14
|
-
echo -e "\n📝 Test: $description"
|
|
15
|
-
echo "Requête: $request"
|
|
16
|
-
echo "Réponse:"
|
|
17
|
-
echo "$request" | node build/index.js | tail -n 1 | jq '.'
|
|
18
|
-
echo "---"
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
# Vérifier que le serveur est compilé
|
|
22
|
-
if [ ! -f "build/index.js" ]; then
|
|
23
|
-
echo "❌ Le serveur n'est pas compilé. Exécutez 'npm run build' d'abord."
|
|
24
|
-
exit 1
|
|
25
|
-
fi
|
|
26
|
-
|
|
27
|
-
# Vérifier que jq est installé pour formater le JSON
|
|
28
|
-
if ! command -v jq &> /dev/null; then
|
|
29
|
-
echo "⚠️ jq n'est pas installé. Les réponses JSON ne seront pas formatées."
|
|
30
|
-
alias jq="cat"
|
|
31
|
-
fi
|
|
32
|
-
|
|
33
|
-
# Test 1: Initialisation
|
|
34
|
-
send_request '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' "Initialisation du serveur"
|
|
35
|
-
|
|
36
|
-
# Test 2: Liste des outils
|
|
37
|
-
send_request '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' "Liste des outils disponibles"
|
|
38
|
-
|
|
39
|
-
# Test 3: Recherche de documentation
|
|
40
|
-
send_request '{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "search_spring_docs", "arguments": {"query": "REST API", "limit": 3}}}' "Recherche de documentation REST API"
|
|
41
|
-
|
|
42
|
-
# Test 4: Recherche de projets Spring
|
|
43
|
-
send_request '{"jsonrpc": "2.0", "id": 4, "method": "tools/call", "params": {"name": "search_spring_projects", "arguments": {"query": "security", "limit": 3}}}' "Recherche de projets Spring Security"
|
|
44
|
-
|
|
45
|
-
# Test 5: Détails d'un projet Spring
|
|
46
|
-
send_request '{"jsonrpc": "2.0", "id": 5, "method": "tools/call", "params": {"name": "get_spring_project", "arguments": {"projectName": "spring-boot"}}}' "Détails du projet Spring Boot"
|
|
47
|
-
|
|
48
|
-
# Test 6: Liste des guides Spring
|
|
49
|
-
send_request '{"jsonrpc": "2.0", "id": 6, "method": "tools/call", "params": {"name": "get_all_spring_guides", "arguments": {"category": "Web", "limit": 5}}}' "Guides Spring catégorie Web"
|
|
50
|
-
|
|
51
|
-
# Test 7: Recherche de concepts
|
|
52
|
-
send_request '{"jsonrpc": "2.0", "id": 7, "method": "tools/call", "params": {"name": "search_spring_concepts", "arguments": {"concept": "auto-configuration"}}}' "Recherche du concept auto-configuration"
|
|
53
|
-
|
|
54
|
-
echo -e "\n✅ Tests terminés!"
|
|
55
|
-
echo ""
|
|
56
|
-
echo "Pour utiliser ce serveur avec Claude Desktop, ajoutez ceci à votre claude_desktop_config.json:"
|
|
57
|
-
echo '{'
|
|
58
|
-
echo ' "mcpServers": {'
|
|
59
|
-
echo ' "springboot-docs": {'
|
|
60
|
-
echo ' "command": "node",'
|
|
61
|
-
echo " \"args\": [\"$(pwd)/build/index.js\"]"
|
|
62
|
-
echo ' }'
|
|
63
|
-
echo ' }'
|
|
64
|
-
echo '}'
|
package/tsconfig.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "Node16",
|
|
5
|
-
"moduleResolution": "Node16",
|
|
6
|
-
"outDir": "./build",
|
|
7
|
-
"rootDir": "./src",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"declaration": true,
|
|
14
|
-
"declarationMap": true,
|
|
15
|
-
"sourceMap": true
|
|
16
|
-
},
|
|
17
|
-
"include": [
|
|
18
|
-
"src/**/*"
|
|
19
|
-
],
|
|
20
|
-
"exclude": [
|
|
21
|
-
"node_modules",
|
|
22
|
-
"build"
|
|
23
|
-
]
|
|
24
|
-
}
|