MCP MySQL
One-line summary: This is a read-only MySQL MCP server that lets AI assistants explore a database's structure and run safe read-only SQL queries.
Test the MySQL connection and report the database name and version (
test_connection)List all tables and views in the configured database (
list_tables,list_views)Inspect a table's columns, indexes, and foreign keys (
describe_table,list_indexes,list_foreign_keys)List foreign keys for a single table or the entire database (
list_foreign_keys)Search for tables containing a given column name, with
%wildcard support (find_column)Preview sample rows (max 100) and count rows in a table (
sample_rows,count_rows)Run free-form read-only SQL:
SELECT,SHOW,DESCRIBE,EXPLAIN,WITH, with an automatic row limit (1–1000) (execute_query)
Provides tools for testing connections, listing tables, describing table columns, and executing read-only SQL queries (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH) on a MySQL database.
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., "@MCP MySQLlist all tables in the database"
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 Database
Servidores MCP en Python para conectar asistentes de IA (Cursor, Claude, Gemini, etc.) a MySQL, Oracle, SQL Server, Informix y PostgreSQL.
Hay cinco servidores independientes en el mismo repo:
Servidor | Módulo | Entrada MCP | Driver extra en la PC |
MySQL |
|
| No (pip alcanza) |
Oracle |
|
| No (pip / thin mode) |
PostgreSQL |
|
| No (pip / |
SQL Server |
|
| Sí — ODBC Driver 17/18 |
Informix |
|
| Sí — Client SDK / ODBC IBM |
Requisitos
Python 3.11+
Acceso a la(s) base(s) que vayas a usar
SQL Server e Informix: además de
pip install -e ., debes instalar el driver nativo en cada máquina (ver sección abajo)
Related MCP server: MCP MySQL Server
Drivers adicionales (obligatorio para SQL Server e Informix)
pip install -e . instala pyodbc, pero no instala el driver del sistema. Sin eso, la conexión falla.
SQL Server — ODBC Driver
Descarga e instala Microsoft ODBC Driver 18 for SQL Server (x64):
https://learn.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-serverSi el instalador lo pide, instala también el Visual C++ Redistributable.
Verifica en PowerShell:
Get-OdbcDriver | Where-Object { $_.Name -like "*SQL Server*" }En
.envusa el nombre exacto del driver, por ejemplo:
SQLSERVER_DRIVER=ODBC Driver 18 for SQL ServerInformix — Client SDK / ODBC
Descarga el IBM Informix Client SDK (incluye el ODBC Driver). Requiere cuenta/licencia IBM o HCL:
Instala el Client SDK para Windows x64.
Verifica en Orígenes de datos ODBC (64 bits) que aparezca algo como
IBM INFORMIX ODBC DRIVER.En
.env:
INFORMIX_DRIVER=IBM INFORMIX ODBC DRIVER
INFORMIX_SERVER=ol_informix1410INFORMIX_SERVER es el nombre del servidor Informix (INFORMIXSERVER), no solo el host.
Instalación del proyecto
git clone <url-del-repo>
cd MCP-DATABASE
python -m venv .venvActiva el entorno virtual:
# Windows (PowerShell)
.\.venv\Scripts\Activate.ps1
# Linux / macOS
source .venv/bin/activateInstala el paquete (incluye los cinco servidores):
pip install -e .Crea tu archivo de credenciales (no se sube a git):
# Windows
Copy-Item .env.example .env
# Linux / macOS
cp .env.example .envEdita .env con las bases que uses (ver .env.example).
Setup rápido (recomendado)
Este repo incluye scripts que crean el .venv, instalan el paquete y copian .env.example → .env si no existe:
Linux / macOS:
./setup_claude_code.shWindows (PowerShell):
.\setup_claude_code.ps1Si PowerShell bloquea el script por la execution policy, corre una vez (o pídeselo a tu admin):
Set-ExecutionPolicy -Scope CurrentUser RemoteSignedNinguno de los dos scripts toca .env con tus credenciales ni registra el MCP automáticamente — al terminar, imprimen el comando claude mcp add exacto (con la ruta al Python del .venv ya resuelta) para que:
Edites
.enva mano con las credenciales de las bases que vayas a usar.Corras ese
claude mcp addpor cada motor que quieras registrar (ver sección Claude Code (CLI) abajo).
Configurar el cliente MCP
Cada servidor se registra por separado (fusiona sin borrar otros MCPs):
python -m mcp_mysql setup
python -m mcp_oracle setup
python -m mcp_postgresql setup
python -m mcp_sqlserver setup
python -m mcp_informix setupOpciones comunes:
python -m mcp_postgresql setup --client claude
python -m mcp_postgresql setup --dry-run
python -m mcp_postgresql setup --printTambién: mcp-mysql-setup / mcp-oracle-setup / mcp-postgresql-setup / mcp-sqlserver-setup / mcp-informix-setup.
Recarga los MCP del cliente y prueba con test_connection.
Claude Code (CLI)
El comando setup de este repo solo soporta --client cursor y --client claude (Claude Desktop). Si usas Claude Code (la CLI), regístralo con el comando nativo claude mcp add, ejecutado desde la raíz del repo:
Linux / macOS:
claude mcp add mysql -- $(pwd)/.venv/bin/python -m mcp_mysql
claude mcp add oracle -- $(pwd)/.venv/bin/python -m mcp_oracle
claude mcp add postgresql -- $(pwd)/.venv/bin/python -m mcp_postgresql
claude mcp add sqlserver -- $(pwd)/.venv/bin/python -m mcp_sqlserver
claude mcp add informix -- $(pwd)/.venv/bin/python -m mcp_informixWindows (PowerShell):
claude mcp add mysql -- "$PWD\.venv\Scripts\python.exe" -m mcp_mysql
claude mcp add oracle -- "$PWD\.venv\Scripts\python.exe" -m mcp_oracle
claude mcp add postgresql -- "$PWD\.venv\Scripts\python.exe" -m mcp_postgresql
claude mcp add sqlserver -- "$PWD\.venv\Scripts\python.exe" -m mcp_sqlserver
claude mcp add informix -- "$PWD\.venv\Scripts\python.exe" -m mcp_informixRegistra solo los motores que vayas a usar (necesitas las credenciales correspondientes ya cargadas en .env). Ejecuta los comandos desde la raíz del repo; si no, reemplaza $(pwd) / $PWD por la ruta absoluta al proyecto.
Verifica con:
claude mcp listY quita un servidor mal configurado con:
claude mcp remove <nombre>Luego prueba con la tool test_connection dentro de una sesión de Claude Code.
Oracle: varias conexiones (perfiles)
Un solo MCP oracle puede apuntar a varias bases. En .env:
Multi Connection
ORACLE_CONNECTIONS=B1,B2
ORACLE_DEFAULT=B1
ORACLE_B1_USER=
ORACLE_B1_PASSWORD=
ORACLE_B1_HOST=
ORACLE_B1_PORT=
ORACLE_B1_SID=
ORACLE_B2_USER=
ORACLE_B2_PASSWORD=
ORACLE_B2_HOST=
ORACLE_B2_PORT=
ORACLE_B2_SID=
Uso en tools: list_connections, luego list_tables(connection="qa"), execute_query(..., connection="qa"), etc.
Si omites connection, se usa ORACLE_DEFAULT.
El modo simple (una sola DB) sigue funcionando con ORACLE_USER / ORACLE_DSN sin ORACLE_CONNECTIONS.
Cliente | Archivo por defecto |
Cursor Windows |
|
Cursor Linux |
|
Gemini Windows |
|
Gemini Linux |
|
Claude Desktop Windows |
|
Claude Desktop macOS/Linux |
|
Claude Code (CLI): no uses
--client claudepara esto — ese modo apunta a Claude Desktop, no a Claude Code. Usaclaude mcp addcomo se explica en la sección Claude Code (CLI) arriba.
Tools disponibles
Las mismas tools en los cinco servidores (solo lectura):
Tool | Descripción |
| Lista perfiles Oracle configurados (solo Oracle por ahora) |
| Verifica la conexión |
| Lista tablas |
| Lista vistas |
| Columnas de una tabla |
| Índices de una tabla |
| FKs de una tabla o de toda la DB |
| Busca columnas por nombre ( |
| Muestra filas de ejemplo (máx. 100) |
| Cuenta filas de una tabla |
| SQL libre de solo lectura |
MySQL / PostgreSQL: SELECT, SHOW/EXPLAIN donde aplique, WITH (usa LIMIT).
Oracle / SQL Server / Informix: SELECT / WITH (límites con FETCH FIRST / TOP / FIRST).
execute_query rechaza múltiples sentencias (;) y keywords de escritura (INSERT, UPDATE, DELETE, DROP, etc.). En producción usa además un usuario DB read-only.
Reportes fijos (solo MySQL)
Para reportes que siempre deben ejecutar la misma query (y no una armada por el modelo), el servidor MySQL expone tools que leen el SQL desde resources/querys/:
Tool | Query | Parámetros |
|
|
|
El SQL se lee del archivo en cada llamada: si editas
hours.sql, el cambio aplica sin reiniciar el MCP.hours.sqlusa los marcadores%(desde)sy%(hasta)s; no se puede pegar tal cual en otro cliente SQL. Para eso estáhours.original.sql(con fechas fijas).Estos reportes no pasan por el validador de
execute_query(la query usa la funciónREPLACE()) ni se recortan conLIMIT.
Notas
Los comandos
python -m mcp_*arrancan el servidor stdio; lo lanza el cliente.Las credenciales viven en
.env, no en el JSON del cliente.MySQL, Oracle y PostgreSQL no requieren instalador de driver aparte (en el flujo típico).
SQL Server e Informix sí requieren driver/SDK instalado en el sistema además de
pyodbc.
Estructura
MCP-DATABASE/
├── pyproject.toml
├── .env.example
├── src/
│ ├── mcp_mysql/
│ ├── mcp_oracle/
│ ├── mcp_postgresql/
│ ├── mcp_sqlserver/
│ └── mcp_informix/
├── resources/
│ └── querys/ # SQL de reportes fijos (ej. hours.sql)
└── README.mdPrueba

Available Tools
10 toolscount_rowsC
Count rows in a table.
Args: table_name: Table name.
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It implies a read-only operation, but says nothing about performance on large tables, required permissions, whether the count is exact or estimated, or behavior on missing/invalid tables.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Very short and front-loaded with the core action in the first sentence. The Args block is redundant with the schema but minimal enough not to obscure the point.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return-value explanation is not required, and the single required parameter keeps the surface small. But with zero annotations and no behavioral or usage context, the definition leaves the agent without enough to confidently route or call it in edge cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for the single undocumented parameter. Instead it merely restates 'table_name: Table name.', which duplicates the schema title and adds no information such as naming conventions or identifier format.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (count) and resource (rows in a table), which is unambiguous on its own. However, it does nothing to distinguish itself from siblings like sample_rows or execute_query, which could also return row counts, so an agent gets no help choosing between them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use guidance, no mention of when to prefer this over execute_query or sample_rows, and no stated prerequisites. The description only states what the tool does, leaving selection entirely to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
describe_tableC
Describe the columns of a MySQL table.
Args: table_name: Name of the table to inspect.
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It never states that this is a read-only operation, what happens when the table does not exist, whether privileges are needed, or how the columns are returned. Only the trivially implied 'inspect' behavior is conveyed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded one-line purpose with a short Args block; nothing is padded. The Args block is mildly redundant with the input schema, which keeps it from a 5.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple single-parameter read tool that has an output schema, the description covers the essential purpose and parameter. It is nonetheless thin on the behavioral edges (missing table, permissions) that an agent calling against a live MySQL instance would want.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There is a single parameter and schema description coverage is 0%, so the description does some work by explaining table_name as the 'Name of the table to inspect.' However, this largely duplicates the schema's own title ('Table Name') and adds no format, casing, or qualification details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource: 'Describe the columns of a MySQL table.' This is clearly distinguishable from siblings like list_tables, list_indexes, or find_column because it targets table column metadata. It stops short of explicitly naming any sibling, but the resource is specific enough for selection.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use guidance, no prerequisites, and no mention of alternatives such as find_column or execute_query. The agent must infer that this is a schema-inspection step, which is a natural but unstated usage condition.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_queryA
Execute a read-only SQL query (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH).
Args: query: SQL query to run. limit: Max rows when the query has no LIMIT (1-1000).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose the key behavioral trait: the operation is read-only and restricted to a whitelist of statement types. It still omits what happens when a write statement is submitted (rejected? error?), execution limits/timeouts, and whether the limit truncation is silent, which matters for a query-execution tool handling arbitrary input.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences plus a compact Args block; the read-only constraint and statement whitelist are front-loaded before parameter detail. No filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be described, and the safety profile and both parameters are covered. The remaining gap is sibling routing in a crowded tool set and the error behavior on disallowed statements.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate, and it largely does: it documents both parameters and adds real semantics for limit ('Max rows when the query has no LIMIT', range 1-1000) that the schema does not express. The query parameter description ('SQL query to run') is thin, but the allowed-statement list in the opening sentence fills that gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (Execute) plus resource (SQL query) and enumerates the permitted statement classes (SELECT, SHOW, DESCRIBE, EXPLAIN, WITH), which makes the scope unambiguous. It does not, however, differentiate itself from the specialized siblings like sample_rows or describe_table, so an agent must infer that this is the generic escape hatch.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use or when-not-to-use guidance and no mention of any alternative tool. Given a sibling set containing sample_rows, count_rows, describe_table and others, the description should route the agent (e.g., 'use this when no specialized tool fits') but does not.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_columnA
Find tables that contain a column name (supports % wildcards).
Args: column_name: Exact name or pattern, e.g. customer_id or %email%.
| Name | Required | Description | Default |
|---|---|---|---|
| column_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose the wildcard-matching behavior ('supports % wildcards'), which is genuine behavioral context. However, it says nothing about case sensitivity, whether the search spans all schemas/databases, or performance/scope limits on a catalog-wide scan.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short, front-loaded lines: the core behavior first, then a parameter note with examples. Nothing is padded, though the parenthetical and the example overlap slightly in conveying the same wildcard idea.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return-format explanation is not needed, and one parameter is the only input. What is missing is search scope (all databases/schemas?), matching semantics, and any routing guidance relative to execute_query for the same information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate, and it does: it explains the exact-name vs. pattern distinction and gives concrete examples ('customer_id' or '%email%'). That is real semantic value beyond the bare 'Column Name' schema title, though it omits wildcard placement rules (prefix vs. suffix).
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource ('Find tables that contain a column name'), which is clearly distinct from siblings like list_tables, describe_table, or execute_query. It does not explicitly name or contrast with those siblings, but the purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no explicit when-to-use or when-not-to-use guidance, and no alternative such as execute_query against information_schema is mentioned. Usage is only implied by the stated purpose (schema discovery by column name), which fits the 'implied usage' bar.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_foreign_keysA
List foreign keys for one table, or all in the current database.
Args: table_name: Optional table name. Empty = all foreign keys.
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations, so the description bears the full burden. It discloses the key behavioral trait that an empty table_name returns all foreign keys, but never confirms the operation is read-only or notes any limits/error behavior if a table does not exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, front-loaded with the purpose, and the parameter note follows. The 'Args:' docstring formatting is slightly mechanical but adds no waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be explained. For a single-parameter, read-only inspection tool, purpose and parameter semantics are covered; only read-only confirmation and error behavior are unstated, which are minor.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate, and it does: table_name is documented as optional and empty meaning 'all foreign keys'. That fully disambiguates the single parameter's semantics beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Specific verb+resource ('List foreign keys') with clear scope: one table or the whole database. It is naturally distinguishable from list_tables, list_views, and list_indexes by resource, though it doesn't name any sibling explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the resource (inspect FK relationships for a table or schema) but there is no explicit when-to-use guidance, no note on when to prefer describe_table instead, and no stated prerequisites such as needing an existing connection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_indexesC
List indexes for a MySQL table.
Args: table_name: Name of the table.
| Name | Required | Description | Default |
|---|---|---|---|
| table_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It says only that indexes are listed; it does not disclose read-only nature, required permissions, output shape, or any other operational trait beyond the bare action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is very short and front-loads the action. The Args block is somewhat redundant for a single parameter, but the text contains no waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter listing tool with an output schema, the definition is mostly complete: it states the operation and names the sole parameter. It lacks usage context and behavioral detail, but the output schema covers return values.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description should compensate. It says 'table_name: Name of the table,' which merely restates the parameter name and schema title without adding format, qualifier, or database-context semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: listing indexes for a MySQL table. An agent can understand what it does, but it does not differentiate from siblings such as describe_table, which also inspects table structure.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance about when to use this tool versus alternatives. It does not mention describe_table, list_foreign_keys, or any conditions that would select this tool over another schema-inspection sibling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_tablesA
List all tables in the configured MySQL database.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are supplied, so the description carries the full burden. It usefully discloses that the scope is a single 'configured' database (i.e. no database parameter), but says nothing about ordering, pagination, or permissions for a read operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no filler. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be explained. For a zero-parameter listing tool the description is essentially complete, though it could note ordering or that it reflects only the connected database's schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is no parameter semantics to explain; baseline of 4 applies. The description's mention of the 'configured MySQL database' implicitly clarifies that no database selector is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (List) and resource (tables) plus scope (configured MySQL database). It is distinguishable from list_views and list_indexes by resource, though it does not explicitly name those siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied by the name and resource; there is no explicit when-to-use, when-not-to-use, or routing to alternatives such as list_views or describe_table. For a simple enumeration tool the intent is inferable, but no guidance is offered.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_viewsA
List all views in the configured MySQL database.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. 'List' correctly signals a read-only operation and the scope is stated, but there is no mention of pagination, empty results, or permissions on the configured database.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no wasted words. Size is well matched to a trivial zero-parameter listing tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be explained. For a zero-param read-only tool with no annotations, the description covers purpose and scope adequately; only pagination/edge-case behavior is unaddressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so the baseline is 4. The description has no parameter semantics to add, and none are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (List) and resource (views) with explicit scope (configured MySQL database). It is distinct from the sibling list_tables/list_indexes, though the description does not explicitly contrast itself with them.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use guidance, and no alternative sibling is named. Usage is implied by the self-evident read-only listing purpose and the 'configured database' scope note.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sample_rowsB
Return sample rows from a table.
Args: table_name: Table name. limit: Max rows (1-100). Default 10.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| table_name | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It is implicitly a safe read operation and it does disclose the limit range (1-100) and default (10), but it never says how rows are selected — random sample versus first N — which is the single most consequential behavioral detail for a tool called 'sample_rows'.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The core purpose is front-loaded in a single sentence, and the args section is terse. The docstring formatting is slightly more verbose than needed but nothing is wasted.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need no explanation and the low complexity of a 2-parameter tool keeps the bar low. However, with zero annotations and zero schema descriptions, the sampling semantics and any usage guidance are missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It adds real value for 'limit' by naming the 1-100 range (the schema only shows the default), but 'table_name: Table name.' is pure tautology and adds nothing over the schema's title.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Return sample rows from a table'), so the agent knows exactly what the operation does. It does not differentiate itself from the closest siblings (count_rows, execute_query), which might also be used to inspect a table.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no when-to-use or when-not-to-use guidance. Nothing tells the agent why it should sample rows rather than run count_rows or an arbitrary execute_query, so the routing decision is left entirely to inference from the name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
test_connectionA
Test the MySQL connection and return database name and version.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden, and it does disclose that the operation returns the database name and version, implying a non-destructive diagnostic read. It does not say whether it can fail/hang on bad credentials or how errors surface, which matters for a connection test.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with zero filler; the action and the return payload are both packed into it without waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With an output schema present, the description needn't detail return values, and with no parameters there is little else to cover. It is nearly complete, missing only failure/error behavior for a test tool that can plausibly fail.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there is nothing to disambiguate and the baseline is 4. The description correctly introduces no nonexistent parameter concepts.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Test the MySQL connection') and adds what it returns ('database name and version'). The purpose is unmistakable and functionally distinct from the listing/query siblings, though it never names them for contrast.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is only implied as a connectivity/health check before issuing other queries; there is no explicit statement of when to prefer this over running execute_query, nor any precondition guidance. Adequate but leaves the agent to infer the trigger condition.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
10 tool updates
v0.1.0- First observed
count_rows - First observed
describe_table - First observed
execute_query - First observed
find_column - First observed
list_foreign_keys - First observed
list_indexes - First observed
list_tables - First observed
list_views - First observed
sample_rows - First observed
test_connection
TDQS
Scored across 10 tools
Most tools have clearly distinct purposes (list_tables vs list_views vs describe_table, etc.), but execute_query overlaps with nearly all specialized tools since it can run arbitrary read-only SQL including SHOW, DESCRIBE, and SELECT. The descriptions help, but an agent might still choose execute_query instead of the dedicated tool for some tasks.
All tool names follow a consistent snake_case verb_noun pattern (test_connection, list_tables, describe_table, find_column, etc.), making the set highly predictable and readable.
With 10 tools, the server is well-scoped for read-only MySQL introspection and querying. Each tool serves a specific purpose, and the count is neither too thin nor too heavy.
The surface covers connection testing, schema listing (tables, views, indexes, foreign keys), column discovery, and data sampling/counting. Minor gaps like retrieving DDL (SHOW CREATE TABLE) or listing triggers/procedures exist, but these can be handled via execute_query.
Maintenance
Related MCP Connectors
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
Guard AI agents' PostgreSQL/MySQL access via MCP: SQL audit, auth, masking, write approval
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables secure interaction with MySQL databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to safely query MySQL databases with read-only access by default, supporting table listing, structure inspection, and SQL queries with optional write operation control.11 npmMIT
- AlicenseAqualityCmaintenanceEnables AI assistants to safely query MySQL databases with read-only access, featuring SQL injection protection, connection pooling, and automatic query limits for secure database exploration.472 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to securely interact with MySQL databases, including listing tables, viewing schemas, and executing read-only SQL queries through natural language.6-