Command Palette

Search for a command to run...

UnylyUnyly
Весь каталог

Redis Server

БесплатноНе проверен

MCP server for Redis interaction with dynamic connection setup and management.

GitHubEmbed

Описание

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

  1. Iniciar o servidor MCP
  2. Configurar conexão com redis_configure_connection()
  3. Verificar status com redis_check_connection()
  4. Usar as tools conforme necessário
  5. 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

  1. 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
  1. Verificar se foi adicionado:
claude mcp list
  1. 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

  1. 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"
    }
  }
}
  1. Usar o servidor:
    • O Cursor detectará automaticamente o servidor MCP
    • Use @redis-mcp no chat para interagir com as tools
    • As tools aparecerão na lista de ferramentas disponíveis

from github.com/efeabio/mcp-redis-server

Установка Redis Server

У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.

▸ github.com/efeabio/mcp-redis-server

FAQ

Redis Server MCP бесплатный?

Да, Redis Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.

Нужен ли API-ключ для Redis Server?

Нет, Redis Server работает без API-ключей и переменных окружения.

Redis Server — hosted или self-hosted?

Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.

Как установить Redis Server в Claude Desktop, Claude Code или Cursor?

Открой Redis Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.

Похожие MCP

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

wenb1n-devавтор: wenb1n-dev

Postgres Server

This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools

madhurprashавтор: madhurprash

Postgres

Query your database in natural language

Anthropicавтор: Anthropic

PostgreSQL

Read-only database access with schema inspection.

modelcontextprotocolавтор: modelcontextprotocol

Redis

Interact with Redis key-value stores.

modelcontextprotocolавтор: modelcontextprotocol

SQLite

Database interaction and business intelligence capabilities.

modelcontextprotocolавтор: modelcontextprotocol

mxcp

Open-source framework for building enterprise-grade MCP servers using just YAML, SQL, and Python, with built-in auth, monitoring, ETL and policy enforcement.

raw-labsавтор: raw-labs

tadas-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

tadas-githubавтор: tadas-github

julien040/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

julien040автор: julien040

drakonkat/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.

drakonkatавтор: drakonkat

Compare Redis Server with

Не уверен что выбрать?

Найди свой стек за 60 секунд

Автор?

Embed-бейдж для README

Похожее

Все в категории data