@futuretea/redis-mcp-server 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +106 -133
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -2,36 +2,29 @@
2
2
 
3
3
  [中文文档](README.zh.md)
4
4
 
5
- Redis MCP Server exposes a closed, semantic Redis data-plane catalog over MCP and the bundled CLI. It supports explicit standalone, Cluster, and Sentinel configurations. Tools are read-only by default; write tools are registered only when `redis.write_enabled=true`.
5
+ Redis MCP Server exposes a closed Redis catalog over MCP. The default catalog is read-only. Write tools are registered only when `redis.write_enabled` is true. The process does not authenticate clients, and output masking stays off until you enable it.
6
6
 
7
- ## Quick start
7
+ The current release is npm `0.2.0`, container tag `v0.2.0`, and git tag `v0.2.0`. Field lists, errors, and the tool catalog are in the [reference](docs/reference.md). Build and release layout are in [development and release](docs/development.md).
8
8
 
9
- ```bash
10
- make build
11
- ./bin/redis-mcp-server tools list --config config.example.yaml
12
- ./bin/redis-mcp-server tools describe redis_string --config config.example.yaml
13
- ./bin/redis-mcp-server tools call redis_string --config config.example.yaml \
14
- --params '{"operation":"get","args":{"key":"sample"}}'
15
- ```
16
-
17
- `tools list` and `tools describe` do not connect to Redis. `tools call` and `mcp` connect, then reject an account that can run administrative commands unless `allow_unsafe_database_role` is set. See Service account.
18
-
19
- The catalog contains `redis_key`, `redis_string`, `redis_hash`, `redis_list`, `redis_set`, `redis_sorted_set`, `redis_stream`, and `redis_observe`. Write-mode additionally registers the corresponding seven `*_write` tools; there is no raw-command tool and no `redis_observe_write`.
9
+ ## Install 0.2.0
20
10
 
21
- Collection responses are bounded to 1–1000 items before reaching Redis. `SCAN`, `HSCAN`, `SSCAN`, and `ZSCAN` return a fixed-length opaque base64url continuation reference, never a Redis-native cursor or buffered value. A continuation remains idle-valid for five minutes after a successful page, with at most 1,000 sessions and 16 MiB of encoded state per adapter; whole sessions are evicted by LRU. Expired or evicted references return `cursor_expired`; a newly unadmittable continuation returns `cursor_unavailable`. Stream entry reads are intentionally absent: the stream catalog is limited to length, bounded pending inspection, and `XCLAIM JUSTID`.
11
+ The npm package and the container image are the program builds. The [v0.2.0 GitHub release](https://github.com/futuretea/redis-mcp-server/releases/tag/v0.2.0) has notes and GitHub's source archive. It does not attach a `redis-mcp-server` binary. Do not look for a binary download on that page.
22
12
 
23
- ## Use a release
24
-
25
- Stable releases use tags in the form `vX.Y.Z`. npm uses `X.Y.Z`; Docker uses `vX.Y.Z`. npm packages support macOS (Intel and Apple Silicon), Linux (x64 and ARM64), and Windows x64. Docker images support Linux `amd64` and `arm64`.
13
+ The npm tarball for 0.2.0 contains the README from that publish. This file is the updated guide. The Chinese guide is [README.zh.md](README.zh.md) in the repository. The npm tarball does not include it.
26
14
 
27
15
  ### npm
28
16
 
17
+ Copy [config.example.yaml](config.example.yaml) to the path you will pass to `--config`. The tracked file is the whole configuration. A shorter file with only the `redis` keys is a different document.
18
+
29
19
  ```bash
20
+ cp config.example.yaml redis-mcp.yaml
30
21
  export MCP_REDIS_PASSWORD='your-redis-password'
31
- npx -y @futuretea/redis-mcp-server@X.Y.Z --config /path/to/redis-mcp.yaml
22
+ npx -y @futuretea/redis-mcp-server@0.2.0 --config "$PWD/redis-mcp.yaml"
32
23
  ```
33
24
 
34
- Configure an MCP client that supports stdio with the same version and configuration path:
25
+ `npx` starts `redis-mcp-server mcp`. The process speaks MCP on stdin and stdout. It connects to Redis before it serves. With the example addresses and no Redis on `127.0.0.1:6379`, the process exits non-zero and writes `[redis_connection_failed] connection failed` to stderr. Stdout stays empty.
26
+
27
+ A stdio client uses the same command. Give the client an absolute configuration path.
35
28
 
36
29
  ```json
37
30
  {
@@ -40,7 +33,7 @@ Configure an MCP client that supports stdio with the same version and configurat
40
33
  "command": "npx",
41
34
  "args": [
42
35
  "-y",
43
- "@futuretea/redis-mcp-server@X.Y.Z",
36
+ "@futuretea/redis-mcp-server@0.2.0",
44
37
  "--config",
45
38
  "/absolute/path/to/redis-mcp.yaml"
46
39
  ],
@@ -52,168 +45,148 @@ Configure an MCP client that supports stdio with the same version and configurat
52
45
  }
53
46
  ```
54
47
 
48
+ The wrapper always inserts the `mcp` subcommand. `npx -y @futuretea/redis-mcp-server@0.2.0 version` does not print the version. It starts `mcp` and then fails if topology is missing. After `npm install @futuretea/redis-mcp-server@0.2.0`, run the platform binary for `version`, `tools`, and `completion`.
49
+
50
+ | Host | Package | Binary |
51
+ | --- | --- | --- |
52
+ | macOS Intel | `@futuretea/redis-mcp-server-darwin-amd64` | `bin/redis-mcp-server` |
53
+ | macOS Apple Silicon | `@futuretea/redis-mcp-server-darwin-arm64` | `bin/redis-mcp-server` |
54
+ | Linux x64 | `@futuretea/redis-mcp-server-linux-amd64` | `bin/redis-mcp-server` |
55
+ | Linux ARM64 | `@futuretea/redis-mcp-server-linux-arm64` | `bin/redis-mcp-server` |
56
+ | Windows x64 | `@futuretea/redis-mcp-server-windows-amd64` | `bin/redis-mcp-server.exe` |
57
+
58
+ The linux/amd64 binary from 0.2.0 prints:
59
+
60
+ ```text
61
+ redis-mcp-server version=0.2.0 commit=b519d1d9c7430c96abd07eea736d01c3e5f69676 date=2026-11-15T00:38:32-08:00
62
+ ```
63
+
64
+ Other platform packages are published at the same version. This check executed the linux/amd64 binary only.
65
+
55
66
  ### Docker
56
67
 
57
- Mount the Redis configuration file read-only and keep the password in the runtime environment:
68
+ The image entrypoint is `/usr/local/bin/redis-mcp-server mcp` and the user is `mcp`. `v0.2.0` contains runnable `linux/amd64` and `linux/arm64` images. The release workflow also tags that image as `latest` until a later stable tag moves `latest`.
69
+
70
+ Mount the copy of `config.example.yaml`. The repository does not contain `redis-mcp.yaml`.
58
71
 
59
72
  ```bash
73
+ cp config.example.yaml redis-mcp.yaml
60
74
  export MCP_REDIS_PASSWORD='your-redis-password'
61
75
  docker run --rm -i \
62
76
  --env MCP_REDIS_PASSWORD \
63
77
  --mount type=bind,src="$PWD/redis-mcp.yaml",dst=/etc/redis-mcp-server/config.yaml,readonly \
64
- ghcr.io/futuretea/redis-mcp-server:vX.Y.Z \
78
+ ghcr.io/futuretea/redis-mcp-server:v0.2.0 \
65
79
  --config /etc/redis-mcp-server/config.yaml
66
80
  ```
67
81
 
68
- Both release entry points start MCP over stdio by default. Pass `--port 8080 --listen 0.0.0.0` after the release command to start HTTP in a container, and publish the port only to the network that should reach it.
69
-
70
- ## Configuration
71
-
72
- Redis topology is explicit. Password is read only from `MCP_REDIS_PASSWORD`; do not place it in YAML.
82
+ The container waits on stdio the same way `npx` does. To run `version` or `tools`, replace the entrypoint:
73
83
 
74
- ```yaml
75
- allow_unsafe_database_role: false
76
- redis:
77
- topology: standalone # standalone | cluster | sentinel
78
- addresses: ["127.0.0.1:6379"]
79
- username: ""
80
- tls: false
81
- sentinel_master: ""
82
- write_enabled: false
84
+ ```bash
85
+ docker run --rm --entrypoint /usr/local/bin/redis-mcp-server \
86
+ ghcr.io/futuretea/redis-mcp-server:v0.2.0 version
83
87
  ```
84
88
 
85
- `allow_unsafe_database_role` defaults to false. The environment variable is `MCP_ALLOW_UNSAFE_DATABASE_ROLE`. Password remains `MCP_REDIS_PASSWORD` only.
86
-
87
- Use `sentinel_master` for Sentinel. `addresses` lists cluster seeds for Cluster and Sentinel endpoints for Sentinel.
88
-
89
- ### Service account
89
+ The container command above was checked against the published image config. It was not executed here because this environment has no Docker daemon.
90
90
 
91
- After the process connects, and before any tool runs a Redis command, startup reads the current user's ACL. It sends `PING`, `ACL WHOAMI`, `ACL GETUSER`, and `ACL CAT`. The process exits with `[redis_unsafe_service_role] database service role is not permitted` when any root rule or selector can run:
91
+ ### Build from a checkout
92
92
 
93
- - a command in the `@admin` category, including `CONFIG`, `DEBUG`, `SHUTDOWN`, `ACL SETUSER`, `BGSAVE`, `REPLICAOF`, `MODULE`, `MONITOR`, `CLIENT KILL`, and cluster administration subcommands such as `CLUSTER FAILOVER` and `CLUSTER RESET`
94
- - `FLUSHALL`, `FLUSHDB`, `SWAPDB`, or `MIGRATE`
95
- - server-side code and global function or script control: `@scripting`, including `EVAL`, `EVALSHA`, `FCALL`, `SCRIPT DEBUG`, `SCRIPT FLUSH`, `SCRIPT LOAD`, `SCRIPT KILL`, `FUNCTION FLUSH`, `FUNCTION DELETE`, `FUNCTION LOAD`, `FUNCTION RESTORE`, and `FUNCTION KILL`
96
- - `MEMORY PURGE`
97
- - every command in that server's `@dangerous` category. Redis 8 adds `TRIMSLOTS` and `BACKUP` there. They are not in `@admin` or `@scripting`, and `@write` and `@keyspace` grant `TRIMSLOTS`
98
- - `RANDOMKEY` and `SCAN`. Both return key names and do not take a key argument, so a key pattern does not apply to them
99
- - the whole `ACL`, `CLIENT`, `CLUSTER`, `FUNCTION`, `SCRIPT`, or `MEMORY` command
100
-
101
- These probe commands are not a rejection by themselves: `ACL WHOAMI`, `ACL GETUSER`, and `ACL CAT`. `ACL GETUSER` cannot be limited to the current username, so this account can also read every user's ACL password hash. That probe disclosure is separate from key names returned by `RANDOMKEY` or `SCAN`. Startup calls `ACL GETUSER` only for the authenticated user and does not log or return that reply. Cluster discovery commands such as `CLUSTER SLOTS`, `CLUSTER NODES`, and `CLUSTER SHARDS` are not a rejection, and neither is `MEMORY USAGE` or `CLIENT SETNAME`. The account must be allowed to run the probe, or startup fails with `[redis_privilege_probe_failed]` even when the opt-out is set. A refused connection fails with `[redis_connection_failed]` and is not skipped by the opt-out.
102
-
103
- An account limited to the read commands it needs, plus the probe commands, starts with the default configuration. No opt-out is required. `@read` includes `RANDOMKEY` and `SCAN`, so the read account also needs `-randomkey` and `-scan`. On Redis 6.2, `@read` includes `memory`, and `MEMORY PURGE` is not its own ACL name, so that account also needs `-memory`. The same shape works for a business account that grants the data categories and then revokes the global operations. `+@write` includes `FLUSHALL` and, on Redis 7, `FUNCTION FLUSH`, `FUNCTION DELETE`, `FUNCTION LOAD`, and `FUNCTION RESTORE`. On Redis 8 it also includes `TRIMSLOTS`. `+@connection` includes `CLIENT KILL`. `+@slow` and `+@scripting` include `EVAL` and `SCRIPT DEBUG`. Grant the broad category first, then revoke `@admin`, `@dangerous`, and `@scripting`, then revoke `RANDOMKEY`, `SCAN`, and the other individual global commands, then add the probe commands back. Redis 6.2 rejects unknown names such as `-function` and `-memory|purge`. Use `-memory` and `-@scripting` there. `-randomkey` and `-scan` are valid on Redis 6.2.
104
-
105
- ```redis
106
- ACL SETUSER mcp-reader on >strong-password ~app:* resetchannels &
107
- -@all
108
- +@read
109
- -@admin
110
- -@dangerous
111
- -randomkey
112
- -scan
113
- +ping
114
- +acl|whoami
115
- +acl|getuser
116
- +acl|cat
117
- ```
118
-
119
- ```redis
120
- ACL SETUSER mcp-app on >strong-password ~app:* resetchannels &
121
- -@all
122
- +@read +@write +@string +@hash +@list +@set +@sortedset +@stream +@fast +@keyspace +@connection
123
- -@admin -@dangerous -@scripting
124
- -flushall -flushdb -swapdb -migrate -memory|purge
125
- -randomkey -scan
126
- +ping +acl|whoami +acl|getuser +acl|cat
127
- +cluster|slots +cluster|nodes +cluster|shards
93
+ ```bash
94
+ make build
95
+ ./bin/redis-mcp-server version
96
+ ./bin/redis-mcp-server tools list --config config.example.yaml
128
97
  ```
129
98
 
130
- `allow_unsafe_database_role` defaults to `false`. Set it to `true` in the config file, or export `MCP_ALLOW_UNSAFE_DATABASE_ROLE=true`, only when you cannot provision a least-privilege account. The server logs a warning and skips this privilege rejection. A refused connection, a failed ACL probe, and every other startup check still stop startup. The Redis user can still run `FLUSHALL`, `CONFIG`, `DEBUG`, or `SHUTDOWN` outside the tool catalog: this server does not expose a raw command, but the account itself can. Enable the option only for a Redis instance you control.
99
+ `tools list` does not connect to Redis. The table includes `redis_string` and omits `redis_string_write` while `write_enabled` is false. The version line from `make build` comes from `git describe` and can differ from `0.2.0`. Go, test, and release details are in [development and release](docs/development.md).
131
100
 
132
- The warning is logged at warn level. HTTP mode shows it at the default `info` log level. Stdio mode keeps logs disabled so MCP output stays intact. Do not use the Redis `default` user. A standard server grants that user `+@all`.
101
+ ## Configure Redis
133
102
 
134
- ## Output masking
103
+ Keep the password in `MCP_REDIS_PASSWORD`. Do not add it to YAML. A `password` key in YAML is ignored.
135
104
 
136
- Masking is off when the `masking` object is absent, when `enabled` is omitted, or when `enabled` is false. Tool results, CLI output, and errors then keep their current JSON. Set `enabled` to true and at least one rule to remove configured field names and values from output. `MCP_MASKING_JSON` replaces the whole YAML object when the variable is present. An empty value is rejected. Unset leaves the YAML object in place.
137
-
138
- ```yaml
139
- masking:
140
- enabled: true
141
- placeholder: "[masked]"
142
- names: ["synthetic_field"]
143
- name_patterns: ["token_.+"]
144
- values: ["synthetic-token-value"]
145
- value_patterns: ["sk_live_[0-9]+"]
146
- ```
105
+ `config.example.yaml` is a valid file. Copy it, then change `redis.addresses`. You can skip the file when the environment supplies topology and addresses:
147
106
 
148
107
  ```bash
149
- export MCP_MASKING_JSON='{"enabled":true,"names":["synthetic_field"],"values":["synthetic-token-value"]}'
108
+ export MCP_REDIS_TOPOLOGY=standalone
109
+ export MCP_REDIS_ADDRESSES=127.0.0.1:6379
110
+ export MCP_REDIS_PASSWORD='your-redis-password'
111
+ npx -y @futuretea/redis-mcp-server@0.2.0
150
112
  ```
151
113
 
152
- Name rules match a whole dynamic object key, hash field, or other data string. Value rules are substring matches on the original text, including one-character literals. They run once and do not search the placeholder. A matched string becomes the placeholder. A matched number, bool, or other non-string becomes JSON `null`. An existing null stays `null`, so null can be a missing Redis value or a redacted value, and the JSON type can change.
114
+ For Sentinel, also set `MCP_REDIS_SENTINEL_MASTER`. Separate several addresses with a comma. A space does not split an address. `127.0.0.1:6379, 10.0.0.2:6379` is two addresses. `standalone` uses the first address. `cluster` uses every address as a seed. `sentinel` uses every address as a Sentinel endpoint.
153
115
 
154
- Redis binary cells are masked from the original bytes, then both `utf8` and `base64` are written again from that result. A pair whose siblings disagree is rejected. Invalid UTF-8 stays in `base64` only. JSON objects and arrays stored as text are read as JSON, including escaped keys. `redis_key` `dump` is opaque. With an active policy it returns `[redis_masking_failed] result was not returned` and no payload. With masking off, `DUMP` is unchanged. `metadata.next_cursor` is a 16-byte continuation reference, not the stored key. If a rule matches that token, the page fails instead of returning a raw or rewritten cursor.
116
+ Precedence, TLS, database 0, and the rest of the fields are in the [reference](docs/reference.md).
155
117
 
156
- Invalid masking configuration, including `enabled: true` with no rules, stops startup with `invalid masking config` and does not echo the document. Bounds, duplicate keys, and key collisions use the same fixed failure and no partial payload. The Redis command and its arguments are unchanged. HTTP debug logs record a route class (`mcp`, `sse`, `message`, or `other`) instead of the raw path or query.
157
-
158
- This covers the server's known Redis result shapes. It does not detect every private value, compressed payload, unknown encoding, or arbitrary PII.
159
-
160
- The copied engine is mysql-mcp-server commit `6c6f58a343ff61e5f1e220b5cbdff7899afd886d`. This server does not patch those rules. Name patterns are parsed on their own and then anchored in the syntax tree. `a)|(b` is invalid. `(?:a)|(b)` matches only the whole names `a` and `b`. One budget is shared across a whole Redis result. A base64 cell longer than the input cap is rejected before it is decoded, and the paired `utf8` sibling is not returned. A value-rule hit on a native number or bool replaces that whole value with JSON `null`. A JSON value is counted again as its container, so it can exhaust the budget before a plain string of the same size. RE2 returns the leftmost-first match and does not search a longer alternative after a shorter one matches. Those two are limits. Masking still does not detect every private value, compressed payload, unknown encoding, or arbitrary PII.
161
-
162
- ## Production safety guide
163
-
164
- This server reduces the Redis capabilities exposed to an AI client; it is not an authentication gateway or a complete data-access policy. Read-only mode prevents mutations, but reads can still disclose data or consume Redis capacity.
165
-
166
- ### Keep writes disabled by default
118
+ ```yaml
119
+ port: 0
120
+ listen: 127.0.0.1
121
+ sse_base_url: ""
122
+ log_level: info
123
+ enabled_tools: []
124
+ disabled_tools: []
125
+ enabled_domains: []
126
+ disabled_domains: []
127
+ allow_unsafe_database_role: false
128
+ redis:
129
+ topology: standalone
130
+ addresses: ["127.0.0.1:6379"]
131
+ username: ""
132
+ tls: false
133
+ sentinel_master: ""
134
+ write_enabled: false
135
+ ```
167
136
 
168
- Keep `redis.write_enabled: false` for untrusted or general-purpose AI clients. Enabling it registers mutation tools, including key deletion and collection trimming; it is not a per-request approval mode.
137
+ The block above is the values in [config.example.yaml](config.example.yaml). The tracked file also has comments for the environment names and for the commented-out `masking` object. Masking stays off while that object is commented out.
169
138
 
170
- ### Expose the smallest useful tool set
139
+ ## Call a tool
171
140
 
172
- Use `enabled_tools` to expose only the tool families required by the client. Tool filtering is at the tool level, not the operation level: enabling `redis_string`, for example, exposes all of that tool's declared read operations. Do not expose `redis_key` or `redis_observe` to an untrusted client unless key discovery and keyspace metadata are required.
141
+ `tools describe` prints the schema and does not connect.
173
142
 
174
- ```yaml
175
- enabled_tools:
176
- - redis_string
177
- - redis_hash
178
- disabled_tools:
179
- - redis_key
180
- - redis_observe
143
+ ```bash
144
+ ./bin/redis-mcp-server tools describe redis_string --config config.example.yaml
145
+ ./bin/redis-mcp-server tools call redis_string --config config.example.yaml \
146
+ --params '{"operation":"get","args":{"key":"sample"}}'
181
147
  ```
182
148
 
183
- ### Restrict the Redis account and keyspace
149
+ `tools call` connects. With no Redis at the example address, it exits non-zero and writes `[redis_connection_failed] connection failed` to stderr.
150
+
151
+ Write tools appear only after `redis.write_enabled` is true or `MCP_REDIS_WRITE_ENABLED=true`. Enabling writes registers delete and trim operations. It is not a per-call approval step. Leave it false for a general-purpose client.
184
152
 
185
- Connect with a dedicated Redis ACL account. Grant it only the commands and key patterns needed by the selected tools; do not use an administrator or application-owner account. Startup rejects `@admin`, `@dangerous`, `@scripting`, `FLUSHALL`, `FLUSHDB`, `TRIMSLOTS`, `FUNCTION FLUSH`, `SCRIPT DEBUG`, `MEMORY PURGE`, `RANDOMKEY`, `SCAN`, `CONFIG`, `DEBUG`, `SHUTDOWN`, and the other commands listed under Service account unless `allow_unsafe_database_role` is set. A key pattern limits commands that name a key. It does not apply to keyless commands. `RANDOMKEY` and `SCAN` return key names from the whole keyspace, including names the pattern cannot `GET`. `DBSIZE` still counts those keys. `redis_key` `random_key` and `redis_observe` `scan` call `RANDOMKEY` and `SCAN`, so a tenant profile that revokes those commands cannot use those operations. `ACL GETUSER` remains a separate probe permission and is not a key-name listing.
153
+ `enabled_tools` selects whole tools. Enabling `redis_string` exposes every read operation of that tool, not one operation. Leave `redis_key` and `redis_observe` out of the list unless the client needs key names or keyspace metadata. `RANDOMKEY` and `SCAN` return key names from the whole keyspace.
186
154
 
187
- ### Put HTTP and SSE behind an authenticated boundary
155
+ Use a Redis ACL account that can run the catalog and the startup probe, and that cannot run admin, flush, script, or keyless enumeration commands. The rejection list and the account shapes used by the startup test are in the [reference](docs/reference.md). `allow_unsafe_database_role` defaults to false. Set it only when you cannot create that account and you control the Redis instance.
188
156
 
189
- Prefer stdio for local MCP clients. When using HTTP or SSE, place the server behind TLS, fail-closed authentication, network isolation, and request rate/concurrency limits. Do not expose the process directly to an untrusted network.
157
+ ## Choose stdio or HTTP
190
158
 
191
- ### Bound enumeration and verify the deployed catalog
159
+ Prefer stdio for a local client. The `npx` and `docker run` commands above are stdio.
192
160
 
193
- `SCAN` does not take a key, so a key pattern does not limit it. A tenant profile revokes `SCAN` and `RANDOMKEY`. Where those commands remain granted, repeated `SCAN` requests can list key names outside that pattern. Each collection page is still bounded. Apply gateway quotas and monitoring for request rate, scan volume, latency, and errors. Before deployment, inspect the actual catalog:
161
+ For HTTP, set a port. The default listen address is `127.0.0.1`.
194
162
 
195
163
  ```bash
196
- ./bin/redis-mcp-server tools list --config production.yaml
164
+ ./bin/redis-mcp-server mcp --config redis-mcp.yaml --port 8080
197
165
  ```
198
166
 
199
- Confirm that no `*_write` tool is registered and that every listed tool is intentional. Also verify that the deployment boundary rejects unauthenticated requests and that the Redis ACL denies keys outside the intended scope.
167
+ Streamable HTTP is `http://127.0.0.1:8080/mcp`. SSE is `http://127.0.0.1:8080/sse`. `GET http://127.0.0.1:8080/healthz` returns the body `healthy` after startup. `HEAD` returns `200` and no body. The process does not check an `Authorization` header.
200
168
 
201
- ## Transports and deployment
169
+ Inside a container, `127.0.0.1` is the container loopback. To publish the port, set `--listen 0.0.0.0` and publish it only on a network that should reach an unauthenticated process.
202
170
 
203
171
  ```bash
204
- ./bin/redis-mcp-server mcp --config config.example.yaml
205
- ./bin/redis-mcp-server mcp --config config.example.yaml --port 8080
172
+ docker run --rm -i \
173
+ -p 127.0.0.1:8080:8080 \
174
+ --env MCP_REDIS_PASSWORD \
175
+ --mount type=bind,src="$PWD/redis-mcp.yaml",dst=/etc/redis-mcp-server/config.yaml,readonly \
176
+ ghcr.io/futuretea/redis-mcp-server:v0.2.0 \
177
+ --config /etc/redis-mcp-server/config.yaml \
178
+ --port 8080 \
179
+ --listen 0.0.0.0
206
180
  ```
207
181
 
208
- Streamable HTTP and SSE remain available. If HTTP/SSE is publicly exposed, an external fail-closed authentication boundary must reject unauthenticated requests before they reach this process. This repository does not implement authentication, gateway integration, or authentication-header authorization.
182
+ Put TLS and authentication in front of any listener that other machines can reach.
183
+
184
+ ## Enable masking
209
185
 
210
- ## Development
186
+ Masking is off in the example file. To turn it on, set `enabled` to true and at least one rule. `MCP_MASKING_JSON` replaces the whole YAML object when the variable is set.
211
187
 
212
188
  ```bash
213
- make test
214
- make lint
215
- make build
216
- make integration
189
+ export MCP_MASKING_JSON='{"enabled":true,"names":["synthetic_field"],"values":["synthetic-token-value"]}'
217
190
  ```
218
191
 
219
- `make integration` uses the pinned Redis 8.8.1 image in `testdata/redis/images.lock` to start standalone, Cluster, and Sentinel test topologies. Docker, image, network, compose, or integration-test failures make the target fail.
192
+ Names, patterns, placeholder, limits, and the Redis cases that fail closed are in the [reference](docs/reference.md). Masking does not find every private value.
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@futuretea/redis-mcp-server",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Redis Model Context Protocol server",
5
5
  "main": "./bin/index.js",
6
6
  "bin": {
7
7
  "redis-mcp-server": "bin/index.js"
8
8
  },
9
9
  "optionalDependencies": {
10
- "@futuretea/redis-mcp-server-darwin-amd64": "0.2.0",
11
- "@futuretea/redis-mcp-server-darwin-arm64": "0.2.0",
12
- "@futuretea/redis-mcp-server-linux-amd64": "0.2.0",
13
- "@futuretea/redis-mcp-server-linux-arm64": "0.2.0",
14
- "@futuretea/redis-mcp-server-windows-amd64": "0.2.0"
10
+ "@futuretea/redis-mcp-server-darwin-amd64": "0.2.1",
11
+ "@futuretea/redis-mcp-server-darwin-arm64": "0.2.1",
12
+ "@futuretea/redis-mcp-server-linux-amd64": "0.2.1",
13
+ "@futuretea/redis-mcp-server-linux-arm64": "0.2.1",
14
+ "@futuretea/redis-mcp-server-windows-amd64": "0.2.1"
15
15
  },
16
16
  "repository": {
17
17
  "type": "git",