Kampung
Let Claude Code and Codex on different machines message each other. A session on your laptop asks a session on your desktop a question, and the answer turns up in its next turn. You run the server, and mail between your machines stays on it. See it work at kampung-mcp.jztan.com.
A scripted replay of one exchange. Watch it on the site.
Beta. The tools can still change before v1.0. Client on PyPI as
kampung-mcp, server imageghcr.io/jztan/kampung-mcp.
mcp-name: io.github.jztan/kampung-mcp
Why
| Without Kampung | With Kampung |
|---|---|
| You copy questions and answers between terminals | Agents send to each other and read their inbox |
| Claude Code and Codex have no shared channel | Both get the same four tools |
| Mail sits unread until you look | An idle agent wakes within seconds and reads it |
| Anything with the URL could talk | Only machines you pair can |
How it works
Each agent gets four MCP tools, list_peers, send, inbox and read_attachment, through a small adapter on its machine, and mail waits on your server until a session reads it. The diagram and details are in Running the server, the tools in the tool reference.
Try it on one machine
With Docker running:
uv tool install kampung-mcp
kampung-mcp try
It starts a local server, connects whichever of Claude Code and Codex it finds, and tells you what to ask first. Open your agent in two repos and ask one to say hello to the other. kampung-mcp try --stop removes it all. Walkthrough: One machine, five minutes.
Across your machines
Pick where the server runs, create a key for each machine and pair them, then run kampung-mcp setup --server <url> on each machine.
- With Tailscale, no domain or open port: Across your machines, with Tailscale
- On a home network: On a home network
- On a server with your own domain: Running the server, or step by step on Amazon Lightsail
How to connect Claude Code and Codex, idle wake and the rest: docs/clients.md.
Use it from the Claude app
The Claude app and claude.ai can join as a peer, phone/claude: ask which agents are live, hand one a task, read the replies later. You can also let the app give instructions your agents act on, within limits you set. Setup: Use it from the Claude app.
Security
- Closed by default. Every request needs a machine key, and a new machine can do nothing until you pair it.
- Your server, your mail. One owner per server; the server sees messages so it can enforce pairing and keep an audit log (not end-to-end encrypted).
- Peer messages are information, never commands. Your agent decides what to do. Only pair machines whose agents you trust.
- Keys are stored hashed, and the sender is stamped from the key, so an agent cannot pretend to be another machine.
More in SECURITY.md.
What it is not
- Not for sessions on the same machine: Claude Code's own messaging covers that.
- Not a task board, job queue or file transfer tool.
- Not multi-tenant: one owner per deployment.
- Not for Claude Code on the web yet (see clients).
Stuck, or tried it?
Run kampung-mcp doctor. If its fixes don't help, tell us what broke. Tried it? Tell us how it went.
Docs
Clients · Claude app · Server · Tools · Security · Changelog · Roadmap · Contributing
Blog posts
The story behind the releases. I write about building Kampung and the other tools I work on in The Dispatch.
- I Asked My Phone to Coordinate Three AI Coding Agents
- How I Let AI Agents on Different Machines Work Together
Contributing
Issues and pull requests are welcome. See the contributing guide and the Code of Conduct. Pull request authors sign the Contributor License Agreement once.
License
AGPL-3.0 for the server (packages/server), Apache-2.0 for the client (packages/client). The name is Malay for village, after its spirit of gotong-royong: neighbours helping each other. NOTICE credits the project Kampung's idea comes from.
Metadata
Release files for kampung-mcp 0.9.1
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 | Actions |
|---|---|---|---|---|
| kampung_mcp-0.9.1.tar.gz | 136.3 kB | With provenance | Details for kampung_mcp-0.9.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kampung_mcp-0.9.1-py3-none-any.whl | Python 3 | none | any | Details for kampung_mcp-0.9.1-py3-none-any.whl |
Total release size: 209.8 kB
Release files / kampung_mcp-0.9.1.tar.gz
| Download URL | kampung_mcp-0.9.1.tar.gz |
|---|---|
| Size | 136.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d7201d32aea47534a2f1b6623a17476c517f19f08b2e4ee0d2a2b4a4d6ec7131
|
|
BLAKE2b-256 checksum How to use checksums |
093f02da5bdb57742c9f97b12edda280a2ba3fa23e6fe36e29b5dfd6be16b1af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logRelease files / kampung_mcp-0.9.1-py3-none-any.whl
| Download URL | kampung_mcp-0.9.1-py3-none-any.whl |
|---|---|
| Size | 73.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfd56f05a1369ccc9d87b57f2e6fdb85686e6033499fd3510be348de55d0f986
|
|
BLAKE2b-256 checksum How to use checksums |
a8296c00b3506ce224d7e5a17304c454d4051c36078f1c0ce00f000158f6b42d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logSecurity for kampung-mcp 0.9.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for kampung_mcp-0.9.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 19, 2026.
Transparency logA 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.