xampp-mcp 0.1.0 → 1.0.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dony-aep
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,42 +2,16 @@
2
2
 
3
3
  MCP server para administrar XAMPP y MySQL en Windows desde clientes MCP por `stdio` (VS Code, Copilot agents, etc.).
4
4
 
5
- ## Alcance v1
6
-
7
- - Windows + XAMPP local.
8
- - Transporte MCP: `stdio`.
9
- - Estado de Apache/MySQL y recomendación de arranque manual desde XAMPP.
10
- - Administración de base de datos (crear DB, tablas, usuarios, grants, import/export).
11
- - Consultas SQL de solo lectura y ejecución general con confirmación explícita.
12
- - Inspección de estado de base de datos (resumen y detalle de tablas).
13
-
14
5
  ## Requisitos
15
6
 
16
- - Node.js 20+.
17
- - XAMPP instalado (por defecto en `C:\xampp`).
18
- - Permisos de sistema suficientes para las acciones de servicio si usas modo `service`.
19
-
20
- ## Configuración
21
-
22
- Variables opcionales de entorno:
23
-
24
- - `XAMPP_DIR` (default `C:\xampp`)
25
- - `XAMPP_DEFAULT_MODE` (`console` | `service`, default `console`)
26
- - `XAMPP_APACHE_SERVICE` (default `Apache2.4`)
27
- - `XAMPP_MYSQL_SERVICE` (default `mysql`)
28
- - `MYSQL_HOST` (default `127.0.0.1`)
29
- - `MYSQL_PORT` (default `3306`)
30
- - `MYSQL_USER` (default `root`)
31
- - `MYSQL_PASSWORD` (sin default)
32
-
33
- ## Scripts
7
+ - Windows
8
+ - Node.js 20+
9
+ - XAMPP instalado (por defecto en `C:\xampp`)
34
10
 
35
- - `npm run dev`: ejecución directa TypeScript.
36
- - `npm run build`: compila a `dist`.
37
- - `npm run start`: ejecuta servidor compilado.
38
- - `npm run lint`: typecheck.
11
+ ## Instalación
39
12
 
40
- ## Uso como paquete npm
13
+ Paquete npm:
14
+ - https://www.npmjs.com/package/xampp-mcp
41
15
 
42
16
  Instalación global:
43
17
 
@@ -45,86 +19,52 @@ Instalación global:
45
19
  npm install -g xampp-mcp
46
20
  ```
47
21
 
48
- Ejecución directa:
49
-
50
- ```powershell
51
- xampp-mcp
52
- ```
53
-
54
22
  Sin instalación global:
55
23
 
56
24
  ```powershell
57
25
  npx -y xampp-mcp
58
26
  ```
59
27
 
60
- Ejemplo de configuración MCP en VS Code:
28
+ ## Configuración en VS Code
61
29
 
62
- ```jsonc
63
- {
64
- "servers": {
65
- "xamppMcp": {
66
- "type": "stdio",
67
- "command": "xampp-mcp",
68
- "env": {
69
- "XAMPP_DIR": "C:\\xampp",
70
- "XAMPP_DEFAULT_MODE": "console"
71
- }
72
- }
73
- }
74
- }
75
- ```
76
-
77
- Si usas `npx` en vez de instalación global:
30
+ Ejemplo recomendado en `.vscode/mcp.json`:
78
31
 
79
32
  ```jsonc
80
33
  {
81
- "servers": {
82
- "xamppMcp": {
83
- "type": "stdio",
84
- "command": "npx",
85
- "args": ["-y", "xampp-mcp"],
86
- "env": {
87
- "XAMPP_DIR": "C:\\xampp",
88
- "XAMPP_DEFAULT_MODE": "console"
89
- }
90
- }
91
- }
34
+ "servers": {
35
+ "xamppMcp": {
36
+ "type": "stdio",
37
+ "command": "npx",
38
+ "args": ["-y", "xampp-mcp"],
39
+ "env": {
40
+ "XAMPP_DIR": "C:\\xampp",
41
+ "XAMPP_DEFAULT_MODE": "console"
42
+ }
43
+ }
44
+ }
92
45
  }
93
46
  ```
94
47
 
95
- ## Publicación npm
96
-
97
- ```powershell
98
- npm login
99
- npm version patch
100
- npm publish
101
- ```
102
-
103
- ## Seguridad
48
+ Variables opcionales:
104
49
 
105
- - No hay tool de shell genérico.
106
- - Operaciones sensibles requieren `confirmed: true`.
107
- - Validación estricta de identificadores para evitar inyección SQL en DDL común.
108
- - En v1 el transporte es local `stdio`; no se incluye HTTP/OAuth.
109
- - El control de arranque/parada de Apache/MySQL se mantiene fuera del catálogo activo; el usuario debe operarlo manualmente desde XAMPP.
110
- - Si MySQL/Apache están apagados, las tools deben pedir activación manual en XAMPP Control Panel y esperar confirmación del usuario antes de reintentar.
111
-
112
- ## Reglas de nombres
50
+ - `XAMPP_DIR` (default `C:\xampp`)
51
+ - `XAMPP_DEFAULT_MODE` (`console` | `service`, default `console`)
52
+ - `XAMPP_APACHE_SERVICE` (default `Apache2.4`)
53
+ - `XAMPP_MYSQL_SERVICE` (default `mysql`)
54
+ - `MYSQL_HOST` (default `127.0.0.1`)
55
+ - `MYSQL_PORT` (default `3306`)
56
+ - `MYSQL_USER` (default `root`)
57
+ - `MYSQL_PASSWORD` (sin default)
113
58
 
114
- - Usar `snake_case` para nombres de base, tablas y demás identificadores.
115
- - Regla: empezar por letra o `_`, y luego usar solo letras, números y `_`.
116
- - No usar `-` (guion medio); el MCP devuelve sugerencia automática reemplazando `-` por `_`.
117
- - Ejemplo recomendado: `database-example-2026` → `database_example_2026`.
59
+ ## Notas de uso importantes
118
60
 
119
- ## Codificación de texto
61
+ - Si Apache/MySQL están apagados, primero debes iniciarlos manualmente desde XAMPP Control Panel.
62
+ - Para nombres de base/tabla usa `snake_case` (`_`) y evita `-`.
63
+ - El MCP usa UTF-8 (`utf8mb4`) para preservar tildes y caracteres especiales.
120
64
 
121
- - Política única: usar UTF-8 (`utf8mb4`) para español e inglés.
122
- - No hace falta cambiar encoding según idioma o contexto; se conserva el texto original (con o sin tildes).
123
- - `db_create` crea bases con `utf8mb4` / `utf8mb4_unicode_ci` para evitar problemas con acentos y caracteres especiales.
124
- - En ejecución SQL, el MCP fuerza `SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci` por sesión para evitar conversiones `cp850` en Windows.
65
+ Lista completa de tools:
66
+ - [docs/tools.md](docs/tools.md)
125
67
 
126
- ## Próximos pasos sugeridos
68
+ ## Licencia
127
69
 
128
- - Agregar tareas asíncronas para imports/exports largos.
129
- - Añadir control de logs (`apache/error.log`, `mysql/error.log`) como tools read-only.
130
- - Extender a transporte HTTP con OAuth 2.1 para escenarios remotos.
70
+ Este proyecto está bajo licencia MIT. Consulta [LICENSE](LICENSE).
package/dist/server.js CHANGED
@@ -10,7 +10,7 @@ async function main() {
10
10
  const toolRegistry = createToolRegistry(environment);
11
11
  const server = new Server({
12
12
  name: "xampp-mcp",
13
- version: "0.1.0",
13
+ version: "1.0.0",
14
14
  }, {
15
15
  capabilities: {
16
16
  tools: {},
package/package.json CHANGED
@@ -1,7 +1,15 @@
1
1
  {
2
2
  "name": "xampp-mcp",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "MCP server for XAMPP and MySQL administration on Windows",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/dony-aep/xampp-mcp.git"
8
+ },
9
+ "homepage": "https://github.com/dony-aep/xampp-mcp#readme",
10
+ "bugs": {
11
+ "url": "https://github.com/dony-aep/xampp-mcp/issues"
12
+ },
5
13
  "type": "module",
6
14
  "main": "dist/server.js",
7
15
  "bin": {
@@ -10,6 +18,7 @@
10
18
  "files": [
11
19
  "dist",
12
20
  "README.md",
21
+ "LICENSE",
13
22
  "docs",
14
23
  "package.json"
15
24
  ],
@@ -31,7 +40,7 @@
31
40
  "mysql",
32
41
  "vscode"
33
42
  ],
34
- "license": "UNLICENSED",
43
+ "license": "MIT",
35
44
  "dependencies": {
36
45
  "@modelcontextprotocol/sdk": "^1.22.0"
37
46
  },