R

Read MySQL

Secure read-only MySQL database access to execute queries and analyze data patterns.

87 views
0 installs
Updated Sep 10, 2025
Not audited
Secure read-only MySQL database access to execute queries and analyze data patterns.
  1. Prepare Your MySQL Connection Information
    Gather the following details of your MySQL server:

    • Host (e.g., 127.0.0.1 or the remote server IP)
    • Port (default: 3306)
    • Username (e.g., root)
    • Password
    • Database name
      Tip: If you're running MySQL locally with a Unix socket, also get the socket path (e.g., /tmp/mysql.sock)
  2. Click the "Install Now" Button
    In your FastMCP interface, use the "Install Now" button to begin adding the MCP server for MySQL.

  3. Fill in Environment Values in the FastMCP Connection Interface
    Enter the following required environment values:

    • MYSQL_HOST (e.g., 127.0.0.1)
    • MYSQL_PORT (e.g., 3306)
    • MYSQL_USER (e.g., root)
    • MYSQL_PASS (your MySQL password)
    • MYSQL_DB (your database name, or leave empty for multi-DB mode)

    For Unix Socket: Use MYSQL_SOCKET_PATH instead of MYSQL_HOST and MYSQL_PORT.

  4. Review and (Optionally) Customize Additional Environment Values
    You can set additional values for connection pooling, security, logging, and permissions. For example:

    • MYSQL_POOL_SIZE (default: 10)
    • MYSQL_QUERY_TIMEOUT (default: 30000)
    • ALLOW_INSERT_OPERATION, ALLOW_UPDATE_OPERATION, ALLOW_DELETE_OPERATION (default: false; set to true only if needed for write access)
    • MYSQL_SSL (set to true if your MySQL uses SSL connections)
  5. (Optional) Enabling Write Operations
    If you want Claude or other agents to be able to insert, update, or delete data, set the relevant operation flags to "true":

    • ALLOW_INSERT_OPERATION=true
    • ALLOW_UPDATE_OPERATION=true
    • ALLOW_DELETE_OPERATION=true
      Warning: Only enable these if you trust the agent with write access.
  6. (Optional) Advanced: Multi-DB or Schema Permissions

    • To enable your agent to access multiple databases, leave MYSQL_DB empty.
    • For schema or database-specific permissions, set variables like SCHEMA_INSERT_PERMISSIONS=dev:true,prod:false.
  7. Verify Connection
    After saving the configuration, use the testing tools in FastMCP to ensure the MySQL connection is successful.

  8. Save and Complete the Setup
    Once the test passes, save your MCP server configuration.


Notes:

  • For remote/production servers, ensure your MySQL user has the correct privileges and, if needed, that the MySQL server is accessible from the network where FastMCP runs.
  • Consult your organization’s security policies before enabling write/delete operations.

You are now ready to use the MySQL MCP server with FastMCP!

Quick Start

View on GitHub

More for Database

View All →

More for Monitoring

View All →

Similar MCP Servers

Report Issue

Thank you! Your issue report has been submitted successfully.