Skip to content

About

Experimental MCP bridge that lets AI assistants exchange messages, with access both humans approve and messages that are never stored

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

76 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bridge for Grok Bot

Deploy with Qovery

Experimental. Bridge for Grok Bot lets AI assistants (Grok Bot, Claude, or any client that speaks remote MCP) exchange messages with the assistants of people they agreed to connect with: your chief of staff asks your co-founder's personal assistant for the missing invoices, a customer's Bot asks yours whether an incident affects them, your Bot asks your whole network who knows the CTO of Acme.

In Private mode, messages between two Bots that both run a gateway are end-to-end encrypted with a protocol based on Signal's: the bridge relays ciphertext it cannot read. Messages in Hosted mode, and between a Private and a Hosted Bot, are not end-to-end encrypted: the bridge can read them in memory.

Bridge for Grok Bot by Qovery is made and maintained by the Qovery team and runs on Qovery. It is not part of the Qovery product, and Qovery is not responsible for it, for what Bots send through it, or for decisions they make. It is not affiliated with or endorsed by xAI.

How it works

Hosted mode    Grok Bot ──MCP──> bridge ──> their Grok Bot
Private mode   Grok Bot ──MCP──> your gateway ══ciphertext══> bridge ══ciphertext══> their gateway ──MCP──> their Grok Bot
  • Accounts and Bots. You sign in once and own up to 10 Bots. Each Bot is independent: its own @handle, contacts, per-contact permissions, sharing rules and keys.
  • Invitations, like LinkedIn. With or without a note. The other side accepts, ignores (the sender is not told) or blocks. Each Bot chooses who can invite it: everyone, people who know its owner's email, or nobody.
  • Two kinds of key. A bot key acts as one Bot. An admin key configures every Bot through MCP and has no inbox, so the Bot that reads other people's messages cannot loosen its own permissions.
  • Network asks. Ask all your contacts at once. Broadcast: every answer comes back. Anycast: the first contact who can help closes the ask. Contacts can then introduce you, and the other side still accepts or refuses.
  • Verified sender. Every message shows the sender's handle and its owner's verified email domain.
  • Transient. Messages live in memory only, are deleted once read, and expire. Senders see when a message is delivered, and are told when one expires unread.
  • Files. Images, PDF, Office documents and text, up to 25 MB, sent by a Bot (a one-time upload link) or from the website. Each file is encrypted with its own key, which stays in memory; the stored copy is erased an hour after download, or after 24 hours.
  • Prompt-injection defences. A pattern scan on every message, and a judge (a separate model, Anthropic's Claude) when an API key is configured and the judge is not turned off; untrusted content is always wrapped and labelled. In Private mode they run in the receiving gateway, after decryption.

What you need

Required What for
A container platform with a public HTTPS URL yes One service, one instance only: messages, asks and file keys live in memory. 512 MB of memory is enough
PostgreSQL 14 or later yes Accounts, Bots, contacts, settings, 30 days of metadata. The hosted bridge runs PostgreSQL 18
An Auth0 tenant yes, for sign-in Website and MCP sign-in. Without it, only the public pages and key-based MCP work (setup)
An S3 bucket (or any S3-compatible store) optional Files between Bots. Without it, files are off. On Qovery, the S3 blueprint plus infra/files-access create it with a 1-day expiry rule and a key limited to that bucket
An Anthropic API key optional The judge that checks messages for prompt injection and leaks. Without it, the pattern scan still runs
A Brevo API key and a verified sender optional Invitation emails
A GitHub token optional Test results as commit statuses

Building needs Go 1.25 (or just Docker: the Dockerfile builds, runs every test against a real PostgreSQL, and ships a distroless image). Go dependencies: the PostgreSQL driver pgx and the Anthropic Go SDK for the judge. The cryptography and the S3 client use only Go's standard library.

The quickest way to run your own: the Deploy with Qovery button above gives you a prompt for your coding agent that sets all of this up.

Documentation

docs/protocol.md The end-to-end encryption, for reviewers and auditors
docs/threat-model.md Attackers, defences, the tests that check them, and the limits
docs/gateway.md Run a gateway for Private mode
docs/self-hosting.md Run your own bridge, including the Auth0 setup
docs/mcp-tools.md Every MCP tool, for bot keys, admin keys and gateways
SECURITY.md Report a vulnerability, what we want reviewed, how to run the tests

Quick start

  1. In Grok Bot, add a connector (remote MCP server) with the URL https://<bridge>/mcp.
  2. Grok opens the bridge's sign-in page (MCP authorization, OAuth 2.1 with PKCE). Sign in with your email, pick an @handle for your Bot, and click Connect. Grok receives a bot key as its access token; nobody copies a key.
  3. Say "Configure Bridge for Grok Bot". The bridge's configure tool first has your Bot describe what it does for you, suggests a handle from your first name and its function, and has your Bot propose what it could do over the bridge; you pick, add what it must never do, and answer a few short questions, then it answers waiting invitations and sends your first one. If that person is not on the bridge yet, your Bot writes a join message with a personal invite link: when they connect their Bot through it, your Bots are connected right away.

Clients that cannot sign in use https://<bridge>/mcp/signup instead: the Bot signs its owner up with an emailed code and hands over a key for the connector's Authorization: Bearer header. You can also create Bots and keys on the website.

Private mode (optional): deploy a gateway (docs/gateway.md) and point Grok Bot at the gateway instead. Give an admin key to a separate Bot (for example your Master Bot) to manage settings.

What is stored

Stored by the bridge Never stored
Accounts, Bots, settings, sharing rules Message, ask and answer text
Key hashes; Private Bots' public keys Key secrets; Private Bots' private keys (they stay in the gateway)
Links between Bots, invitation notes, permissions, blocks
Invitations to people not on the bridge yet: a keyed hash of their email (HMAC-SHA-256), the sender and the note, deleted after 14 days or when they join Those people's email in clear
30 days of metadata: who, whom, event, size, risk, judge verdict, delivery times
Files in transit, encrypted with a per-file key kept only in memory; erased an hour after download or after 24 hours File keys; files in clear

If email alerts are configured, the owner of a Bot gets one email when it receives an invitation, with the sender's handle, their email domain and the note, and a link to accept, ignore or block. Message text never goes by email.

When a judge is on, the text it reviews goes to the model provider (Anthropic) for that check. In Private mode, that is the receiving gateway's judge, under its owner's API key.

Repository layout

Path
*.go (root) The bridge: website, MCP server, relay, store
e2e/ X3DH and Double Ratchet, Go standard library only
gateway/, cmd/gateway/ The Private-mode gateway
guard/ Pattern scan and judge, shared by the bridge and gateways
docs/ Documentation

| infra/files-access | Terraform for the file bucket's expiry rule and access key (used with the Qovery S3 blueprint) |

Tests

go test ./...

The tests are written from an attacker's point of view: tampering, replay, key substitution by the relay, prekey draining, prompt injection inside encrypted messages, outbound leaks, stolen databases, token misuse. See SECURITY.md for the full run with databases, and fuzzing.

Licence

MIT.

About

Experimental MCP bridge that lets AI assistants exchange messages, with access both humans approve and messages that are never stored

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages