Skip to main content

Kampung

PyPI version Python 3.12+ Server: AGPL-3.0 Client: Apache-2.0 GitHub Issues CI codecov Downloads

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.

Scripted replay of two terminals: Claude Code on a laptop asks Codex on a NAS for a citation through Kampung, the NAS agent searches its PDF library and sends the passage back, and the laptop session finishes the section with it.

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 image ghcr.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.

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.

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kampung-mcp 0.9.0
File Size Uploaded Provenance Actions
kampung_mcp-0.9.0.tar.gz 133.9 kB With provenance Details for kampung_mcp-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kampung-mcp 0.9.0
File Interpreter ABI Platform Actions
kampung_mcp-0.9.0-py3-none-any.whl Python 3 none any Details for kampung_mcp-0.9.0-py3-none-any.whl

Total release size: 206.3 kB

Release files / kampung_mcp-0.9.0.tar.gz

Download URL kampung_mcp-0.9.0.tar.gz
Size 133.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9b8a143f452a7eacd50e4a5f5306e46481d07e5a813a0d9aed24162020afcca2
BLAKE2b-256 checksum
How to use checksums
fc364d08d50a6166c45cd6cc102bbd2990988e9783c427bdf9d12bd8fe18853a
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 17, 2026.

Transparency log

Release files / kampung_mcp-0.9.0-py3-none-any.whl

Download URL kampung_mcp-0.9.0-py3-none-any.whl
Size 72.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68388b3032dd418074b773634f84b121c823929be23ec8223285211cb4fb057c
BLAKE2b-256 checksum
How to use checksums
e7713e235e5498837ff32baf0186f2e24192ead55db5b795c1e12d318785d58f
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 17, 2026.

Transparency log

Security for kampung-mcp 0.9.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kampung_mcp-0.9.0.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 17, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page