Skip to main content

nautilus-mcp-server

Servidor MCP de consulta somente-leitura a bancos de dados — PostgreSQL, MySQL/MariaDB, SQLite, SQL Server, Oracle, MongoDB e Redis — por um único arquivo de conexões, com senhas cifradas.

O que faz

Expõe seus bancos para um assistente de IA de forma segura: listar estruturas, inspecionar metadados/índices e executar apenas leituras (SELECT/WITH no SQL, find no MongoDB, leitura por tipo no Redis), sempre com limite de linhas e timeout. Muitas respostas trazem structuredContent (JSON) além do texto.

Tool O que faz
db_list_connections Lista os connection_id configurados (tipo e read_only). Use primeiro, para escolher o id.
db_list_resources Tabelas (SQL), coleções (MongoDB, exige database) ou chaves (Redis; key_pattern/cursor).
db_get_metadata Colunas da tabela (SQL), amostra de documentos (MongoDB) ou tipo+amostra da chave (Redis).
db_describe_indexes Índices de uma tabela SQL ou coleção MongoDB.
db_query_sql Executa SELECT/WITH. output_format: table/json/csv; limit opcional.
db_fetch_documents MongoDB: find com filter_json, limit, skip.
db_read_cache Redis: leitura conforme o tipo da chave (string, hash, list, set, zset, stream, RedisJSON).
db_peek_sample Até três registros de amostra (linhas, documentos ou valores).

Recurso MCP nautilus://connections: JSON com a lista de conexões.

Requisitos

  • Python 3.11+.
  • Os drivers de todos os bancos suportados já vêm incluídos — não há extras a instalar.

Instalação

# Executar direto (sem instalar), via uv:
uvx nautilus-mcp-server

# Ou instalar as ferramentas (servidor + CLI `nautilus`) no sistema:
uv tool install nautilus-mcp-server
# (alternativa: pip install nautilus-mcp-server)

Configuração

1. Gere a chave de criptografia (uma vez)

nautilus keygen           # imprime a chave; guarde-a e use como NAUTILUS_KEY

2. Cadastre as conexões pelo CLI

Toda adição/alteração/remoção passa pelo CLI nautilus, que edita o YAML e cifra a senha ao salvar:

nautilus add pg_prod      # pergunta type/host/port/user/senha/database (senha oculta)
nautilus list             # lista as conexões (nunca mostra a senha)
nautilus edit pg_prod     # altera campos; senha em branco mantém a atual
nautilus remove pg_prod   # remove a conexão
# --config aponta outro arquivo (padrão: NAUTILUS_CONFIG ou ./nautilus.yaml)

O arquivo resultante (veja nautilus.yaml.example):

defaults:                  # herdados por todas as conexões (opcionais)
  read_only: true
  query_timeout_ms: 30000
  max_rows: 200
connections:
  pg_prod:
    type: postgresql       # postgresql | mysql | mariadb | sqlite | sqlserver | oracle | mongodb | redis
    host: db.interno
    port: 5432
    user: leitor
    password: "enc:gAAAAAB..."   # gravado pelo CLI — cifrado, nunca à mão
    database: vendas
  • Conexão por componentes (host/port/user/password/database) ou por url completa. SQLite usa url: ":memory:"/"file:..." ou path:.
  • Overrides por conexão: read_only, query_timeout_ms, connect_timeout_ms (Redis: socket_timeout_ms).
  • Sem ${VAR}: todos os valores vão literais no YAML; só a senha é cifrada.

3. Aponte o cliente MCP para o servidor

As únicas variáveis de ambiente são NAUTILUS_CONFIG (caminho do YAML) e NAUTILUS_KEY (a mesma chave do keygen, que decifra as senhas):

{
  "mcpServers": {
    "nautilus": {
      "command": "uvx",
      "args": ["nautilus-mcp-server"],
      "env": {
        "NAUTILUS_CONFIG": "C:/caminho/para/nautilus.yaml",
        "NAUTILUS_KEY": "a-chave-gerada-por-nautilus-keygen"
      }
    }
  }
}

O mesmo bloco command/args/env vale para Cursor, Claude Desktop, Claude Code e outras IDEs com MCP por stdio.

Segurança

  • Somente leitura por padrão no SQL (validação bloqueia escrita); read_only: false libera por conexão.
  • Senha sempre cifrada no YAML (enc:, Fernet); a chave vive só em NAUTILUS_KEY, fora do arquivo.
  • Limite de linhas e timeout por consulta; decode seguro de binário no Redis.

Metadata

Release files for nautilus-mcp-server 0.4.1

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

Source distribution (sdist)

Source distribution for nautilus-mcp-server 0.4.1
File Size Uploaded Provenance
nautilus_mcp_server-0.4.1.tar.gz 35.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nautilus-mcp-server 0.4.1
File Interpreter ABI Platform
nautilus_mcp_server-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 77.4 kB

Release files / nautilus_mcp_server-0.4.1.tar.gz

Download URL nautilus_mcp_server-0.4.1.tar.gz
Size 35.5 kB
Tags Source
SHA-256 checksum
How to use checksums
86afd7a25c72d3d2e8ed92cef8c12176f1cef78c2ba16c24939d5aa0adb8fc91
BLAKE2b-256 checksum
How to use checksums
de3ad1da45697f7227149298daefdd7f93703a4821d0b2ba49f5af62f336902b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Release files / nautilus_mcp_server-0.4.1-py3-none-any.whl

Download URL nautilus_mcp_server-0.4.1-py3-none-any.whl
Size 41.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ad0fc3c86322d990d24cf859f02f3b4e8d3e1d52c1aeb1ccd8c9dde1a78faa3
BLAKE2b-256 checksum
How to use checksums
9a0892f9a4e57c13a3123b9bae366ec3cb3673f131c0f91115a52fc1cdd1390a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 22, 2026.

Transparency log

Security for nautilus-mcp-server 0.4.1

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 nautilus_mcp_server-0.4.1.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 Oct 22, 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.

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