使用法
構造は次のとおりです。
このサーバーを使用するには、次のことが必要です。
必要な依存関係をインストールします。
[まだインストールされていない場合] https://docs.astral.sh/uv/
uv venv
source .venv/bin/activate
uv sync
適切な変数を追加して Redis 接続を構成するには、.env.example ファイルを参照してください。
サーバーを実行します。
python src/server.py
このサーバーの機能
リソース:
- redis://status - 現在の接続ステータス
- redis://info - Redis サーバー情報
- redis://keys/{pattern} - パターンに一致するキーを一覧表示する
ツール:
- 基本操作:
- get_value - 値を取得する
- set_value - 有効期限を任意で設定する値を設定する
- delete_key - キーを削除する
- 増分 - 数値を増やす
- リスト操作:
- list_push - 値をリストにプッシュする
- list_range - リスト値の範囲を取得する
- ハッシュ操作:
- hash_set - ハッシュフィールドを設定する
- hash_get - ハッシュフィールドを取得する
- 集合演算:
- set_add - セットに追加する
- set_members - セットメンバーを取得する
- パブリッシュ/サブスクライブ:
- publish_message - メッセージを公開する
各ツールにはエラー処理機能が搭載されており、意味のあるレスポンスを返します。接続が失われた場合、サーバーは自動的にRedisに再接続します。
MCP Inspector でテストできます: mcp dev src/server.py
または、Claude Desktop にインストールします: mcp install src/server.py
例
この実装は、MCP を介した Redis 統合のための強固な基盤を提供します。特定のユースケースに合わせて、必要に応じて Redis コマンドを追加することで、さらに拡張できます。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
基本的な操作、リスト、ハッシュ、セット、pub/sub 機能のための一連のツールを通じて、Claude に Redis データベースへのアクセスと操作を提供するサーバー。
Related Resources
Related MCP Servers
- -securityAlicense-qualityProvides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.Last updated -7317JavaScriptMIT License
- AsecurityAlicenseAqualityEnables users to perform Redis database operations using the Model Context Protocol (MCP) tools, allowing for efficient data management through commands like setting, getting, and scanning hash fields.Last updated -13295TypeScriptMIT License
- AsecurityAlicenseAqualityConnects Claude Desktop to Redmine for seamless project and issue management, including searching, creating, updating, and tracking tasks using Redmine's API.Last updated -514PythonMozilla Public License 2.0
- AsecurityFlicenseAqualityA server that enables Claude Desktop users to access the Claude API directly, allowing them to bypass Professional Plan limitations and use advanced features like custom system prompts and conversation management.Last updated -15Python