Claude Code Redis Channels (claude-code-redis-channels)
A minimal Redis-backed channel integration for Claude Code, implemented in Python.
Overview
This package provides an MCP (Model Context Protocol) server that enables Claude Code to receive events and send replies via Redis. It supports multi-agent scenarios, inter-agent synchronization, and a synchronous "await" bridge for external callers.
Features
- Python-Native: Built with
mcpPython SDK andasyncio. - Multi-Agent Support: Route messages to specific agents via unique
AGENT_ID. - Two-Way Support: Reply to messages from Claude Code using a Redis
replytool. - Sync-over-Async: Await an agent's response via a blocking HTTP endpoint (
GET /await/{agent_id}). - Inter-Agent Coordination: Agents can wait for each other indefinitely using the
await_messagetool. - Minimal Dependencies: Only requires
mcp,redis,starlette, anduvicorn.
Setup
Requirements
- Python 3.12+
uv(recommended)
Installation
uv tool install .
Configuration
Add the server to your .mcp.json:
{
"mcpServers": {
"redis-channel": {
"command": "uv",
"args": ["run", "--package", "claude-code-redis-channels", "redis-channel"],
"env": {
"REDIS_URI": "redis://localhost:6379",
"AGENT_ID": "dallas-main",
"HTTP_PORT": "8000"
}
}
}
}
Await Endpoint (Sync Bridge)
The server can optionally host an HTTP endpoint that blocks until the agent sends a reply. This allows CLI scripts or microservices to "wait" for Claude to finish.
# In one terminal, wait for Claude's next message (indefinite wait)
curl "http://localhost:8000/await/dallas-main"
# In Claude Code:
# > reply chat_id="123" text="Task complete!"
Usage
Start Claude Code with the development channel flag:
claude --dangerously-load-development-channels server:redis-channel
Sending Messages
Send a JSON payload to a specific agent's inbox:
redis-cli PUBLISH claude:inbox:dallas-main '{"content": "Hello Dallas!", "meta": {"chat_id": "123"}}'
Inter-Agent Communication
Agents can wait for each other indefinitely within their session:
await_message(target_agent_id="other-agent")
Testing
A manual integration test script is included in scripts/test_mcp.py. It simulates a Claude Code session and verifies Redis communication.
uv run scripts/test_mcp.py
Note: Requires a running Redis instance on localhost:6379.
Metadata
Release files for claude-code-redis-channels 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| claude_code_redis_channels-0.1.0.tar.gz | 4.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claude_code_redis_channels-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / claude_code_redis_channels-0.1.0.tar.gz
| Download URL | claude_code_redis_channels-0.1.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7af76a5e41cd17aaff58af656dd5cecfb95e508b5ef3fce261589cc2369ecd3
|
|
BLAKE2b-256 checksum How to use checksums |
86612a0a07998455a7dd48f287b116b2a6ec7d56fcd5fc6a7dd3dbd0f59a9022
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.23
|
Release files / claude_code_redis_channels-0.1.0-py3-none-any.whl
| Download URL | claude_code_redis_channels-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2bdd16906df8b9c76bf641a260bbcf5e4d214f72472ea642975b7c780097d64
|
|
BLAKE2b-256 checksum How to use checksums |
9e74009bfb1f3346cffa9e5e689253aa12b634782a241d4b651cc01e79a79c0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.23
|
Security for claude-code-redis-channels 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.