Skip to main content
Glama
pickstar-2002

MySQL MCP Server

mysql_disconnect

Disconnect a client from a MySQL database, ensuring safe termination of active sessions and releasing resources for efficient database management.

Instructions

断开 MySQL 数据库连接

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the mysql_disconnect tool, which delegates to DatabaseManager.disconnect() and returns a success message.
    private async handleDisconnect(): Promise<any> { await this.dbManager.disconnect(); return { content: [ { type: 'text', text: '已断开 MySQL 连接', }, ], }; }
  • src/server.ts:55-62 (registration)
    Registration of the mysql_disconnect tool in the ListTools response, including its schema (empty input object).
    { name: 'mysql_disconnect', description: '断开 MySQL 数据库连接', inputSchema: { type: 'object', properties: {}, }, },
  • The DatabaseManager.disconnect() helper method that actually ends the MySQL connection pool.
    async disconnect(): Promise<void> { if (this.pool) { await this.pool.end(); this.pool = null; console.log('已断开 MySQL 连接'); } }

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/pickstar-2002/mysql-mcp'

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