Skip to main content
Glama

DiceDB MCP

by pottekkat
MIT License
4
  • Linux
  • Apple

DiceDB MCP

DiceDB 的模型上下文协议 (MCP)服务器实现,以实现 AI 应用程序(主机/客户端)和 DiceDB 数据库服务器之间的交互。

此实现使用DiceDB Go SDK与 DiceDB 通信。

观看演示视频来了解其实际效果!

特征

  • PING DiceDB 来检查连接性。
  • 通过 DiceDB 回显一条消息。
  • 按键从 DiceDB 获取值。
  • 在 DiceDB 中设置一个键值对。
  • 从 DiceDB 中删除一个或多个键。
  • 将键的整数值增加一。
  • 将键的整数值减一。

安装

下载二进制文件

您可以从“发布”页面下载并使用适合您的操作系统和处理器架构的二进制文件。

通过 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 Agents SDK

下面的示例展示了如何将dicedb-mcp服务器与OpenAI Agents SDK一起使用:

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())

可用工具

ping

对 DiceDB 服务器执行 ping 操作以检查连接性。

回声

通过 DiceDB 服务器回显消息。

得到

按键从 DiceDB 中检索值。

在 DiceDB 中设置键值对。

删除

从 DiceDB 中删除一个或多个键。

增加

将键的整数值增加一。

降级

将键的整数值减一。

发展

分叉并克隆存储库:

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

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.

一个 MCP 服务器,使 AI 应用程序能够与 DiceDB 数据库交互。

  1. 特征
    1. 安装
      1. 下载二进制文件
      2. 通过 Go 安装
      3. 从源代码构建
    2. 用法
      1. 使用 MCP 主机/客户端
      2. 使用 OpenAI Agents SDK
    3. 可用工具
      1. ping
      2. 回声
      3. 得到
      4. 删除
      5. 增加
      6. 降级
    4. 发展
      1. 执照

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          The Multi DB MCP Server is a high-performance implementation of the Database Model Context Protocol designed to revolutionize how AI agents interact with databases. Currently supporting MySQL and PostgreSQL databases.
          Last updated -
          164
          Go
          MIT License
          • Linux
          • Apple
        • -
          security
          A
          license
          -
          quality
          An MCP server that allows AI assistants to interact with Foundry datasets, ontology objects, and functions through natural language queries and commands.
          Last updated -
          2
          Python
          MIT License
        • -
          security
          A
          license
          -
          quality
          MCP-Server from your Database optimized for LLMs and AI-Agents. Supports PostgreSQL, MySQL, ClickHouse, Snowflake, MSSQL, BigQuery, Oracle Database, SQLite, ElasticSearch, DuckDB
          Last updated -
          368
          Go
          Apache 2.0
          • Linux
        • A
          security
          A
          license
          A
          quality
          An open-source MCP server that connects to various data sources (SQL databases, CSV, Parquet files), allowing AI models to execute SQL queries and generate data visualizations for analytics and business intelligence.
          Last updated -
          10
          32
          Python
          MIT License
          • Linux
          • Apple

        View all related MCP servers

        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