MCP.so
Sign In

MySQL MCP Server v2

@w2pwinlinux

Basic information

Category

Databases

Transports

stdio

Author

w2pwinlinux

About MySQL MCP Server v2

mcp-server-presupuesto-mysql1

#mcp-server#mysql#budget-management

MySQL MCP Server v2 config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "mcp-server-presupuesto-mysql1": {
      "command": "python",
      "args": [
        "test_buscar_nombre.py"
      ]
    }
  }
}

MySQL MCP Server v2 tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MySQL MCP Server v2?

MySQL MCP Server v2 is a Model Context Protocol server that provides an interface to manage and query departmental budget information stored in a MySQL database. It is designed for users who need to securely connect to a MySQL database and perform operations like querying department statuses, registering budget requests, and searching departments by name.

How to use MySQL MCP Server v2?

Install the required Python packages (mcp and mysql-connector-python), edit the db_config dictionary in the Python file to match your MySQL server settings, then start the server by running python mysql_mcp_server_v2.py. You can invoke the available functions (get_estado_completo, registrar_solicitud, buscar_por_nombre) through the MCP protocol.

Key features of MySQL MCP Server v2

  • Secure connection to a MySQL database via context manager.
  • Query complete department status by department code.
  • Register budget requests and update balances with transactions.
  • Search departments by name using partial matching (LIKE).
  • Robust error handling with connection, query, and transaction rollback.
  • Automatic rollback of transactions on errors.

Use cases of MySQL MCP Server v2

  • Retrieve the full budget status (initial budget, requested amount, available balance, paid amount) for a specific department.
  • Register a new budget request for a department and automatically recalculate the available balance.
  • Search for departments by a partial name and get their full budget information.

Frequently asked questions

1

What Python version and dependencies are required?

Python 3.6 or higher is required, along with the `mcp` and `mysql-connector-python` packages.

2

How do I configure the database connection?

Edit the `db_config` dictionary in the server file (`mysql_mcp_server_v2.py`) to set the correct MySQL host, port, user, password, and database name.

3

What database schema is expected?

The server expects a `departamentos` table containing fields `codigo`, `nombre`, `inicial`, `solicitado`, `saldo`, and `pagado`.

4

How does the server handle errors?

It implements robust error handling for database connection failures, query errors, and data validation. Transactions are automatically rolled back if an error occurs.

5

Are there any security considerations for production use?

The default configuration has hardcoded database credentials; for production, you should use environment variables or a secure configuration file.

Comments

More Databases MCP servers