mcp-sequel
This server connects to and queries MySQL, MariaDB, PostgreSQL, and SQLite databases using natural language or raw SQL through the MCP protocol.
Core tools:
get_version— Retrieve the installed version of themcp-sequelpackage.list_connections— List all configured named database connections (with types and descriptions).query— Execute SQL on a specified connection with an optional database override. Returns JSON with columns, rows, row count, and whether a row limit was applied.
Additional features (via configuration):
Multiple named connections — Manage connections like
production,staging, andlocalsimultaneously.Read-only mode — Restrict connections to SELECT/SHOW/DESCRIBE/EXPLAIN queries, enforced at both the application and database levels.
Per-connection row limits — Cap returned rows to avoid overwhelming responses.
SSH tunnel support — Route MySQL or PostgreSQL connections through a bastion/jump host using a key file or password.
Allows querying MariaDB databases via natural language through Claude, with the same capabilities as MySQL integration: SELECT/SHOW/DESCRIBE/EXPLAIN queries, row limits, readonly mode, and SSH tunnel support.
Allows querying MySQL databases via natural language through Claude, supporting SELECT/SHOW/DESCRIBE/EXPLAIN queries with configurable row limits, readonly mode, and optional SSH tunnel connections.
Allows querying SQLite databases via natural language through Claude, supporting SELECT/SHOW/DESCRIBE/EXPLAIN queries with configurable row limits and readonly mode (OS-level enforcement via ?mode=ro).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-sequel Show databases for production"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-sequel
MCP server for Claude that connects to MySQL, MariaDB, PostgreSQL, and SQLite databases. Query your databases using natural language. Supports multiple named connections, SSH tunnels, readonly mode, and per-connection row limits.
Install & Registration
Tip: ask Claude to read this README and set up the server for you.
Option 1: uvx (recommended) — no installation needed, always runs the latest version:
claude mcp add mcp-sequel uvx mcp-sequelOption 2: from cloned repository:
git clone https://github.com/eukos/mcp-sequel
claude mcp add mcp-sequel uv run --directory /path/to/mcp-sequel mcp-sequelRelated MCP server: MariaDB MCP Server
Configuration
Tip: ask Claude to read this README and create a connection config for you.
One file per connection in ~/.config/mcp-sequel/. The filename (without .json) becomes the connection name.
~/.config/mcp-sequel/
├── production.json
├── staging.json
└── local.jsonEach file is one connection. Examples:
MySQL / MariaDB
{
"type": "mysql",
"host": "db.example.com",
"port": 3306,
"user": "analyst",
"password": "secret",
"database": "myapp",
"readonly": true,
"row_limit": 1000,
"description": "Production replica, analytics only"
}Field | Required | Default | Description |
| yes | — |
|
| yes | — | hostname or IP |
| yes | — | database user |
| yes | — | database password |
| no |
| TCP port |
| no | — | default database; can be overridden per query |
| no |
| if true, only SELECT/SHOW/DESCRIBE/EXPLAIN are allowed |
| no |
| max rows returned; |
| no | — | human-readable label shown in |
| no | — | SSH tunnel config (see below); routes the connection through a bastion host |
MySQL via SSH tunnel
Use ssh_tunnel when the database is only reachable through a bastion/jump host. host and port in the top-level config refer to the DB as seen from the SSH server (commonly localhost).
With a key file (most common):
{
"type": "mysql",
"host": "localhost",
"port": 3306,
"user": "reader",
"password": "secret",
"database": "myapp",
"ssh_tunnel": {
"host": "bastion.example.com",
"user": "ubuntu",
"key_file": "~/.ssh/id_rsa"
}
}With an SSH password:
{
"type": "mysql",
"host": "localhost",
"port": 3306,
"user": "reader",
"password": "secret",
"ssh_tunnel": {
"host": "bastion.example.com",
"user": "ubuntu",
"password": "sshpass"
}
}Field | Required | Default | Description |
| yes | — | SSH server hostname or IP |
| yes | — | SSH username |
| no* | — | path to private key file ( |
| no* | — | SSH password (if not using key file) |
| no |
| SSH server port |
* at least one of key_file or password should be provided.
PostgreSQL
{
"type": "postgresql",
"host": "db.example.com",
"port": 5432,
"user": "analyst",
"password": "secret",
"database": "myapp",
"readonly": true,
"row_limit": 1000,
"description": "Production PostgreSQL"
}Field | Required | Default | Description |
| yes | — |
|
| yes | — | hostname or IP |
| yes | — | database user |
| yes | — | database password |
| no |
| TCP port |
| no* | — | database to connect to; can be passed per query instead |
| no |
| if true, connection is opened in read-only mode (DB-level enforcement) |
| no |
| max rows returned; |
| no | — | human-readable label shown in |
| no | — | SSH tunnel config (same format as MySQL) |
* database must be provided either in the config or per query — PostgreSQL requires a database to connect.
SQLite
{
"type": "sqlite",
"path": "/data/analytics.db",
"readonly": true,
"row_limit": 1000,
"description": "Local analytics database"
}Field | Required | Default | Description |
| yes | — |
|
| yes | — | absolute path to the |
| no |
| if true, opens connection with |
| no |
| max rows returned; |
| no | — | human-readable label shown in |
Set permissions to owner-only:
chmod 600 ~/.config/mcp-sequel/*.jsonUsage
After registering, restart Claude to load the server. Then try:
"List available database connections"
"Show databases for staging"
"How many customers do we have on production?"
"Show me the schema of the orders table"
"Query local: SELECT * FROM users LIMIT 10"
"Query production: show me the top 10 users by order count"
License
MIT
Available Tools
3 toolsget_versionA
Return the installed mcp-sequel package version.
Inputs: no named parameters. Returns: result
list_connectionsA
List all configured database connections.
Inputs: no named parameters. Returns: result
queryB
Execute a SQL query on a database connection. Returns JSON with columns, rows, row_count, limit_applied.
Inputs: connection (required), sql (required), database. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: version info, listing connections, and executing queries. No overlaps or ambiguity.
Two tools follow verb_noun pattern (get_version, list_connections), but 'query' is a single verb without a noun, creating minor inconsistency. Overall still clear and predictable.
Three tools is appropriate for a focused SQL query interface. It covers basic needs without being too many or too few, though slightly minimal.
Core query functionality is present, but missing schema introspection, connection management (create/delete), or result pagination control. Gaps may force agents to work around limitations.
Maintenance
Related MCP Connectors
Hosted MySQL MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Related MCP Servers
- AlicenseCqualityDmaintenanceAn MCP server that enables MySQL database integration with Claude. You can execute SQL queries and manage database connections.29MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server implementation that enables Claude to execute read-only queries against MariaDB databases and explore database schemas through natural language.20MIT
- AlicenseBqualityDmaintenanceMCP server that allows Claude AI to interact directly with MySQL databases, enabling query execution and table information retrieval through natural language.15 npm4MIT
- AlicenseAqualityDmaintenanceMCP server that gives Claude Code and OpenCode direct access to your XAMPP MariaDB/MySQL databases, enabling database listing, table inspection, and read/write query execution.5MIT