Skip to main content
Glama
Discord Dot Bridge
by nullglobdev

Discord Dot Bridge

An experimental, owner-only Discord bridge to an existing ChatGPT dot. Use a bot DM or explicit bot mentions in one configured private guild text channel. MIT licensed. This project is not affiliated with OpenAI or Discord.

Status: real Discord Gateway/REST, MCP HTTP, OAuth resource-server, and signed webhook adapters are implemented and tested against local mock services. A real ChatGPT account, dot, bot and identity provider have not been tested together. Metadata-only Docker staging is verified; live bridge activation remains pending. There is no claim of verified end-to-end operation with ChatGPT.

Owner DM -> Discord bot Gateway -> verified owner DM -> SQLite outbox
         -> signed MCP Events callback -> existing dot subscription
         -> OAuth-authenticated discord_reply -> original owner DM

The dot supplies the reasoning and existing context. No separate model API, OpenAI API key, private ChatGPT API, browser scraping, selfbot, or context-export tool is used. Only the explicit reply text returns to Discord.

Quick start: local tests

Python 3.12 is the tested runtime. Create and activate a virtual environment, then:

python -m pip install -r requirements.lock
python -m tests
python -m integration
python -m bridge demo

tests blocks all sockets and DNS. integration permits loopback only: it runs real local HTTP and WebSocket mock services, real discord.py parsing/reconnect, real JWT validation, signed callback verification, and a real MCP HTTP listener. Keys generated by integration tests are ephemeral and synthetic. No accounts, working tokens, external messages, or platform grants are needed.

Related MCP server: Feishu ↔ dot Bridge

Implemented

  • Official Discord bot API through discord.py: DM intent (4096) by default; opt-in guild mention mode uses Guilds + Guild Messages (513), never the privileged Message Content intent. Identity, exact destination and fresh channel checks reject other guilds/channels, group DMs, threads, non-owner authors and bot echoes.

  • Version-specific MCP 2026-07-28 Streamable HTTP JSON responses: stateless POST /mcp, required metadata/header validation, server/discover, tools and webhook events. Legacy initialize, polling and streaming events are not supported.

  • OAuth resource-server verification using PyJWT: RS256 signatures, pinned public JWKS file, exact issuer/audience/subject, expiry/not-before and discord:bridge scope. Protected-resource metadata is exposed for the platform's OAuth discovery. An established external identity provider handles login, consent, PKCE and tokens.

  • Standard Webhooks library signatures, verification challenges, rotation overlap, persistent subscriptions, expiry and idempotent unsubscribe. Event callbacks use public-IP validation, pinned-IP TLS with original Host/SNI, and no redirects/proxies.

  • Durable inbound deduplication, stable event IDs, bounded retry outbox and fixed reply destinations. Duplicate reply calls do not resend. Discord send uncertainty remains unknown, requiring reconciliation instead of automatic resend.

  • Strict configuration validation, secure token-file input, loopback-only listener, persistent disable file, bounded serialized worker, and no content/request logs.

  • Owner-only /setup, /status, /disconnect commands, restricted to User Install and the app DM, with private responses and explicit command registration. Discord setup explains their limits.

  • A separate metadata-only setup mode rejects all MCP actions while infrastructure is being prepared, without loading Discord credentials.

Platform prerequisites

OpenAI's MCP Events guide documents support with dots and MCP 2.0. Availability and workspace permissions must still be confirmed for each account. See protocol compatibility.

Discord's Gateway documentation documents DM messages and the DM content exception to Message Content intent. The bridge requests no guild, member, presence or privileged Message Content intent.

Private setup

Follow the setup and live acceptance guide. You need an owner numeric Discord ID, a bot you own, an existing dot with custom MCP Events access, an OAuth identity provider, and an approved HTTPS endpoint or supported tunnel. ChatGPT cannot send a custom static API key; the live adapter uses OAuth. See provider compatibility options; no vendor is required.

Copy config.example.json to ignored config.local.json, replace all synthetic IDs/hosts and absolute paths, and validate without connecting or reading secrets:

python -m bridge validate-config --config config.local.json

After secure setup and explicit authorization for networking/deployment:

python -m bridge serve --config config.local.json --enable-network

This starts the real bot and loopback MCP service. An approved HTTPS reverse proxy must reach the listener. The example is Linux-oriented; use absolute Windows paths when testing there. The enable file must contain exactly enabled; changing it disables new actions and event delivery. Never paste credentials into chat or Git.

Docker

docker compose build
docker compose run --rm proof
docker compose run --rm proof python -m integration

The included Compose file is a network-disabled test harness, not a deployed service. The image contains the real runtime but defaults to the offline demo. It runs non-root with a read-only root, dropped capabilities and temporary state. A production compose/proxy arrangement needs separate review and approval. Dependencies are version-pinned; pin a verified base-image digest for deployment.

Limits

Single owner, bot and callback; one worker; text-only messages up to 2000 characters; 30 accepted messages/minute; 1000 retained records; five event attempts; ten-minute delivery/reply lifetime. Capacity fails closed. No historical replay is advertised. Attachments, edits and reactions are not forwarded. OAuth access-token expiry caps subscriptions, so the platform must refresh them. Local public JWKS rotation is operator-managed. Storage is plaintext under private filesystem permissions.

No lossless delivery or exactly-once guarantee is claimed. See SECURITY.md and validation evidence for remaining operational limits.

License and contributions

MIT. Keep real IDs, secrets, databases, callback URLs and private messages out of issues, pull requests and fixtures. The CI template uses synthetic data only. It is supplied at ci/github-actions.yml but is not installed or running: the publishing credential lacked GitHub's workflow permission. An authorized maintainer can copy it to .github/workflows/test.yml using suitable access. Contributions should preserve the existing-dot design and document any protocol-version changes.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      Enables MCP clients to read, post to, and moderate a Discord server through the Discord REST API, with opt-in guardrails and dry-run safeguards.
      -
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables each user to securely bind their own Feishu private chat account to an existing personal dot, subscribe to incoming p2p text messages through authenticated MCP Events, and reply only to the originating conversation via MCP tools.
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables a self-hosted bridge that lets dots list permitted Discord channels, read message history, fetch individual messages, and send replies, while subscribing to signed webhook notifications for new human messages. Channel, server, history-window, and write permissions are enforced server-side, and the bot token is never exposed to dots.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables a single owner to receive WhatsApp messages and attachments in a ChatGPT MCP Events client and to send creator-bound text or file replies through OAuth-secured MCP tools. It also supports reading unanswered messages, attachment parts, and delivery/recovery status without any hosted AI model or API key.
      MIT