Skip to main content
Glama
pottekkat

DiceDB MCP

by pottekkat

ダイスDB MCP

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

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

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

特徴

  • DiceDB に PING して接続を確認します。

  • DiceDB を通じてメッセージを ECHO します。

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

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

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

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

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

Related MCP server: Database Tools for Claude AI

インストール

バイナリをダウンロード

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

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

Resources

Looking for Admin?

Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.

Appeared in Searches

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pottekkat/dicedb-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server