Redis Server
FreeNot checkedMCP server for Redis interaction with dynamic connection setup and management.
About
MCP server for Redis interaction with dynamic connection setup and management.
README
Servidor MCP (Model Context Protocol) para interação com Redis, com sistema de conexão dinâmica e interativa.
Características
- Conexão Dinâmica: Não requer configuração prévia de conexão
- Tools Interativas: Solicita dados de conexão quando necessário
- Gerenciamento de Estado: Verifica conexão antes de executar operações
- Suporte Completo ao Redis: Todas as operações principais do Redis
Como Usar
1. Iniciar o Servidor
./start-mcp.sh
2. Configurar Conexão
IMPORTANTE: Antes de usar qualquer tool do Redis, você DEVE configurar uma conexão usando:
# Tool: redis_configure_connection
# Parâmetros:
# - host: Host do Redis (ex: localhost, 127.0.0.1)
# - port: Porta do Redis (padrão: 6379)
# - password: Senha do Redis (deixe vazio se não houver)
# - database: Database inicial (0-15, padrão: 0)
# Exemplo:
await redis_configure_connection(
host="localhost",
port=6379,
password="",
database=0
)
3. Verificar Status da Conexão
# Verificar se está conectado
await redis_check_connection()
# Obter status detalhado
await redis_get_connection_status()
4. Usar as Tools do Redis
Após configurar a conexão, você pode usar todas as tools disponíveis:
- Informações do Servidor:
redis_get_server_info() - Estatísticas de Memória:
redis_get_memory_stats() - Informações do Keyspace:
redis_get_keyspace_info() - Estatísticas Gerais:
redis_get_stats() - Informações dos Clientes:
redis_get_clients_info() - Configurações:
redis_get_config() - Gerenciamento de Chaves:
redis_list_keys(),redis_get_key_type(), etc. - Gerenciamento de Databases:
redis_select_database(),redis_create_key(), etc.
Fluxo de Uso Recomendado
- Iniciar o servidor MCP
- Configurar conexão com
redis_configure_connection() - Verificar status com
redis_check_connection() - Usar as tools conforme necessário
- Verificar conexão periodicamente se necessário
Tratamento de Erros
Todas as tools verificam automaticamente se há uma conexão ativa antes de executar. Se não houver conexão, você receberá um erro claro indicando que deve usar redis_configure_connection() primeiro.
Exemplo de Uso Completo
# 1. Configurar conexão
connection_result = await redis_configure_connection(
host="localhost",
port=6379,
password="",
database=0
)
# 2. Verificar status
status = await redis_check_connection()
# 3. Usar tools
if status["connected"]:
# Obter informações do servidor
server_info = await redis_get_server_info()
# Listar chaves
keys = await redis_list_keys(pattern="*", limit=10)
# Obter estatísticas
stats = await redis_get_stats()
Desenvolvimento
Estrutura do Projeto
src/
├── tools/
│ ├── connection.py # Tools de conexão
│ ├── server_info.py # Informações do servidor
│ ├── memory.py # Estatísticas de memória
│ ├── keyspace.py # Informações do keyspace
│ ├── stats.py # Estatísticas gerais
│ ├── clients.py # Informações dos clientes
│ ├── config.py # Configurações
│ ├── keys.py # Gerenciamento de chaves
│ └── database.py # Gerenciamento de databases
├── utils/
│ ├── redis_connector.py # Conector Redis principal
│ └── logger.py # Sistema de logging
└── core/
└── exceptions.py # Exceções personalizadas
Testes
# Executar testes unitários
pytest tests/unit/
# Com cobertura
pytest --cov=src tests/unit/
Requisitos
- Python 3.8+
- Redis server
- Dependências listadas em
requirements.txt
Instalação
# Criar ambiente virtual
python -m venv venv
source venv/bin/activate # Linux/Mac
# ou
venv\Scripts\activate # Windows
# Instalar dependências
pip install -r requirements.txt
# Para desenvolvimento
pip install -r requirements-dev.txt
Configuração nos Editores
Claude Code
- Adicionar o servidor MCP:
# Na pasta do projeto, adicionar o script de inicialização
claude mcp add /caminho/completo/para/o/projeto/redis/start-mcp.sh
- Verificar se foi adicionado:
claude mcp list
- Usar o servidor:
- O Claude Code detectará automaticamente o servidor MCP
- As tools do Redis ficarão disponíveis no chat
- Use as tools diretamente como
redis_configure_connection()
Cursor IDE
- Configurar MCP no Cursor:
- Abra as configurações do Cursor (Cmd/Ctrl + ,)
- Procure por "MCP" nas configurações
- Adicione a configuração do servidor:
{
"mcpServers": {
"redis-mcp": {
"command": "/caminho/completo/para/o/projeto/redis/start-mcp.sh"
}
}
}
- Usar o servidor:
- O Cursor detectará automaticamente o servidor MCP
- Use
@redis-mcpno chat para interagir com as tools - As tools aparecerão na lista de ferramentas disponíveis
Installing Redis Server
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/efeabio/mcp-redis-serverFAQ
Is Redis Server MCP free?
Yes, Redis Server MCP is free — one-click install via Unyly at no cost.
Does Redis Server need an API key?
No, Redis Server runs without API keys or environment variables.
Is Redis Server hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Redis Server in Claude Desktop, Claude Code or Cursor?
Open Redis Server on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
by wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
by madhurprashPostgres
Query your database in natural language
by AnthropicPostgreSQL
Read-only database access with schema inspection.
by modelcontextprotocolRedis
Interact with Redis key-value stores.
by modelcontextprotocolSQLite
Database interaction and business intelligence capabilities.
by modelcontextprotocolmxcp
Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.
by raw-labstadas-github/a2asearch-mcp
MCP server to search 4,800+ MCP servers, AI agents, CLI tools and agent skills. Install: npx -y a2asearch-mcp. Ask Claude: "Find MCP servers for database access
by tadas-githubjulien040/anyquery
Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by desi
by julien040drakonkat/wizzy-mcp-tmdb
A MCP server for The Movie Database API that enables AI assistants to search and retrieve movie, TV show, and person information.
by drakonkatCompare Redis Server with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All data MCPs
