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 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. |
| Switch the active database used by subsequent tools that do not specify one. |
| 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
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceA MySQL MCP server for local stdio clients, enabling database queries and management with read-only/write modes, audit logging, and configurable security.655MIT
- AlicenseCqualityCmaintenanceConnects MCP-compatible clients like Claude to a MySQL database, enabling schema inspection and read/write queries via stdio transport.55191MIT
- FlicenseNot gradedqualityCmaintenanceA generic MCP server for MySQL operations, enabling listing databases/tables, describing schemas, running read-only SQL, and optionally executing write SQL with logging.1
- AlicenseNot gradedqualityAmaintenanceMCP server that connects to SQL databases (SQLite, PostgreSQL, MSSQL, MySQL) and provides tools to run read-only queries, list schemas/tables, and manage connections via stdio transport.Apache 2.0
Related MCP Connectors
MCP server for managing Prisma Postgres.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
MCP Server for JFrog, providing tools for development and artifact management.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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