Skip to main content
Glama
siimleetberg

OpenCode MySQL Connector

by siimleetberg

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

MYSQL_HOST

Yes

MYSQL_PORT

No

3306

MYSQL_USER

Yes

MYSQL_PASSWORD

Yes

MYSQL_DATABASE

Yes

Related MCP server: MySQL Custom MCP Server

Tools

Tool

Description

execute_query

Execute a MySQL SQL query (SELECT, INSERT, UPDATE, DELETE, DDL). Supports parameterized queries.

list_tables

List tables in a database with optional row counts and a LIKE name filter.

describe_table

Get table structure: columns, types, nullability, keys, and defaults.

explain_query

Get the EXPLAIN execution plan for a SQL query.

get_schema

Get the DDL (CREATE TABLE) for all tables in a database.

check_connection

Verify the connector can reach the MySQL server.

Prompts

Prompt

Description

show_table_context

Get a ready-to-use table schema context for a given table name.

Setup

npm install
npm run build

Usage

MYSQL_HOST=localhost \
MYSQL_USER=root \
MYSQL_PASSWORD=secret \
MYSQL_DATABASE=mysqldatabase \
MYSQL_PORT=3306 \
npm start

License

ISC

F
license - not found
-
quality - not tested
-
maintenance - not tested

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