MCP server for Claude that connects to MySQL, MariaDB, PostgreSQL, and SQLite databases
Project description
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-sequel
Option 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-sequel
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.json
Each 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 |
|---|---|---|---|
type |
yes | — | "mysql" or "mariadb" |
host |
yes | — | hostname or IP |
user |
yes | — | database user |
password |
yes | — | database password |
port |
no | 3306 |
TCP port |
database |
no | — | default database; can be overridden per query |
readonly |
no | true |
if true, only SELECT/SHOW/DESCRIBE/EXPLAIN are allowed |
row_limit |
no | 1000 |
max rows returned; null for no limit |
description |
no | — | human-readable label shown in list_connections |
ssh_tunnel |
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 |
|---|---|---|---|
host |
yes | — | SSH server hostname or IP |
user |
yes | — | SSH username |
key_file |
no* | — | path to private key file (~ expanded) |
password |
no* | — | SSH password (if not using key file) |
port |
no | 22 |
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 |
|---|---|---|---|
type |
yes | — | "postgresql" |
host |
yes | — | hostname or IP |
user |
yes | — | database user |
password |
yes | — | database password |
port |
no | 5432 |
TCP port |
database |
no* | — | database to connect to; can be passed per query instead |
readonly |
no | true |
if true, connection is opened in read-only mode (DB-level enforcement) |
row_limit |
no | 1000 |
max rows returned; null for no limit |
description |
no | — | human-readable label shown in list_connections |
ssh_tunnel |
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 |
|---|---|---|---|
type |
yes | — | "sqlite" |
path |
yes | — | absolute path to the .db file |
readonly |
no | true |
if true, opens connection with ?mode=ro (OS-level enforcement) |
row_limit |
no | 1000 |
max rows returned; null for no limit |
description |
no | — | human-readable label shown in list_connections |
Set permissions to owner-only:
chmod 600 ~/.config/mcp-sequel/*.json
Usage
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_sequel-0.2.1.tar.gz.
File metadata
- Download URL: mcp_sequel-0.2.1.tar.gz
- Upload date:
- Size: 80.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ee61157d4a65809c1149c32bdfa17b8eb124856485ab1b9021d97a3e585da2c
|
|
| MD5 |
bc1055844b6d7ac26219810fd02b85f2
|
|
| BLAKE2b-256 |
9bb6572f35fb4b114bfdc46cf7c2ece35bc702298abf61944746c23fb8372d4e
|
Provenance
The following attestation bundles were made for mcp_sequel-0.2.1.tar.gz:
Publisher:
publish.yml on eukos/mcp-sequel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_sequel-0.2.1.tar.gz -
Subject digest:
5ee61157d4a65809c1149c32bdfa17b8eb124856485ab1b9021d97a3e585da2c - Sigstore transparency entry: 2015273284
- Sigstore integration time:
-
Permalink:
eukos/mcp-sequel@d3b58846f30987e0b1cb380b62c442604c60191f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/eukos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d3b58846f30987e0b1cb380b62c442604c60191f -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_sequel-0.2.1-py3-none-any.whl.
File metadata
- Download URL: mcp_sequel-0.2.1-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3b6a447d518e98e933aed89dfb80de9b52cb61135ba50fee01423de32ea1f76
|
|
| MD5 |
f7fce48a1d5300df623e367a32a98f13
|
|
| BLAKE2b-256 |
409eae95d1522c76f79b6101d84be8ea2fb6a8899427c49e870d232c6766f923
|
Provenance
The following attestation bundles were made for mcp_sequel-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on eukos/mcp-sequel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_sequel-0.2.1-py3-none-any.whl -
Subject digest:
a3b6a447d518e98e933aed89dfb80de9b52cb61135ba50fee01423de32ea1f76 - Sigstore transparency entry: 2015273400
- Sigstore integration time:
-
Permalink:
eukos/mcp-sequel@d3b58846f30987e0b1cb380b62c442604c60191f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/eukos
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d3b58846f30987e0b1cb380b62c442604c60191f -
Trigger Event:
push
-
Statement type: