---
slug: "sql-agent-mcp-server"
title: "SQL Agent MCP Server"
description: "An MCP server supporting MySQL and PostgreSQL. Enables AI assistants to directly execute SQL queries, retrieve table lists and schemas, and connect securely via SSH tunnels."
url: "https://www.ytyng.com/en/bio/sql-agent-mcp-server"
achieved_at: "2025-06-26"
updated: "2026-02-15T05:20:10.829Z"
category: "アプリケーション"
image_url: "https://media.ytyng.com/20260130/65fd8a7cae3d43ccb75f6077e5d8efff.png"
lang: "en"
---

# SQL Agent MCP Server

# SQL Agent MCP Server

An MCP (Model Context Protocol) server that supports both MySQL and PostgreSQL.

It allows AI assistants (such as Claude) to connect directly to databases, execute SQL queries, and retrieve schema information.

## Features

- **MySQL & PostgreSQL support** — Manage multiple database engines through a single server
- **SSH tunnel connections** — Secure connections to remote databases with both password and private key authentication
- **Rich toolset** — SQL query execution, table listing, schema retrieval, plus MySQL-specific admin commands (SHOW STATUS, SHOW PROCESSLIST, ANALYZE TABLE, etc.)
- **YAML configuration** — Easy multi-server setup via `config.yaml`
- **Lazy connections** — SQLAgentManager creates database connections only when needed

## Available Tools

- `sql_query` — Execute SQL queries
- `get_server_list` — List registered servers
- `get_table_list` — List tables
- `get_table_schema` — Get table schema information
- MySQL admin tools (status, variables, process list, index info, table analyze/optimize/check/repair)

## Repository

[https://github.com/ytyng/sql-agent-mcp-server](https://github.com/ytyng/sql-agent-mcp-server)
