Redis 监控工具

mcp-redis-monitor 是一个基于 FastMCP 的只读 Redis 监控服务,提供队列深度、Celery 队列状态、连接客户端数、服务器信息及各数据库键数量查询,适用于 Redis 实例的运维监控与排查。

  • by antonio-mello-ai
  • Python
  • 本地部署
  • 3 星标
  • 更新于
在 GitHub 查看 antonio-mello-ai/mcp-redis-monitor

使用说明

mcp-redis-monitor

FastMCP server providing read-only tools to monitor Redis instances.

The server reads Redis metadata and queue state over stdio. It does not write, delete or dequeue data. For production use, configure a dedicated least-privilege Redis identity; username and TLS support are tracked in Issue #4.

Install

# Run directly with uvx (no install needed)
uvx mcp-redis-monitor

# Or install with pip
pip install mcp-redis-monitor

Environment Variables

Variable Default Description
REDIS_MONITOR_HOST localhost Redis host
REDIS_MONITOR_PORT 6379 Redis port
REDIS_MONITOR_PASSWORD (none) Redis password (optional)

Tools

Tool Description
get_queue_depths Keys + length by type in a specific DB (default: 3)
get_celery_queue_status Celery queue names, pending count, oldest task
get_connected_clients Number of connected clients
get_server_info Memory, uptime, keyspace stats
get_key_count_by_db Keys per database (overview)

Usage

mcp-redis-monitor

Or add to your MCP client configuration:

{
  "mcpServers": {
    "redis-monitor": {
      "command": "mcp-redis-monitor"
    }
  }
}

Development

ruff check src/ tests/
ruff format src/ tests/
pytest

License

MIT

Documentation and roadmap

Priorities live in GitHub Issues and Projects. Delivery history lives in closed Issues, pull requests and GitHub Releases.