@enokdev/springdocs-mcp 1.1.0 → 1.2.0

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.
@@ -0,0 +1,138 @@
1
+ # 🚀 Spring Documentation MCP Server v1.2.0 - Support JetBrains IDEs
2
+
3
+ ## 🎉 Nouveautés de la version 1.2.0
4
+
5
+ ### ✨ Support complet des IDEs JetBrains
6
+
7
+ Votre serveur MCP Spring Documentation est maintenant compatible avec **tous les IDEs JetBrains** :
8
+
9
+ - ✅ **IntelliJ IDEA** (Ultimate & Community)
10
+ - ✅ **WebStorm**
11
+ - ✅ **PyCharm** (Professional & Community)
12
+ - ✅ **PhpStorm**
13
+ - ✅ **RubyMine**
14
+ - ✅ **CLion**
15
+ - ✅ **GoLand**
16
+ - ✅ **Rider**
17
+ - ✅ **DataGrip**
18
+ - ✅ **Android Studio**
19
+
20
+ ## 🛠️ Installation et Configuration
21
+
22
+ ### 1. Mise à jour du package (si déjà installé)
23
+
24
+ ```bash
25
+ npm update -g @enokdev/springdocs-mcp
26
+ ```
27
+
28
+ ### 2. Configuration automatique JetBrains
29
+
30
+ ```bash
31
+ cd /path/to/springdocs-mcp
32
+ ./setup-jetbrains.sh
33
+ ```
34
+
35
+ ### 3. Vérification de la configuration
36
+
37
+ ```bash
38
+ ./test-jetbrains.sh
39
+ ```
40
+
41
+ ## 🎯 Utilisation dans vos IDEs
42
+
43
+ ### Claude Desktop
44
+ ✅ **Déjà configuré** - Continuez à utiliser comme avant
45
+
46
+ ### VS Code
47
+ ✅ **Déjà configuré** - Extension Claude avec MCP
48
+
49
+ ### JetBrains IDEs (NOUVEAU!)
50
+ 🆕 **Nouvellement supporté** :
51
+
52
+ 1. **Installer le plugin Claude** dans votre IDE JetBrains
53
+ 2. **Redémarrer l'IDE** après la configuration automatique
54
+ 3. **Tester** avec une question Spring dans le chat Claude
55
+
56
+ ## 💬 Exemples d'utilisation JetBrains
57
+
58
+ ### Dans IntelliJ IDEA
59
+ ```
60
+ Vous: "Quels sont les projets Spring pour la sécurité ?"
61
+ Claude: [Utilise search_spring_projects("security")]
62
+ ```
63
+
64
+ ### Dans WebStorm
65
+ ```
66
+ Vous: "Comment créer une API REST avec Spring Boot ?"
67
+ Claude: [Utilise get_spring_guide("gs-rest-service")]
68
+ ```
69
+
70
+ ### Dans GoLand
71
+ ```
72
+ Vous: "Documentation Spring Boot pour les microservices"
73
+ Claude: [Utilise search_spring_concepts("microservices")]
74
+ ```
75
+
76
+ ## 🔧 Tous vos outils MCP Spring disponibles
77
+
78
+ 1. **search_spring_docs** - Recherche documentation
79
+ 2. **search_spring_projects** - Projets Spring ecosystem
80
+ 3. **get_spring_project** - Détails d'un projet
81
+ 4. **get_all_spring_guides** - Liste des guides
82
+ 5. **get_spring_guide** - Contenu guide complet
83
+ 6. **get_spring_reference** - Documentation référence
84
+ 7. **search_spring_concepts** - Concepts Spring Boot
85
+
86
+ ## 📍 Où utiliser maintenant
87
+
88
+ | Environnement | Status | Configuration |
89
+ |---------------|--------|---------------|
90
+ | **Claude Desktop** | ✅ Actif | `claude_desktop_config.json` |
91
+ | **VS Code** | ✅ Actif | Extension Claude |
92
+ | **IntelliJ IDEA** | 🆕 Nouveau | Plugin Claude + XML config |
93
+ | **WebStorm** | 🆕 Nouveau | Plugin Claude + XML config |
94
+ | **GoLand** | 🆕 Nouveau | Plugin Claude + XML config |
95
+ | **PyCharm** | 🆕 Nouveau | Plugin Claude + XML config |
96
+ | **Autres JetBrains** | 🆕 Nouveau | Plugin Claude + XML config |
97
+
98
+ ## 🔄 Migration depuis v1.1.1
99
+
100
+ **Aucune action requise** pour vos configurations existantes :
101
+ - ✅ Claude Desktop continue de fonctionner
102
+ - ✅ VS Code continue de fonctionner
103
+ - 🆕 JetBrains IDEs maintenant supportés en plus
104
+
105
+ ## 🛠️ Dépannage
106
+
107
+ ### JetBrains IDEs
108
+ Si les outils n'apparaissent pas :
109
+
110
+ 1. **Vérifier le plugin Claude** est installé
111
+ 2. **Redémarrer l'IDE** complètement
112
+ 3. **Vérifier la configuration** : `./test-jetbrains.sh`
113
+ 4. **Consulter** `JETBRAINS_SETUP.md` pour les détails
114
+
115
+ ### Claude Desktop / VS Code
116
+ Si problème existant :
117
+
118
+ 1. **Consulter** `TROUBLESHOOTING.md`
119
+ 2. **Exécuter** `./diagnostic.sh`
120
+
121
+ ## 🎊 Profitez de votre Spring Documentation
122
+
123
+ Vous avez maintenant accès à **toute la documentation Spring** dans **tous vos environnements de développement** !
124
+
125
+ - 📚 **Documentation complète** Spring Boot + écosystème
126
+ - 🛠️ **7 outils MCP puissants**
127
+ - 🌐 **Support multi-plateforme** (Claude Desktop, VS Code, JetBrains)
128
+ - ⚡ **Accès instantané** à spring.io/projects et guides
129
+
130
+ ---
131
+
132
+ **🔗 Liens utiles :**
133
+ - 📖 [Documentation complète](README.md)
134
+ - 🛠️ [Configuration JetBrains](JETBRAINS_SETUP.md)
135
+ - 🔧 [Dépannage](TROUBLESHOOTING.md)
136
+ - 📦 [npm Package](https://www.npmjs.com/package/@enokdev/springdocs-mcp)
137
+
138
+ **Made with ❤️ by [EnokDev](https://github.com/tky0065)**
@@ -0,0 +1,163 @@
1
+ # 🔧 Guide de Dépannage - Spring Documentation MCP Server
2
+
3
+ ## 🚨 Problème : Les outils MCP n'apparaissent pas dans Claude Desktop
4
+
5
+ ### ✅ Vérifications de base
6
+
7
+ 1. **Vérifier l'installation du package**
8
+ ```bash
9
+ npm list -g @enokdev/springdocs-mcp
10
+ ```
11
+ Devrait afficher : `@enokdev/springdocs-mcp@1.1.1`
12
+
13
+ 2. **Vérifier la commande globale**
14
+ ```bash
15
+ which springdocs-mcp
16
+ ```
17
+ Devrait afficher : `/opt/homebrew/bin/springdocs-mcp`
18
+
19
+ 3. **Tester le serveur localement**
20
+ ```bash
21
+ echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {}}' | springdocs-mcp
22
+ ```
23
+
24
+ ### 🔧 Solutions étape par étape
25
+
26
+ #### Solution 1 : Configuration Claude Desktop (Recommandée)
27
+
28
+ **Fichier :** `~/Library/Application Support/Claude/claude_desktop_config.json`
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "spring-docs": {
34
+ "command": "/opt/homebrew/bin/springdocs-mcp"
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ #### Solution 2 : Configuration alternative (Développement)
41
+
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "spring-docs": {
46
+ "command": "node",
47
+ "args": ["/path/to/springdocs-mcp/build/index.js"]
48
+ }
49
+ }
50
+ }
51
+ ```
52
+
53
+ #### Solution 3 : Réinstallation complète
54
+
55
+ ```bash
56
+ # Désinstaller
57
+ npm uninstall -g @enokdev/springdocs-mcp
58
+
59
+ # Nettoyer le cache
60
+ npm cache clean --force
61
+
62
+ # Réinstaller
63
+ npm install -g @enokdev/springdocs-mcp
64
+
65
+ # Vérifier
66
+ springdocs-mcp --help
67
+ ```
68
+
69
+ ### 🔍 Diagnostic automatique
70
+
71
+ Utilisez le script de diagnostic :
72
+
73
+ ```bash
74
+ ./diagnostic.sh
75
+ ```
76
+
77
+ ### 📋 Checklist de dépannage
78
+
79
+ - [ ] Package installé globalement
80
+ - [ ] Lien symbolique existe dans `/opt/homebrew/bin/`
81
+ - [ ] Fichier exécutable avec permissions correctes
82
+ - [ ] Configuration JSON valide (pas de virgules en trop)
83
+ - [ ] Chemin absolu utilisé dans la configuration
84
+ - [ ] Claude Desktop redémarré après modification config
85
+
86
+ ### 🚫 Erreurs communes
87
+
88
+ #### JSON invalide
89
+ ❌ **Problème :**
90
+ ```json
91
+ {
92
+ "mcpServers": {
93
+ "spring-docs": {
94
+ "command": "springdocs-mcp"
95
+ }, // <- virgule en trop
96
+ }
97
+ }
98
+ ```
99
+
100
+ ✅ **Solution :**
101
+ ```json
102
+ {
103
+ "mcpServers": {
104
+ "spring-docs": {
105
+ "command": "springdocs-mcp"
106
+ }
107
+ }
108
+ }
109
+ ```
110
+
111
+ #### Chemin relatif
112
+ ❌ **Problème :**
113
+ ```json
114
+ {
115
+ "mcpServers": {
116
+ "spring-docs": {
117
+ "command": "springdocs-mcp" // <- peut ne pas être trouvé
118
+ }
119
+ }
120
+ }
121
+ ```
122
+
123
+ ✅ **Solution :**
124
+ ```json
125
+ {
126
+ "mcpServers": {
127
+ "spring-docs": {
128
+ "command": "/opt/homebrew/bin/springdocs-mcp" // <- chemin absolu
129
+ }
130
+ }
131
+ }
132
+ ```
133
+
134
+ ### 🔄 Redémarrage requis
135
+
136
+ Après modification de la configuration :
137
+
138
+ 1. **Fermer complètement Claude Desktop**
139
+ 2. **Attendre 5 secondes**
140
+ 3. **Relancer Claude Desktop**
141
+ 4. **Vérifier la présence des outils dans le menu**
142
+
143
+ ### 📍 Emplacements des fichiers
144
+
145
+ - **Configuration Claude Desktop :** `~/Library/Application Support/Claude/claude_desktop_config.json`
146
+ - **Executable global :** `/opt/homebrew/bin/springdocs-mcp`
147
+ - **Package installé :** `/opt/homebrew/lib/node_modules/@enokdev/springdocs-mcp/`
148
+
149
+ ### 🆘 Si rien ne fonctionne
150
+
151
+ 1. **Vérifier les logs de Claude Desktop** (si disponibles)
152
+ 2. **Tester avec une configuration minimale**
153
+ 3. **Utiliser le mode développement avec chemin absolu**
154
+ 4. **Contacter le support ou ouvrir une issue GitHub**
155
+
156
+ ### 📞 Support
157
+
158
+ - **GitHub Issues :** https://github.com/tky0065/springdocs-mcp/issues
159
+ - **npm Package :** https://www.npmjs.com/package/@enokdev/springdocs-mcp
160
+
161
+ ---
162
+
163
+ **Note :** Ce serveur MCP fournit 7 outils pour explorer la documentation Spring. Une fois configuré correctement, vous devriez voir apparaître les outils Spring dans l'interface Claude Desktop.
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "mcpServers": {
3
- "springboot-docs": {
4
- "command": "node",
5
- "args": ["/Users/yacoubakone/Documents/dev/springdocsmcp/build/index.js"]
3
+ "spring-docs": {
4
+ "command": "springdocs-mcp"
6
5
  }
7
6
  }
8
7
  }
package/diagnostic.sh ADDED
@@ -0,0 +1,55 @@
1
+ #!/bin/bash
2
+
3
+ echo "🔍 Diagnostic du serveur MCP Spring Documentation"
4
+ echo "================================================="
5
+ echo
6
+
7
+ echo "📦 Vérification de l'installation npm..."
8
+ npm list -g @enokdev/springdocs-mcp 2>/dev/null || echo "❌ Package non installé globalement"
9
+ echo
10
+
11
+ echo "🔗 Vérification du lien symbolique..."
12
+ if [ -L "/opt/homebrew/bin/springdocs-mcp" ]; then
13
+ echo "✅ Lien symbolique existe: $(readlink /opt/homebrew/bin/springdocs-mcp)"
14
+ else
15
+ echo "❌ Lien symbolique manquant"
16
+ fi
17
+ echo
18
+
19
+ echo "📂 Vérification du fichier executable..."
20
+ if [ -x "/opt/homebrew/lib/node_modules/@enokdev/springdocs-mcp/build/index.js" ]; then
21
+ echo "✅ Fichier exécutable existe"
22
+ else
23
+ echo "❌ Fichier exécutable manquant ou non exécutable"
24
+ fi
25
+ echo
26
+
27
+ echo "🏗️ Vérification du shebang..."
28
+ head -1 /opt/homebrew/lib/node_modules/@enokdev/springdocs-mcp/build/index.js | grep -q "#!/usr/bin/env node" && echo "✅ Shebang correct" || echo "❌ Shebang incorrect"
29
+ echo
30
+
31
+ echo "🔄 Test de la commande directe..."
32
+ echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s /opt/homebrew/bin/springdocs-mcp 2>&1 | head -5 || echo "❌ Timeout ou erreur"
33
+ echo
34
+
35
+ echo "📋 Configuration Claude Desktop actuelle:"
36
+ echo "$(cat ~/Library/Application\ Support/Claude/claude_desktop_config.json 2>/dev/null || echo '❌ Fichier de configuration non trouvé')"
37
+ echo
38
+
39
+ echo "💡 Configuration recommandée pour Claude Desktop:"
40
+ cat << 'EOF'
41
+ {
42
+ "mcpServers": {
43
+ "spring-docs": {
44
+ "command": "/opt/homebrew/bin/springdocs-mcp"
45
+ }
46
+ }
47
+ }
48
+ EOF
49
+ echo
50
+
51
+ echo "🔧 Pour résoudre les problèmes potentiels:"
52
+ echo "1. Redémarrer Claude Desktop complètement"
53
+ echo "2. Vérifier que la configuration JSON est valide"
54
+ echo "3. Utiliser le chemin absolu: /opt/homebrew/bin/springdocs-mcp"
55
+ echo "4. Si nécessaire, réinstaller: npm uninstall -g @enokdev/springdocs-mcp && npm install -g @enokdev/springdocs-mcp"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enokdev/springdocs-mcp",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Public MCP server for accessing Spring Boot documentation and the complete Spring ecosystem",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
@@ -22,7 +22,9 @@
22
22
  "watch": "tsc --watch",
23
23
  "prepublishOnly": "npm run build",
24
24
  "test": "node test.sh",
25
- "install-global": "npm install -g ."
25
+ "install-global": "npm install -g .",
26
+ "setup-jetbrains": "./setup-jetbrains.sh",
27
+ "setup-all": "npm run setup-jetbrains"
26
28
  },
27
29
  "keywords": [
28
30
  "mcp",
@@ -0,0 +1,164 @@
1
+ #!/bin/bash
2
+
3
+ echo "🚀 Configuration automatique du serveur MCP Spring pour IDEs JetBrains"
4
+ echo "======================================================================"
5
+ echo
6
+
7
+ # Couleurs pour l'affichage
8
+ GREEN='\033[0;32m'
9
+ YELLOW='\033[1;33m'
10
+ BLUE='\033[0;34m'
11
+ RED='\033[0;31m'
12
+ NC='\033[0m' # No Color
13
+
14
+ # Vérifier si springdocs-mcp est installé
15
+ if ! command -v springdocs-mcp &> /dev/null; then
16
+ echo -e "${RED}❌ springdocs-mcp n'est pas installé globalement${NC}"
17
+ echo "Exécutez: npm install -g @enokdev/springdocs-mcp"
18
+ exit 1
19
+ fi
20
+
21
+ echo -e "${GREEN}✅ springdocs-mcp trouvé: $(which springdocs-mcp)${NC}"
22
+ echo
23
+
24
+ # Configuration MCP standard
25
+ MCP_CONFIG='{
26
+ "spring-docs": {
27
+ "command": "/opt/homebrew/bin/springdocs-mcp",
28
+ "description": "Spring Documentation MCP Server - Access to complete Spring ecosystem",
29
+ "timeout": 30000
30
+ }
31
+ }'
32
+
33
+ # Fonction pour créer la configuration Claude générique
34
+ create_claude_config() {
35
+ local config_dir="$1"
36
+ local config_file="$config_dir/claude_mcp_config.json"
37
+
38
+ if [ ! -d "$config_dir" ]; then
39
+ mkdir -p "$config_dir"
40
+ echo -e "${BLUE}📁 Créé le dossier: $config_dir${NC}"
41
+ fi
42
+
43
+ cat > "$config_file" << EOF
44
+ {
45
+ "mcpServers": $MCP_CONFIG
46
+ }
47
+ EOF
48
+
49
+ echo -e "${GREEN}✅ Configuration créée: $config_file${NC}"
50
+ }
51
+
52
+ # Fonction pour créer la configuration XML JetBrains
53
+ create_jetbrains_xml() {
54
+ local ide_config_dir="$1"
55
+ local options_dir="$ide_config_dir/options"
56
+ local claude_xml="$options_dir/claude.xml"
57
+
58
+ if [ ! -d "$options_dir" ]; then
59
+ mkdir -p "$options_dir"
60
+ echo -e "${BLUE}📁 Créé le dossier: $options_dir${NC}"
61
+ fi
62
+
63
+ cat > "$claude_xml" << 'EOF'
64
+ <application>
65
+ <component name="ClaudeSettings">
66
+ <option name="mcpServers">
67
+ <map>
68
+ <entry key="spring-docs">
69
+ <value>
70
+ <MCPServerConfig>
71
+ <option name="command" value="/opt/homebrew/bin/springdocs-mcp" />
72
+ <option name="description" value="Spring Documentation MCP Server" />
73
+ <option name="timeout" value="30000" />
74
+ </MCPServerConfig>
75
+ </value>
76
+ </entry>
77
+ </map>
78
+ </option>
79
+ </component>
80
+ </application>
81
+ EOF
82
+
83
+ echo -e "${GREEN}✅ Configuration XML créée: $claude_xml${NC}"
84
+ }
85
+
86
+ echo -e "${YELLOW}🔧 Configuration des IDEs JetBrains...${NC}"
87
+ echo
88
+
89
+ # Détecter le système d'exploitation
90
+ if [[ "$OSTYPE" == "darwin"* ]]; then
91
+ # macOS
92
+ JETBRAINS_BASE="$HOME/Library/Application Support/JetBrains"
93
+ CONFIG_BASE="$HOME/.jetbrains"
94
+ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
95
+ # Linux
96
+ JETBRAINS_BASE="$HOME/.config/JetBrains"
97
+ CONFIG_BASE="$HOME/.jetbrains"
98
+ elif [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then
99
+ # Windows
100
+ JETBRAINS_BASE="$APPDATA/JetBrains"
101
+ CONFIG_BASE="$HOME/.jetbrains"
102
+ else
103
+ echo -e "${RED}❌ Système d'exploitation non supporté: $OSTYPE${NC}"
104
+ exit 1
105
+ fi
106
+
107
+ echo -e "${BLUE}📍 Dossier JetBrains détecté: $JETBRAINS_BASE${NC}"
108
+ echo
109
+
110
+ # Créer la configuration générique
111
+ echo -e "${YELLOW}📝 Création de la configuration générique...${NC}"
112
+ create_claude_config "$CONFIG_BASE"
113
+ echo
114
+
115
+ # Liste des IDEs JetBrains à configurer
116
+ JETBRAINS_IDES=(
117
+ "IntelliJIdea"
118
+ "WebStorm"
119
+ "PyCharm"
120
+ "PhpStorm"
121
+ "RubyMine"
122
+ "CLion"
123
+ "GoLand"
124
+ "Rider"
125
+ "DataGrip"
126
+ "AndroidStudio"
127
+ )
128
+
129
+ echo -e "${YELLOW}🎯 Configuration des IDEs spécifiques...${NC}"
130
+
131
+ for ide in "${JETBRAINS_IDES[@]}"; do
132
+ # Chercher les versions installées de l'IDE
133
+ if [ -d "$JETBRAINS_BASE" ]; then
134
+ ide_dirs=$(find "$JETBRAINS_BASE" -maxdepth 1 -type d -name "${ide}*" 2>/dev/null)
135
+
136
+ if [ -n "$ide_dirs" ]; then
137
+ echo -e "${BLUE}🔍 Trouvé $ide:${NC}"
138
+ echo "$ide_dirs" | while read -r ide_dir; do
139
+ echo -e " 📁 $(basename "$ide_dir")"
140
+ create_jetbrains_xml "$ide_dir"
141
+ done
142
+ else
143
+ echo -e "${YELLOW}⚠️ $ide non installé ou non trouvé${NC}"
144
+ fi
145
+ fi
146
+ done
147
+
148
+ echo
149
+ echo -e "${GREEN}🎉 Configuration terminée !${NC}"
150
+ echo
151
+ echo -e "${YELLOW}📋 Prochaines étapes:${NC}"
152
+ echo "1. 🔄 Redémarrer vos IDEs JetBrains"
153
+ echo "2. 🔌 Installer le plugin Claude (si pas déjà fait)"
154
+ echo "3. ⚙️ Vérifier les paramètres Claude dans Settings → Tools → Claude"
155
+ echo "4. 🧪 Tester avec une question Spring dans le chat Claude"
156
+ echo
157
+ echo -e "${BLUE}💡 Exemple de test:${NC}"
158
+ echo "Demandez à Claude dans votre IDE: 'Quels sont les projets Spring pour la sécurité ?'"
159
+ echo
160
+ echo -e "${YELLOW}🔧 En cas de problème:${NC}"
161
+ echo "- Vérifiez que springdocs-mcp fonctionne: echo '{\"jsonrpc\": \"2.0\", \"id\": 1, \"method\": \"tools/list\", \"params\": {}}' | springdocs-mcp"
162
+ echo "- Consultez TROUBLESHOOTING.md pour plus d'aide"
163
+ echo
164
+ echo -e "${GREEN}✨ Votre serveur MCP Spring Documentation est maintenant disponible dans tous vos IDEs JetBrains !${NC}"
@@ -0,0 +1,125 @@
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}"