Skip to main content
Glama
yangfeng20

dynamic-db-mcp-server

by yangfeng20

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
register_instanceA

Register a MySQL-compatible database connection at runtime.

Tests the connection with SELECT 1 before caching. If a connection with the same name already exists, it is closed and replaced.

Args: name: A human-readable identifier for this instance (used as instance_id). host: Database host or IP address. port: Database port (e.g. 3306). user: Database username. password: Database password. database: Optional default database/schema. charset: Connection charset, defaults to utf8mb4.

Returns: JSON string with instance_id and status, or error details.

list_instancesA

List all registered database instances.

Returns: JSON array of instances. Passwords are never included.

execute_sqlA

Execute a SQL statement on a registered instance.

SQL is classified before execution:

  • Read-only (SELECT/SHOW/WITH/EXPLAIN/DESC): executes directly.

  • Destructive (DROP/DELETE/UPDATE/INSERT/ALTER/TRUNCATE/CREATE/...): requires confirm_destructive=true.

  • Blocked (OUTFILE/DUMPFILE/LOAD_FILE/SHUTDOWN/KILL): always rejected.

Args: instance_id: The instance name from register_instance. sql: The SQL statement to execute. database: Optional database to switch to before executing. confirm_destructive: Set to true to allow destructive operations.

Returns: JSON string with query results (columns/rows/row_count) or affected_rows for DML, or error/safety rejection details.

list_databasesA

List all databases on a registered instance.

Args: instance_id: The instance name from register_instance.

Returns: JSON array of database names, or error details.

list_tablesA

List tables in a database with row count and size.

Args: instance_id: The instance name from register_instance. database: The database name to list tables from.

Returns: JSON array of {table, rows, size_mb, engine, comment}, or error.

get_table_detailA

Get column info and CREATE TABLE DDL for a specific table.

Args: instance_id: The instance name from register_instance. database: The database name. table_name: The table name.

Returns: JSON with {columns: [...], ddl: "..."}, or error details.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/yangfeng20/dynamic-db-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server