OpenCode MySQL Connector
Allows interaction with MySQL databases, enabling AI agents to execute SQL queries (SELECT, INSERT, UPDATE, DELETE, DDL), list and describe tables, get table schemas, explain query execution plans, and verify database connectivity.
Click on "Install 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., "@OpenCode MySQL Connectorlist all tables with row counts"
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.
OpenCode MySQL Connector
A MySQL MCP (Model Context Protocol) server for OpenCode. Provides tools to query and explore MySQL databases via stdio transport.
Environment Variables
Variable | Required | Default |
| Yes | — |
| No |
|
| Yes | — |
| Yes | — |
| Yes | — |
Related MCP server: MySQL Custom MCP Server
Tools
Tool | Description |
| Execute a MySQL SQL query (SELECT, INSERT, UPDATE, DELETE, DDL). Supports parameterized queries. |
| List tables in a database with optional row counts and a |
| Get table structure: columns, types, nullability, keys, and defaults. |
| Get the EXPLAIN execution plan for a SQL query. |
| Get the DDL (CREATE TABLE) for all tables in a database. |
| Verify the connector can reach the MySQL server. |
Prompts
Prompt | Description |
| Get a ready-to-use table schema context for a given table name. |
Setup
npm install
npm run buildUsage
MYSQL_HOST=localhost \
MYSQL_USER=root \
MYSQL_PASSWORD=secret \
MYSQL_DATABASE=mysqldatabase \
MYSQL_PORT=3306 \
npm startLicense
ISC
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/siimleetberg/mysql_connector_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server