xamp
The xamp server provides direct SQL access to XAMPP MariaDB/MySQL databases via five tools:
list_databases: Lists all accessible databases on the server (no arguments needed).list_tables: Lists all tables within a specified database.describe_table: Shows a table's structure, including column names, data types, and keys.read_query: Executes read-only SQL statements (SELECT,SHOW,DESCRIBE,EXPLAIN,WITH) against a specified database.write_query: Executes data-modifying SQL statements (INSERT,UPDATE,DELETE, and DDL operations) against a specified database — requires theMCP_XAMP_ALLOW_WRITE=trueenvironment variable to be set.
Provides tools to list databases, list tables, describe tables, and run read/write queries against MariaDB databases (via XAMPP or custom credentials).
Enables querying MySQL databases with tools for listing databases, tables, describe table, read query, and write query (when enabled).
Allows interaction with XAMPP's MariaDB/MySQL databases, providing tools for listing databases, tables, describing tables, and executing read/write queries.
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., "@xamp List all databases on my XAMPP server."
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.
MCP-XAMP
MCP server that gives Claude Code and OpenCode direct access to your XAMPP MariaDB/MySQL databases. Five tools: list databases, list tables, describe table, read query, write query.
Quick Start
Clone the repo
Configure your AI agent (Claude Code or OpenCode)
Start querying —
list_databases,read_query, etc.
No global install needed — runs directly with uv run.
Related MCP server: MariaDB MCP Server
Requirements
Python 3.13+
XAMPP with MariaDB/MySQL running on
localhost:3306
Installation
git clone https://github.com/<user>/mcp-xamp.git
cd mcp-xamp
uv syncVerify it works:
uv run mcp-xampOptional: install globally
If you prefer mcp-xamp available as a command anywhere:
uv tool install --python 3.13 .Then use "command": "mcp-xamp" instead of uv run --directory ... in the
configs below.
Claude Code Setup
Option A: global install (recomendado)
Instala mcp-xamp como comando global y registralo en Claude Code:
uv tool install --python 3.13 .Luego agregá el server MCP. Elegí el scope que prefieras:
# Scope project (crea .mcp.json en el directorio actual)
claude mcp add xamp \
-e MCP_XAMP_HOST=localhost \
-e MCP_XAMP_PORT=3306 \
-e MCP_XAMP_USER=root \
-e MCP_XAMP_PASSWORD= \
-e MCP_XAMP_ALLOW_WRITE=true \
-- mcp-xamp
# Scope user (disponible en todos tus proyectos)
claude mcp add --scope user xamp \
-e MCP_XAMP_HOST=localhost \
-e MCP_XAMP_PORT=3306 \
-e MCP_XAMP_USER=root \
-e MCP_XAMP_PASSWORD= \
-e MCP_XAMP_ALLOW_WRITE=true \
-- mcp-xampAjusta los valores de las variables según tu instalacion de XAMPP.
Option B: sin instalar (usando uv run)
Si preferis no instalar globalmente, apunta al directorio del repo:
claude mcp add xamp \
-e MCP_XAMP_HOST=localhost \
-e MCP_XAMP_PORT=3306 \
-e MCP_XAMP_USER=root \
-e MCP_XAMP_PASSWORD= \
-e MCP_XAMP_ALLOW_WRITE=true \
-- uv run --directory /ruta/a/mcp-xamp mcp-xampReemplaza /ruta/a/mcp-xamp con la ruta real donde clonaste el repo.
Config manual (archivo .mcp.json)
Si preferis editar el archivo a mano, tambien funciona:
{
"mcpServers": {
"xamp": {
"command": "mcp-xamp",
"args": [],
"env": {
"MCP_XAMP_HOST": "localhost",
"MCP_XAMP_PORT": "3306",
"MCP_XAMP_USER": "root",
"MCP_XAMP_PASSWORD": "",
"MCP_XAMP_ALLOW_WRITE": "true"
}
}
}
}Si no instalaste globalmente, usa "command": "uv" con los args correspondientes
(ver el .mcp.json de este repo como referencia).
Verify
Dentro de Claude Code, corre /mcp para confirmar que xamp aparece como
conectado. Despues proba:
List all databases on my XAMPP server.OpenCode Setup
Config location
OpenCode reads MCP config from opencode.json or opencode.jsonc. The file
can be in:
Location | Scope |
| Project-specific |
| Project-specific (alt) |
| Global (all projects) |
Add the MCP server
Add this block to your opencode.json or opencode.jsonc:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"xamp": {
"type": "local",
"command": ["uv", "run", "--directory", "/path/to/mcp-xamp", "mcp-xamp"],
"enabled": true,
"environment": {
"MCP_XAMP_ALLOW_WRITE": "true"
}
}
}
}Replace /path/to/mcp-xamp with your actual clone path.
If you used uv tool install, simplify to:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"xamp": {
"type": "local",
"command": ["mcp-xamp"],
"enabled": true,
"environment": {
"MCP_XAMP_ALLOW_WRITE": "true"
}
}
}
}Verify
Restart OpenCode, then try:
Show me all databases on the xamp server. use xamp toolsEnvironment Variables
All configuration goes through environment variables. Sensible defaults for a standard XAMPP installation.
Variable | Default | Description |
|
| MariaDB/MySQL host |
|
| MariaDB/MySQL port |
|
| Database user |
| (empty) | Database password |
|
| Set to |
Credentials are read from environment variables only. They never appear in tool arguments, log output, or error messages.
Tools
Tool | Description | Requires |
| Show all accessible databases | — |
| Show tables in a database |
|
| Show columns, types, and keys |
|
| Execute SELECT / SHOW / DESCRIBE / EXPLAIN |
|
| Execute INSERT / UPDATE / DELETE / DDL |
|
Security
Read-only by default. Write operations require
MCP_XAMP_ALLOW_WRITE=true.Credentials never logged. Host, port, user, and password are stripped from error messages.
Credentials only from env vars. No tool parameters, no config files, no CLI args.
Connection-per-query. Each tool invocation opens and closes its own connection — no shared state, no stale connections.
XAMPP default is root with no password. Create a dedicated user for production use:
CREATE USER 'mcp_agent'@'127.0.0.1' IDENTIFIED BY 'secure_password'; GRANT SELECT ON *.* TO 'mcp_agent'@'127.0.0.1';
Development
# Install dev dependencies
uv sync --group dev
# Run tests
uv run pytest -v --cov=src/mcp_xamp
# Lint
uv run ruff check src/ tests/
# Format
uv run ruff format src/ tests/License
MIT — see LICENSE.
Available Tools
5 toolsdescribe_tableA
Describe la estructura de una tabla (columnas, tipos, claves).
Inputs: database (required), table (required).
list_databasesA
Lista todas las bases de datos accesibles en el servidor MariaDB/MySQL.
Inputs: no named parameters.
list_tablesA
Lista todas las tablas en una base de datos.
Inputs: database (required).
read_queryA
Ejecuta una consulta SQL de solo lectura (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH).
Inputs: database (required), query (required).
write_queryA
Ejecuta una consulta SQL de escritura (INSERT, UPDATE, DELETE, DDL). Requiere MCP_XAMP_ALLOW_WRITE=true.
Inputs: database (required), query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Most tools have distinct purposes, but read_query can also describe a table, creating some overlap with describe_table. However, the specialized describe_table provides a simpler interface.
All tools follow a consistent verb_noun pattern with snake_case: describe_table, list_databases, list_tables, read_query, write_query.
Five tools is well-scoped for a database server, covering essential operations without unnecessary bloat.
The set covers listing databases and tables, describing table structure, and arbitrary read/write SQL queries, including DDL via write_query. This provides full CRUD and schema management capabilities.
Maintenance
Related MCP Connectors
Hosted MySQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Related MCP Servers
- AlicenseCqualityDmaintenanceAn MCP server that enables MySQL database integration with Claude. You can execute SQL queries and manage database connections.29MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server implementation that enables Claude to execute read-only queries against MariaDB databases and explore database schemas through natural language.20MIT
- AlicenseBqualityDmaintenanceMCP server that allows Claude AI to interact directly with MySQL databases, enabling query execution and table information retrieval through natural language.14 npm4MIT
- AlicenseNot gradedqualityCmaintenanceMySQL MCP Server enables Claude Desktop and Claude Code to execute SQL queries, explore databases, Webview to add or enable Databases, Connections, and interact with your MySQL data - all through a secure, permission-controlled interface.18 npm1MIT