Skip to content

Commit 7b7adeb

Browse files
authored
Merge branch 'main' into map-traveler
2 parents 0bab478 + f99a467 commit 7b7adeb

File tree

9 files changed

+479
-7
lines changed

9 files changed

+479
-7
lines changed

.github/workflows/version-check.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Version Consistency Check
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
github:
13+
name: Check GitHub server version consistency
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Check version consistency
19+
run: |
20+
PACKAGE_VERSION=$(node -p "require('./src/github/package.json').version")
21+
TS_VERSION=$(grep -o '".*"' ./src/github/common/version.ts | tr -d '"')
22+
23+
if [ "$PACKAGE_VERSION" != "$TS_VERSION" ]; then
24+
echo "::error::Version mismatch detected!"
25+
echo "::error::package.json version: $PACKAGE_VERSION"
26+
echo "::error::version.ts version: $TS_VERSION"
27+
exit 1
28+
else
29+
echo "✅ Versions match: $PACKAGE_VERSION"
30+
fi

README.md

Lines changed: 56 additions & 6 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/github/common/version.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
// If the format of this file changes, so it doesn't simply export a VERSION constant,
2+
// this will break .github/workflows/version-check.yml.
13
export const VERSION = "0.6.2";

src/redis/Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM node:22.12-alpine as builder
2+
3+
COPY src/redis /app
4+
5+
WORKDIR /app
6+
7+
RUN --mount=type=cache,target=/root/.npm npm install
8+
9+
RUN npm run build
10+
11+
FROM node:22-alpine AS release
12+
13+
COPY --from=builder /app/build /app/build
14+
COPY --from=builder /app/package.json /app/package.json
15+
COPY --from=builder /app/package-lock.json /app/package-lock.json
16+
17+
ENV NODE_ENV=production
18+
19+
WORKDIR /app
20+
21+
RUN npm ci --ignore-scripts --omit-dev
22+
23+
ENTRYPOINT ["node", "build/index.js"]

src/redis/README.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Redis
2+
3+
A Model Context Protocol server that provides access to Redis databases. This server enables LLMs to interact with Redis key-value stores through a set of standardized tools.
4+
5+
## Components
6+
7+
### Tools
8+
9+
- **set**
10+
- Set a Redis key-value pair with optional expiration
11+
- Input:
12+
- `key` (string): Redis key
13+
- `value` (string): Value to store
14+
- `expireSeconds` (number, optional): Expiration time in seconds
15+
16+
- **get**
17+
- Get value by key from Redis
18+
- Input: `key` (string): Redis key to retrieve
19+
20+
- **delete**
21+
- Delete one or more keys from Redis
22+
- Input: `key` (string | string[]): Key or array of keys to delete
23+
24+
- **list**
25+
- List Redis keys matching a pattern
26+
- Input: `pattern` (string, optional): Pattern to match keys (default: *)
27+
28+
## Usage with Claude Desktop
29+
30+
To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`:
31+
32+
### Docker
33+
34+
* when running docker on macos, use host.docker.internal if the server is running on the host network (eg localhost)
35+
* Redis URL can be specified as an argument, defaults to "redis://localhost:6379"
36+
37+
```json
38+
{
39+
"mcpServers": {
40+
"redis": {
41+
"command": "docker",
42+
"args": [
43+
"run",
44+
"-i",
45+
"--rm",
46+
"mcp/redis",
47+
"redis://host.docker.internal:6379"]
48+
}
49+
}
50+
}
51+
```
52+
53+
### NPX
54+
55+
```json
56+
{
57+
"mcpServers": {
58+
"redis": {
59+
"command": "npx",
60+
"args": [
61+
"-y",
62+
"@modelcontextprotocol/server-redis",
63+
"redis://localhost:6379"
64+
]
65+
}
66+
}
67+
}
68+
```
69+
70+
## Building
71+
72+
Docker:
73+
74+
```sh
75+
docker build -t mcp/redis -f src/redis/Dockerfile .
76+
```
77+
78+
## License
79+
80+
This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

src/redis/package.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "redis",
3+
"version": "1.0.0",
4+
"main": "index.js",
5+
"type": "module",
6+
"bin": {
7+
"redis": "./build/index.js"
8+
},
9+
"scripts": {
10+
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\""
11+
},
12+
"files": [
13+
"build"
14+
],
15+
"keywords": [],
16+
"author": "",
17+
"license": "ISC",
18+
"description": "",
19+
"devDependencies": {
20+
"@types/node": "^22.10.2",
21+
"typescript": "^5.7.2"
22+
},
23+
"dependencies": {
24+
"@modelcontextprotocol/sdk": "^0.4.0",
25+
"@types/redis": "^4.0.10",
26+
"redis": "^4.7.0"
27+
}
28+
}

0 commit comments

Comments
 (0)