feat: add mcp-servers/**

This commit is contained in:
Sun-ZhenXing
2025-10-23 09:08:07 +08:00
parent ece59b42bf
commit f603ed5db9
57 changed files with 3061 additions and 95 deletions

View File

@@ -0,0 +1,14 @@
# MCP Redis version
MCP_REDIS_VERSION=latest
# MCP port (default: 8000)
MCP_PORT_OVERRIDE=8000
# Redis version
REDIS_VERSION=7-alpine
# Redis port (default: 6379)
REDIS_PORT_OVERRIDE=6379
# Timezone
TZ=UTC

View File

@@ -0,0 +1,40 @@
# Redis MCP Server
[English](./README.md) | [中文](./README.zh.md)
This service deploys an MCP (Model Context Protocol) server for Redis, providing a standardized interface to interact with Redis databases.
## Services
- `mcp`: The MCP Redis server
- `redis`: Redis database service
## Environment Variables
| Variable Name | Description | Default Value |
| ------------------- | ----------------------------------------------------------------- | ------------- |
| MCP_REDIS_VERSION | MCP Redis image version | `latest` |
| MCP_PORT_OVERRIDE | Host port mapping for MCP server (maps to port 8000 in container) | 8000 |
| REDIS_VERSION | Redis image version | `7-alpine` |
| REDIS_PORT_OVERRIDE | Host port mapping for Redis (maps to port 6379 in container) | 6379 |
| TZ | Timezone setting | `UTC` |
Please modify the `.env` file as needed for your use case.
## Volumes
- `redis_data`: Redis data persistence
## Ports
- `8000`: MCP server API
- `6379`: Redis database
## Usage
The MCP server provides a standardized interface to interact with Redis. Access the MCP API at `http://localhost:8000`.
## Additional Information
- Model Context Protocol: <https://modelcontextprotocol.io/>
- Redis Documentation: <https://redis.io/documentation>

View File

@@ -0,0 +1,40 @@
# Redis MCP 服务器
[English](./README.md) | [中文](./README.zh.md)
此服务部署一个用于 Redis 的 MCP模型上下文协议服务器提供与 Redis 数据库交互的标准化接口。
## 服务
- `mcp`MCP Redis 服务器
- `redis`Redis 数据库服务
## 环境变量
| 变量名 | 说明 | 默认值 |
| ------------------- | ----------------------------------------------- | ---------- |
| MCP_REDIS_VERSION | MCP Redis 镜像版本 | `latest` |
| MCP_PORT_OVERRIDE | MCP 服务器主机端口映射(映射到容器内端口 8000 | 8000 |
| REDIS_VERSION | Redis 镜像版本 | `7-alpine` |
| REDIS_PORT_OVERRIDE | Redis 主机端口映射(映射到容器内端口 6379 | 6379 |
| TZ | 时区设置 | `UTC` |
请根据实际需求修改 `.env` 文件。
## 卷
- `redis_data`Redis 数据持久化
## 端口
- `8000`MCP 服务器 API
- `6379`Redis 数据库
## 使用方法
MCP 服务器提供了与 Redis 交互的标准化接口。访问 MCP API`http://localhost:8000`
## 附加信息
- 模型上下文协议:<https://modelcontextprotocol.io/>
- Redis 文档:<https://redis.io/documentation>

View File

@@ -0,0 +1,64 @@
x-default: &default
restart: unless-stopped
logging:
driver: json-file
options:
max-size: 100m
max-file: "3"
services:
mcp:
<<: *default
image: mcp/redis:${MCP_REDIS_VERSION:-latest}
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- MCP_HOST=0.0.0.0
- TZ=${TZ:-UTC}
ports:
- "${MCP_PORT_OVERRIDE:-8000}:8000"
depends_on:
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '1.00'
memory: 512M
reservations:
cpus: '0.25'
memory: 128M
redis:
<<: *default
image: redis:${REDIS_VERSION:-7-alpine}
command: redis-server --appendonly yes
ports:
- "${REDIS_PORT_OVERRIDE:-6379}:6379"
volumes:
- redis_data:/data
environment:
- TZ=${TZ:-UTC}
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
deploy:
resources:
limits:
cpus: '0.50'
memory: 256M
reservations:
cpus: '0.10'
memory: 64M
volumes:
redis_data: