DiceDB MCP

by pottekkat
Verified
MIT License
2
  • Linux
  • Apple

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.

Integrations

  • Allows OpenAI Agents to interact with DiceDB databases through tools for basic database operations including ping, echo, get, set, delete, increment, and decrement functions.

ダイスDB MCP

AI アプリケーション (ホスト/クライアント) と DiceDB データベース サーバー間の相互作用を可能にする、DiceDB 用のモデル コンテキスト プロトコル (MCP)サーバー実装。

この実装では、DiceDB Go SDKを使用して DiceDB と通信します。

デモビデオをチェックして、実際に動作する様子をご覧ください。

特徴

  • DiceDB に PING して接続を確認します。
  • DiceDB を通じてメッセージを ECHO します。
  • キーによって DiceDB から値を取得します。
  • DiceDB でキーと値のペアを設定します。
  • DiceDB から 1 つ以上のキーを削除します。
  • キーの整数値を 1 増やします。
  • キーの整数値を 1 減らします。

インストール

バイナリをダウンロード

「リリース」ページから、オペレーティング システムとプロセッサ アーキテクチャに適したバイナリをダウンロードして使用できます。

Go経由でインストール

前提条件:

  • Go 1.24以上
go install github.com/pottekkat/dicedb-mcp@latest

dicedb-mcpバイナリへのパスを取得します。

which dicedb-mcp

ソースからビルド

以下の開発セクションを参照してください。

使用法

MCPホスト/クライアント

Claude Desktop の場合はclaude_desktop_config.json 、Cursor の場合はmcp.jsonに以下を追加します。

{ "mcpServers": { "dicedb-mcp": { "command": "path/to/dicedb-mcp" } } }

OpenAIエージェントSDKを使用

以下の例は、 OpenAI Agents SDKdicedb-mcpサーバーを使用する方法を示しています。

from agents import Agent, Runner, trace from agents.mcp import MCPServer, MCPServerStdio from dotenv import load_dotenv import os import openai import asyncio load_dotenv() async def run(mcp_server: MCPServer, prompt: str, server_url: str): agent = Agent(name="DiceDB MCP", instructions=f"""You can interact with a DiceDB database running at {server_url}, use this for url.""", mcp_servers=[mcp_server],) result = await Runner.run(starting_agent=agent, input=prompt) print(result.final_output) async def main(): openai.api_key = os.getenv("OPENAI_API_KEY") prompt = "Can you change the value of the 'name' key to 'Rachel Green'?" server_url = "localhost:7379" async with MCPServerStdio( cache_tools_list=True, params={"command": "path/to/dicedb-mcp", "args": [""]}, ) as server: with trace(workflow_name="DiceDB MCP"): await run(server, prompt, server_url) if __name__ == "__main__": asyncio.run(main())

利用可能なツール

ピン

DiceDB サーバーに ping を送信して接続を確認します。

エコー

DiceDB サーバーを通じてメッセージをエコーします。

得る

キーによって DiceDB から値を取得します。

セット

DiceDB にキーと値のペアを設定します。

デル

DiceDB から 1 つ以上のキーを削除します。

増加

キーの整数値を 1 増やします。

減算

キーの整数値を 1 減らします。

発達

リポジトリをフォークしてクローンします。

git clone https://github.com/username/dicedb-mcp.git

次のディレクトリに移動します:

cd dicedb-mcp

依存関係をインストールします:

make deps

プロジェクトをビルドします。

make build

MCP サーバーの構成を更新して、ローカル ビルドを指すようにします。

{ "mcpServers": { "dicedb-mcp": { "command": "/path/to/dicedb-mcp/dist/dicedb-mcp" } } }

ライセンス

MITライセンス

-
security - not tested
A
license - permissive license
-
quality - not tested

AI アプリケーションが DiceDB データベースと対話できるようにする MCP サーバー。

  1. Features
    1. Installation
      1. Download Binary
      2. Install via Go
      3. Build from Source
    2. Usage
      1. With MCP Hosts/Clients
      2. With OpenAI Agents SDK
    3. Available Tools
      1. ping
      2. echo
      3. get
      4. set
      5. del
      6. incr
      7. decr
    4. Development
      1. License
        ID: 07j6uouk0r