Skip to main content
Glama
pickstar-2002

MySQL MCP Server

mysql_disconnect

Terminate active MySQL database connections to free up server resources and ensure proper session management when database operations are complete.

Instructions

断开 MySQL 数据库连接

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/server.ts:55-62 (registration)
    Registration of the 'mysql_disconnect' tool in the ListTools response, including name, description, and empty input schema.
    { name: 'mysql_disconnect', description: '断开 MySQL 数据库连接', inputSchema: { type: 'object', properties: {}, }, },
  • The main 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 连接', }, ], }; }
  • The DatabaseManager.disconnect() helper method that 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