Skip to main content
Glama
Redis MCP Server

Redis MCP Server

by farhankaz

Redis MCP 서버

대장간 배지

Redis 데이터베이스 작업에 대한 액세스를 제공하는 MCP(Model Context Protocol) 서버입니다.

프로젝트 구조

지엑스피1

Related MCP server: Redis MCP

사용 가능한 도구

도구

유형

설명

입력 스키마

hmset

해시 명령

여러 해시 필드를 여러 값으로 설정

key : 문자열(해시 키) fields : 객체(설정할 필드-값 쌍)

hget

해시 명령

해시 필드의 값을 가져옵니다

key : 문자열(해시 키) field : 문자열(가져올 필드)

hgetall

해시 명령

해시의 모든 필드와 값을 가져옵니다.

key : 문자열(해시 키)

주사

키 명령

패턴과 일치하는 Redis 키 스캔

pattern : 문자열(일치시킬 패턴, 예: "user:*") count : 숫자, 선택 사항(반환할 키 개수)

세트

문자열 명령

NX 및 PX 옵션으로 문자열 값 설정

key : 문자열(설정할 키) value : 문자열(설정할 값) nx : 부울, 선택 사항(존재하지 않는 경우에만 설정) px : 숫자, 선택 사항(만료 시간(밀리초))

얻다

문자열 명령

문자열 값 가져오기

key : 문자열(가져올 키)

델

키 명령

키 삭제

key : 문자열(삭제할 키)

자드

정렬된 세트 명령

정렬된 세트에 하나 이상의 멤버 추가

key : 문자열(정렬된 세트 키) members : score : 숫자, value : 문자열을 갖는 객체의 배열

즈랜지

정렬된 세트 명령

인덱스로 정렬된 세트에서 멤버 범위를 반환합니다.

key : 문자열(정렬된 세트 키) start : 숫자(시작 인덱스) stop : 숫자(종료 인덱스) withScores : 부울, 선택 사항(출력에 점수 포함)

zrangebyscore

정렬된 세트 명령

최소값과 최대값 사이의 점수를 갖는 정렬된 세트에서 멤버를 반환합니다.

key : 문자열(정렬된 세트 키) min : 숫자(최소 점수) max : 숫자(최대 점수) withScores : 부울, 선택 사항(출력에 점수 포함)

즈렘

정렬된 세트 명령

정렬된 세트에서 하나 이상의 멤버 제거

key : 문자열(정렬된 세트 키) members : 문자열 배열(제거할 멤버)

사드

명령 설정

세트에 하나 이상의 멤버 추가

key : 문자열(세트 키) members : 문자열 배열(세트에 추가할 멤버)

스멤버스

명령 설정

모든 멤버를 한 세트로 모으세요

key : 문자열(키 설정)

용법

MCP 클라이언트(예: Claude Desktop, Cline)에서 구성:

{
  "mcpServers": {
    "redis": {
      "command": "npx",
      "args": ["redis-mcp", "--redis-host", "localhost", "--redis-port", "6379"],
      "disabled": false
    }
  }
}

명령줄 인수

  • --redis-host : Redis 서버 호스트(기본값: localhost)

  • --redis-port : Redis 서버 포트(기본값: 6379)

Smithery를 통해 설치

Smithery를 통해 Claude Desktop에 Redis Server를 자동으로 설치하려면:

npx -y @smithery/cli install redis-mcp --client claude

개발

새로운 Redis 도구를 추가하려면:

  1. src/tools/ 에 RedisTool 확장하는 새 도구 클래스를 만듭니다.

  2. src/interfaces/types.ts 에 도구 인터페이스를 정의합니다.

  3. src/tools/tool_registry.ts 에 도구를 등록합니다.

도구 구현 예시:

export class MyTool extends RedisTool {
  name = 'mytool';
  description = 'Description of what the tool does';
  inputSchema = {
    type: 'object',
    properties: {
      // Define input parameters
    },
    required: ['requiredParam']
  };

  validateArgs(args: unknown): args is MyToolArgs {
    // Implement argument validation
  }

  async execute(args: unknown, client: RedisClientType): Promise<ToolResponse> {
    // Implement tool logic
  }
}

특허

MIT: https://opensource.org/license/mit

Available Tools

13 tools
delC

Delete a key

Inputs: key (required).

getD

Get string value

Inputs: key (required).

hgetC

Get the value of a hash field

Inputs: field (required), key (required).

hgetallC

Get all the fields and values in a hash

Inputs: key (required).

hmsetC

Set multiple hash fields to multiple values

Inputs: fields (required), key (required).

saddC

Add one or more members to a set

Inputs: key (required), members (required).

scanC

Scan Redis keys matching a pattern

Inputs: pattern (required), count.

setC

Set string value with optional NX (only if not exists) and PX (expiry in milliseconds) options

Inputs: key (required), value (required), nx, px.

smembersC

Get all members in a set

Inputs: key (required).

zaddC

Add one or more members to a sorted set

Inputs: key (required), members (required).

zrangeC

Return a range of members from a sorted set by index

Inputs: key (required), start (required), stop (required), withScores.

zrangebyscoreC

Return members from a sorted set with scores between min and max

Inputs: key (required), max (required), min (required), withScores.

zremC

Remove one or more members from a sorted set

Inputs: key (required), members (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 13 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes targeting different Redis data types and operations, with minimal overlap. However, 'get' and 'set' for strings versus 'hget' and 'hmset' for hashes follow similar patterns but are differentiated by the 'h' prefix, which could cause minor confusion for agents unfamiliar with Redis naming conventions.

    Naming Consistency5/5

    The tool names are highly consistent, following Redis command conventions with lowercase, concise verb-based names (e.g., 'get', 'set', 'del', 'sadd', 'zadd'). All tools adhere to this pattern without mixing styles, making them predictable and easy to interpret.

    Tool Count5/5

    With 13 tools, this server is well-scoped for Redis operations, covering key data types (strings, hashes, sets, sorted sets) and essential commands. The count is appropriate, providing a focused set without being overwhelming or too sparse for the domain.

    Completeness4/5

    The tool set offers strong coverage for core Redis operations, including CRUD-like actions for multiple data types and scanning. Minor gaps exist, such as missing list operations (e.g., 'lpush', 'lrange') and transaction commands, but agents can still handle many common workflows effectively.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      Provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
      30
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Enables AI assistants to perform comprehensive Redis database operations including managing strings, hashes, lists, sets, sorted sets, TTL management, and data backup/restore. Supports secure connections and provides batch operations for efficient Redis interaction through natural language.
      34
      11 npm
      2
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Provides comprehensive Redis database operations supporting all major data types (strings, lists, sets, hashes, sorted sets) with full CRUD functionality through natural language commands.
      9
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      A Model Context Protocol (MCP) server for Redis. Connect to any Redis instance and execute queries through AI assistants.
      3
      MIT