MCP HubMCP Hub
upstash

mcp-server

by: upstash

Upstash Model Context Server

27created 13/12/2024
Visit
Upstash
Context

📌Overview

Purpose: The Model Context Protocol (MCP) Server is designed to facilitate seamless interaction between large language models (LLMs) and Upstash services using a natural language interface.

Overview: The MCP Server provides a standardized method for managing context between LLMs and external systems, specifically enabling users to effortlessly interact with their Upstash accounts through commands issued in natural language via clients like Claude Desktop.

Key Features:

  • Natural Language Commands: Users can perform various operations on their Upstash accounts, such as creating databases, listing databases, and generating backups simply by issuing intuitive commands like "Create a new Redis database in us-east-1".

  • Integration with Claude Desktop: The MCP Server is designed to work seamlessly with Claude Desktop, allowing users to leverage LLM capabilities to manage their Upstash resources efficiently.

  • Toolset for Redis Management: The server includes a variety of specific tools for Redis management, from creating and deleting databases to managing backups and monitoring usage statistics.


Upstash MCP Server

Model Context Protocol (MCP) is a standardized protocol for managing context between large language models (LLMs) and external systems. This repository provides an installer and an MCP Server for Upstash Developer APIs.

This enables using any MCP Client to interact with your Upstash account via natural language commands such as:

  • Create a new Redis database in us-east-1
  • List my databases
  • List keys starting with "user:" in users-db
  • Create a backup
  • Give me the spikes in throughput during the last 7 days

Usage

Requirements

How to Use Locally

Installing for Claude Desktop

Automatically install Upstash MCP Server for Claude Desktop using:

npx -y @smithery/cli@latest install @upstash/mcp-server --client claude

Alternatively, without Smithery:

npx @upstash/mcp-server init <UPSTASH_EMAIL> <UPSTASH_API_KEY>

This command edits your MCP config file and adds an entry for Upstash.

Installing for Cursor

Automatically install Upstash MCP Server for Cursor using:

npx -y @smithery/cli@latest install @upstash/mcp-server --client cursor

Alternatively, without Smithery, add this command to the MCP config in Cursor:

npx -y @upstash/mcp-server run <UPSTASH_EMAIL> <UPSTASH_API_KEY>

Installing for Windsurf

Automatically install Upstash MCP Server for Windsurf using:

npx -y @smithery/cli@latest install @upstash/mcp-server --client windsurf

Alternatively, without Smithery, add this command to the MCP config in Windsurf:

npx -y @upstash/mcp-server run <UPSTASH_EMAIL> <UPSTASH_API_KEY>

Running with Docker

Use the provided Docker image to run the server:

docker build -t upstash-mcp .

docker run --rm -i \
  -e UPSTASH_EMAIL=<UPSTASH_EMAIL> \
  -e UPSTASH_API_KEY=<UPSTASH_API_KEY> \
  upstash-mcp

Add this Docker run command to your MCP config.

Troubleshooting

Common Issues

If your MCP client has trouble finding the correct binaries due to PATH differences, obtain full binary paths with which npx or which docker and replace npx or docker in the MCP config accordingly.

Node Version Manager

When using nvm or fnm, update the node command in the MCP config to the absolute path of the node binary.

Additional Resources

See the troubleshooting guide. You can also join the Discord community for help.

Tools

  • redis_database_create_backup
  • redis_database_create_new
  • redis_database_delete
  • redis_database_delete_backup
  • redis_database_get_details
  • redis_database_list_backups
  • redis_database_list_databases
  • redis_database_reset_password
  • redis_database_restore_backup
  • redis_database_run_multiple_redis_commands
  • redis_database_run_single_redis_command
  • redis_database_set_daily_backup
  • redis_database_update_regions
  • redis_database_get_usage_last_5_days
  • redis_database_get_stats

Development

Clone the project and install dependencies:

pnpm install
pnpm run watch

This command continuously builds the project and watches for changes.

Create a .env file with:

UPSTASH_EMAIL=<UPSTASH_EMAIL>
UPSTASH_API_KEY=<UPSTASH_API_KEY>

Testing with Claude Desktop

Run:

pnpm run setup

This adds an upstash entry to your MCP config pointing to the local build:

{
  "upstash": {
    "command": "node",
    "args": ["<path-to-repo>/dist/index.js", "run", "<UPSTASH_EMAIL>", "<UPSTASH_API_KEY>"]
  }
}

Note: If using a node version manager, set the node binary path explicitly.

Use Claude Desktop to run Upstash commands.

View MCP Server logs in real time with:

pnpm run logs

Testing with MCP Inspector

Run:

pnpm run inspector

to test the tools.