Token导航 LogoToken导航TokenDH.com
Tool Server Redis logo
开发工具stdio官方级别未说明来源级核验

Tool Server Redis

MCP Server

tsx

A MCP server which provides tools function to get/set key-value pairs data backed by Redis

工具数

4

提示词数

0

GitHub Stars

0

资源数

0
开发工具JavaScript数据管理

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

yhwang

提供方

yhwang

最后核验

2026/5/18 03:28

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx tsx src/examples/client/simpleStreamableHttp.ts

详细介绍

mcp工具服务器redis

提供工具功能以获取/设置Redis支持的键值对数据的MCP服务器

运行MCP服务器

使用docker compose启动服务器

docker compose up -d

这将启动一个以Redis为后端的MCP服务器。服务器将在以下时间可用 http://localhost:3000.

与MCP服务器交互

选项1:从typescript-sdk流式传输HTTP客户端

您可以使用MCP typescript sdk仓库中的简单流式HTTP客户端与MCP服务器交互: https://github.com/modelcontextprotocol/typescript-sdk.git

用法如下:

git clone https://github.com/modelcontextprotocol/typescript-sdk.git
cd typescript-sdk
npm install
npx tsx src/examples/client/simpleStreamableHttp.ts

默认情况下,客户端将连接到 http://localhost:3000 您应该看到以下输出:

MCP Interactive Client
=====================
Connecting to http://localhost:3000/mcp...
Transport created with session ID: 44dff10f-89bc-4965-b280-e1df3eb56a51
Connected to MCP server

Available commands:
  connect [url]              - Connect to MCP server (default: http://localhost:3000/mcp)
  disconnect                 - Disconnect from server
  terminate-session          - Terminate the current session
  reconnect                  - Reconnect to the server
  list-tools                 - List available tools
  call-tool  [args]    - Call a tool with optional JSON arguments
  greet [name]               - Call the greet tool
  multi-greet [name]         - Call the multi-greet tool with notifications
  start-notifications [interval] [count] - Start periodic notifications
  list-prompts               - List available prompts
  get-prompt [name] [args]   - Get a prompt with optional JSON arguments
  list-resources             - List available resources
  help                       - Show this help
  quit                       - Exit the program

>

然后,您处于交互式提示模式。要连接到不同的MCP服务器,只需键入 connect [url] 然后按enter键。

使用 list-tools 命令列出所有可用工具。有4个可用工具:

> list-tools
Available tools:
  - set: Set a Redis key-value pair with optional expiration
  - get: Get value by key from Redis
  - delete: Delete one or more keys from Redis
  - list: List Redis keys matching a pattern

使用 call-tool 命令调用具有可选JSON参数的工具。例如,您可以使用以下命令向Redis添加键值对 set 工具:

> call-tool set {"key": "this is a new key", "value": "value for the new key"}
Calling tool 'set' with args: { key: 'this is a new key', value: 'value for the new key' }
Tool result:
  Successfully set key: this is a new key

选项2:MCP Cli

您还可以使用 mcp-cli 命令行工具,用于与MCP服务器交互。要使用它,请运行以下命令:

npx @wong2/mcp-cli --url http://localhost:3000/mcp

这将通过流式HTTP连接到MCP服务器。它将提示您可用工具的列表,并允许您使用JSON参数调用它们。例如:

$ npx @wong2/mcp-cli --url http://localhost:3000/mcp
✔ Connected, server capabilities: tools
? Pick a primitive ›
❯   tool(set) - Set a Redis key-value pair with optional expiration
    tool(get) - Get value by key from Redis
    tool(delete) - Delete one or more keys from Redis
    tool(list) - List Redis keys matching a pattern

您可以使用光标在列表中导航并选择所需的图元。然后,系统将提示您输入所选图元的参数。

目录标签

目录标签

开发工具JavaScript数据管理developer-tools键值存储本地部署Redis工具

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

tsx

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP