counterpunchtech / mcpmesh

mcpmesh

Share MCP servers with people you trustpeer to peer, no accounts, no cloud.

you
friend
→ arrow keys or the rail below to navigate
The problem

Your AI's tools end at your machine.

MCP servers — your notes, your code search, your scripts — run locally, wired into your AI client. The moment you want a friend's AI to use one of them, today's answer is heavyweight: host it on the internet, add OAuth, create accounts, trust a cloud middleman.

All you actually wanted was: “my AI can use my friend's tools, and theirs can use mine.”
What it is

Any MCP server, shared with a specific person.

Register any MCP server under a name you pick, hand one person an invite, and their AI client — Claude Desktop, or anything that speaks MCP — mounts it as if it were local. Requests travel an encrypted connection straight between your two machines.

No hosting

Nothing is published to the internet. Your server keeps running where it always did — on your machine.

No accounts

No signup, no OAuth, no directory. Identity is a keypair on your device; names are nicknames you choose.

No middleman

iroh/QUIC with NAT hole-punching: end-to-end encrypted, machine to machine. No server of ours in the trust path.

How you use it

Four verbs. One minute.

1
serve

Register any MCP server under a name you pick.

2
invite

Mint a one-time, expiring invite for that share.

3
pair

Your friend redeems it — the machines now trust each other.

4
connect

pair prints the exact command to wire it into their AI client.

you
$ mcpmesh serve notes -- npx -y @modelcontextprotocol/server-filesystem ~/notes
$ mcpmesh invite notes
One-time invite (expires in 24h):
  mcpmesh-invite:…   ← send over any channel
friend
$ mcpmesh pair mcpmesh-invite:…
Paired with you — code: tango-fig-cabbage
You can now use: you/notes
To use in Claude Code, run:
$ claude mcp add you-notes -- mcpmesh connect you/notes
Their AI can now search your notes.
The ceremony

Two screens, same three words.

After pairing, both machines display the same short code. Read it to each other out loud — matching words mean the pairing is authentic. The invite channel doesn't need to be secure: tampering with an invite makes the codes mismatch.

  • Invites are one-time and expiring — a stolen invite line goes stale, and a redeemed one is spent.
  • Names are nicknames. “alice” is your name for your peer, local to you — there are no global identities to squat or spoof.
  • Pairing is mutual, access is not. One redemption makes the two devices know each other; every service grant stays explicit and one-way until given.
How it works

How a request travels.

Bob's AI thinks it's talking to a local MCP server. The proxy hands frames to a per-user daemon, which dials Alice's device directly and is vetted at her door before her real server hears a word.

bob's machine
AI client
Claude Desktop · speaks MCP over stdio
mcpmesh connect alice/notes
thin proxy · interprets nothing
mcpmesh daemon
owns keys, peers, dialing & sessions
alice's machine
mcpmesh daemon
accepts the session
trust gate
is this device paired? is “notes” granted to it? default-deny
notes — the real MCP server
any command · answers as if Bob were local
Trust model

Default-deny, and everything undoable.

Nothing shared until you say so

No service is reachable until you run serve + invite, and every grant names exactly who gets access to exactly which service. Grants accumulate; none is implied.

Self-sovereign identity

Device keys never leave the machine. People are verified device→user bindings, so sharing with a person reaches all their paired devices — still with no registry anywhere.

Instant revocation

mcpmesh pair --remove alice cuts a peer off from your services immediately. status shows everything you serve and reach; doctor health-checks the setup.

The boundary, in one line

mcpmesh authenticates who you're talking to and encrypts the pipe — it does not vet what a peer's server says. Treat a peer's tool output like any content from that person.

For teams

Roster mode: an org in a signed file.

Pairing is person-to-person. Roster mode layers team membership on the same machinery: an operator runs mcpmesh org create, members mcpmesh join, and membership lives in a signed roster document on any static web host.

Signature is the boundary

The org root key signs the roster. The web host, the network, and the gossip layer are all untrusted transport — they can only fail to deliver, never forge.

Any static host

A roster is a JSON file. Serve it from a bucket, a Pages site, a closet server — nodes poll the URL and gossip newer serials to each other.

Revocation severs

Removing a member publishes a new roster serial; every node converges on it and cuts the member's live sessions everywhere.

Under the hood

Five small crates, one wire format.

mcpmesh
The binary: the porcelain verbs, plus a per-user daemon it auto-starts
mcpmesh-net
Transport kernel — iroh/QUIC sessions, accept-time trust gating
mcpmesh-trust
Keys, signed rosters, device→user bindings — no network code
mcpmesh-codec
The one NDJSON frame codec both ends of every wire share
mcpmesh-local-api
The local control API (mcpmesh-local/1) clients and plugins build on
install cargo install mcpmesh platforms macOS · Linux (x86_64 / aarch64) license MIT OR Apache-2.0 status pre-release — wire & config may still change source github.com/counterpunchtech/mcpmesh
01 / 09