mcpField
M
mcp-tool-server-redis

mcp-tool-server-redis

Local
github.com/yhwangDatabases0Updated 78w ago

About mcp-tool-server-redis

mcp-tool-server-redis is an MCP server backed by Redis for working with key-value data. It exposes tools to set, retrieve, delete, and pattern-match keys for MCP clients.

Key features

  1. 01Set key-value pairs with optional expiration
  2. 02Get values by key
  3. 03Delete one or more keys
  4. 04List keys matching a pattern

Use cases

  1. 01Store application data in Redis
  2. 02Retrieve a value using its key
  3. 03Remove selected Redis keys
  4. 04Find keys matching a pattern

MCP support

Exposes four Redis key-value tools to MCP clients over streamable HTTP. The README describes running it with Docker Compose.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"tool-server-redis": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"compose"
]
}
}
}
Run commanddocker run -i --rm compose

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
ocicompose

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

mcp-tool-server-redis

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

Run MCP Server

Use docker compose to start up the server

docker compose up -d

This starts a MCP server with Redis as the backend. The server will be available at http://localhost:3000.

Interact with MCP server

Option 1: streamable HTTP client from the typescript-sdk

You can interact with the MCP server using the simple streamable HTTP client from the MCP typescript-sdk repo: https://github.com/modelcontextprotocol/typescript-sdk.git

Here is the usage:

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

By default, the client will connect to http://localhost:3000 and you should see the following outputs:

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 <name> [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

>

Then you are in the interactive prompt mode. To connect to different MCP server, just type connect [url] and press enter.

Use the list-tools command to list all available tools. There are 4 available tools:

> 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

Use the call-tool <name> command to call a tool with optional JSON arguments. For example, you can add a key-value pair to Redis using the set tool:

> 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

Option2: MCP-Cli

You can also use the mcp-cli command line tool to interact with your MCP server. To use it, run the following command:

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

This will connect to the MCP server via streamable HTTP. It will prompt you the list of available tools and allow you to call them with JSON arguments. For example:

$ 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

You can use cursor to navigate the list and select the desired primitive. Then, you will be prompted to enter the arguments for the selected primitive.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.