Skip to main content

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

Metadata

Release files for mcp-sequel 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-sequel 0.2.2
File Size Uploaded Provenance Actions
mcp_sequel-0.2.2.tar.gz 82.0 kB With provenance Details for mcp_sequel-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mcp-sequel 0.2.2
File Interpreter ABI Platform Actions
mcp_sequel-0.2.2-py3-none-any.whl Python 3 none any Details for mcp_sequel-0.2.2-py3-none-any.whl

Total release size: 94.5 kB

Release files / mcp_sequel-0.2.2.tar.gz

Download URL mcp_sequel-0.2.2.tar.gz
Size 82.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1993d34e3b1fb0e7ea29762e8828ff524b88be6649e0290760f7a48e5e0b9026
BLAKE2b-256 checksum
How to use checksums
46c50f7afe8eb1696d43a15df4d521392510dc253d622c61b95e5cca15ef798e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Release files / mcp_sequel-0.2.2-py3-none-any.whl

Download URL mcp_sequel-0.2.2-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65bfbac627e48af3d229db112bd639bb6f10310f1daa3b10ebdb802a1d7a7d8c
BLAKE2b-256 checksum
How to use checksums
b6c86cd08f2f4a869e9da1480d45d8a76da80a4e5aec0dd6939b5196d0ac852e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

Security for mcp-sequel 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcp_sequel-0.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page