JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 22
  • Score
    100M100P100Q59466F
  • License MIT

Model Context Protocol (MCP) server for Valkey Glide Node.js migration, API mapping, and use-case generation

Package Exports

  • valkey-glidejs-mcp
  • valkey-glidejs-mcp/dist/server.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (valkey-glidejs-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

valkey-glidejs-mcp

npm version

A Model Context Protocol (MCP) server that helps AI assistants work with Valkey GLIDE, the high-performance Valkey/Redis-compatible client.

What it does

This MCP server gives AI assistants (Claude, Continue, Cline, Zed, etc.) the ability to:

  • Enhanced Migration: Production-ready migration from ioredis/node-redis to GLIDE with 100% success rate on tested patterns
  • Smart Code Generation: Generate correct GLIDE client code with proper configuration mapping
  • Real-world Pattern Support: Handle complex patterns like distributed locks, rate limiting, pub/sub, transactions
  • Complete API Coverage: Answer questions about GLIDE APIs with 100% coverage (296 methods)
  • Runtime Validation: All migrations tested against real Valkey instances

Installation

Prerequisites

npm install -g valkey-glidejs-mcp

For Claude Desktop

Add to your Claude Desktop configuration:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "valkey-glide": {
      "command": "npx",
      "args": ["valkey-glidejs-mcp"]
    }
  }
}

Then restart Claude Desktop.

For Continue (VS Code/JetBrains)

Add to your Continue configuration (~/.continue/config.json):

{
  "models": [
    // Your model configuration
  ],
  "mcpServers": [
    {
      "name": "valkey-glide",
      "command": "npx",
      "args": ["valkey-glidejs-mcp"]
    }
  ]
}

For Cline (VS Code Extension)

  1. Open VS Code Settings (Cmd/Ctrl + ,)
  2. Search for "Cline MCP"
  3. Add to MCP Servers configuration:
{
  "valkey-glide": {
    "command": "npx",
    "args": ["valkey-glidejs-mcp"]
  }
}

For Zed Editor

Add to your Zed settings (~/.config/zed/settings.json):

{
  "assistant": {
    "version": "2",
    "mcp_servers": {
      "valkey-glide": {
        "command": "npx",
        "args": ["valkey-glidejs-mcp"]
      }
    }
  }
}

For Cursor

Add to your Cursor settings (~/.cursor/settings.json or through Settings UI):

{
  "mcpServers": {
    "valkey-glide": {
      "command": "npx",
      "args": ["valkey-glidejs-mcp"]
    }
  }
}

For Open Interpreter

# Start with MCP support
interpreter --mcp valkey-glidejs-mcp

For Custom MCP Clients

Connect using stdio transport:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
import { spawn } from "child_process";

const transport = new StdioClientTransport({
  command: "npx",
  args: ["valkey-glidejs-mcp"],
});

const client = new Client(
  { name: "my-client", version: "1.0.0" },
  { capabilities: {} },
);
await client.connect(transport);

// Use the tools
const result = await client.callTool("gen.clientBasic", {});
console.log(result);

What you can ask

Once installed, you can ask your AI assistant to:

  • "Create a Valkey GLIDE client" - Get basic connection code
  • "Migrate this ioredis code to GLIDE" - Convert existing code
  • "Show me how to use Valkey streams with GLIDE" - Get specific examples
  • "Create a distributed lock with GLIDE" - Generate pattern implementations
  • "Set up a rate limiter using GLIDE" - Build common patterns

Available Tools

The MCP server provides these tools to AI assistants:

Enhanced Migration (🆕 v0.2.0)

  • Smart Configuration Mapping: Automatically converts ioredis connection options to GLIDE format
  • Transaction Support: Converts ioredis pipelines to GLIDE Transactions with proper variable tracking
  • Conditional Operations: Handles SET key value PX ttl NX → GLIDE conditional set options
  • Script Migration: Converts redis.eval() to GLIDE Script objects with proper key/argument handling
  • Pub/Sub Guidance: Provides migration path from ioredis events to GLIDE callback configuration
  • Blocking Operations: Maps blocking commands like brpoplpush to GLIDE custom commands
  • Real-world Patterns: Tested against production patterns like distributed locks, rate limiters, job queues

Code Generation

  • Basic client setup (standalone & cluster)
  • Pub/Sub patterns
  • Distributed locks
  • Rate limiters
  • Caching patterns
  • All Valkey data structures (strings, hashes, lists, sets, sorted sets, streams, geo, bitmaps, HyperLogLog)

API Information

  • Search GLIDE methods
  • Browse by category (strings, hashes, lists, etc.)
  • Get detailed API documentation with 100% GLIDE API coverage (296 methods)

GLIDE Client Basics

import { GlideClient } from "@valkey/valkey-glide";

// Create client
const client = await GlideClient.createClient({
  addresses: [{ host: "localhost", port: 6379 }],
});

// Basic operations
await client.set("key", "value");
const value = await client.get("key");

// Cleanup
client.close();

Important Notes

  • GLIDE uses different API patterns than ioredis/node-redis
  • geoadd expects a Map, not an array
  • scan returns [cursor, keys[]] not an object
  • Transactions use a Transaction class
  • Cluster requires GlideClusterClient

Development

Build from source

git clone https://github.com/avifenesh/valkey-glidejs-mcp.git
cd valkey-glidejs-mcp
npm install
npm run build

Run tests

npm test

Contributing

See CONTRIBUTING.md for guidelines on commits and development workflow.

License

MIT