Skip to main content
Glama
mcp-sequel

mcp-sequel

by eukos

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

Related 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.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

Available Tools

3 tools
get_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

    A3.7/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: version info, listing connections, and executing queries. No overlaps or ambiguity.

    Naming Consistency4/5

    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.

    Tool Count4/5

    Three tools is appropriate for a focused SQL query interface. It covers basic needs without being too many or too few, though slightly minimal.

    Completeness3/5

    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

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server implementation that enables Claude to execute read-only queries against MariaDB databases and explore database schemas through natural language.
      20
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      MCP server that allows Claude AI to interact directly with MySQL databases, enabling query execution and table information retrieval through natural language.
      1
      5 npm
      4
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP 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.
      5
      MIT