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 porurlcompleta. SQLite usaurl: ":memory:"/"file:..."oupath:. - 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: falselibera por conexão. - Senha sempre cifrada no YAML (
enc:, Fernet); a chave vive só emNAUTILUS_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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nautilus_mcp_server-0.4.2.tar.gz | 35.5 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nautilus_mcp_server-0.4.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 77.4 kB
Release files / nautilus_mcp_server-0.4.2.tar.gz
| Download URL | nautilus_mcp_server-0.4.2.tar.gz |
|---|---|
| Size | 35.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d66cf1960580b7ef77c28ee6e3867d0cbce4d6538213e1c2418983f5b5cd1835
|
|
BLAKE2b-256 checksum How to use checksums |
a28c215e8171291c6413a09627882dcd0f46259df25f8535015b612eaa0245a4
|
| 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 logRelease files / nautilus_mcp_server-0.4.2-py3-none-any.whl
| Download URL | nautilus_mcp_server-0.4.2-py3-none-any.whl |
|---|---|
| Size | 41.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f74ead38db4ce530a3e12d27c1d9a41c1fe6742cb5fdf7038591e2f63046e51f
|
|
BLAKE2b-256 checksum How to use checksums |
9599cfe369cea8170a89bf9a715e664fe182f67a14ac10071dc0ac56ead800de
|
| 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 logSecurity for nautilus-mcp-server 0.4.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.
Attestation for nautilus_mcp_server-0.4.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 Oct 22, 2026.
Transparency logA 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.