Skip to main content
Glama
wouthh

discord-context-bridge

by wouthh

discord-context-bridge

A private, read-only Discord context connector for authorized applications. Two independent sources export into one single-owner service: a dedicated official bot reads selected server text channels, and an optional Vencord/Vesktop plugin observes selected DM/group DM events delivered to the running client. Authenticated HTTP and remote MCP use the same authorization and data layer.

The code is open source; conversation data belongs in a private deployment. This project is unofficial and is not affiliated with Discord or any assistant provider. It provides data access. Reasoning, schedules, suggestions and notifications belong to consumers. It never sends Discord messages, reactions or moderation requests.

Architecture

Selected server channels -> long-lived bot reader ---+
                                                     +-> authenticated ingestion -> SQLite
Selected local DMs -> passive Vencord plugin --------+                             |
                                                                        scoped read layer
                                                                          /           \
                                                                  HTTP /v1/*       MCP /mcp

packages/domain contains schemas, packages/sources the bounded delivery queue, packages/bot and packages/plugin the independent source adapters, and packages/service the connector. The initial deployment is one owner, one persistent SQLite database and ordinary long-lived Node processes. There is no dashboard or embedded AI agent.

Related MCP server: Discord MCP

Coverage and privacy

Sources start disabled and require explicit selection. Exported fields are message text, minimal author ID, source/conversation/message IDs and timestamps. Attachment bodies, profiles and relationship inventories are excluded. Current edits replace bodies; observed deletions remove bodies and leave content-free tombstones. Remote retention defaults to seven days from message creation. Local queues are memory-only, bounded and expire after one hour by default.

Coverage is partial: the plugin never fetches personal-account history, scrolls, reads hidden conversations or requests personal Discord tokens. Bot history is bounded to at most 100 recent messages per selected channel. Offline deletions, partial events and queue loss may be unknown. Secret-pattern filtering is a narrow defense in depth, not personal-data redaction. Read security and privacy before enabling export.

Local quick start

Requires Node 22.18 or later in the supported 22–24 range and npm. Native SQLite installation may require normal build tools on platforms without a compatible prebuilt binary.

npm ci --ignore-scripts
npm rebuild better-sqlite3
npm run check
npm run setup

Choose “Create disabled loopback configuration” in setup. It generates separate reader/producer credentials without printing them, with no selected sources. Set BRIDGE_CONFIG to the configuration file created in the application state directory, then:

npm run build
npm start

The service binds to 127.0.0.1:8787. All data endpoints require authentication. Follow setup to define scopes, enter a bot token using hidden input and enable a source. Do not put secrets in .env, shell arguments, URLs, source files or agent chat.

Interfaces and consumers

The five read operations are connection_status, list_conversations, read_messages, search and read_changes. They are HTTP POST endpoints under /v1/ and identically named MCP tools at /mcp, using Streamable HTTP. Incremental polling is consumer-controlled; MCP does not wake an assistant automatically. See API reference, configuration and remote setup.

Generic HTTP and MCP SDK examples use synthetic data. Local synthetic transport testing does not prove deployment, consumer installation or a real authorized read. ChatGPT dots, Grok-powered applications, Hermes and other products are untested; a runtime must support the configured transport and authentication. The optional Sites deployment discussion is a future adapter path, not a shipped dependency.

Validation and status

Shipped: scoped capture, ingestion, read operations, persistent current-message storage, tombstones, retention, bounded queues, opaque cursors, separate producer/reader authentication, bot process, plugin source and build tooling. Synthetic tests exercise authorization, updates, deletion, retention, scope changes, queues and HTTP/MCP behavior. Run npm run check for the local gate. Plugin upstream compatibility validation uses an isolated Vencord checkout; see plugin documentation for evidence and remaining live-client gaps.

Not live-verified: Discord bot login/server installation, personal client activation, authenticated public deployment, installation in any assistant product or reads by that product. No deployment, credentials or live message upload are required for tests.

Contributions: CONTRIBUTING.md. Vulnerability reporting: SECURITY.md. License: MIT; preserve third-party notices. See bot documentation for Discord permissions and platform restrictions.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Read-only MCP server for Discord that lists guilds, channels, and reads or searches messages using a self-bot account via discord.py-self.
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Local, read-only MCP server that connects to Discord via REST API, allowing listing guilds, channels, and messages with strict access controls and no write operations.
    5
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI clients to read Discord channels, recent messages, and searchable history, then turn that evidence into freshness-aware team context, briefs, decision baselines, and signed checkpoint diffs through remote MCP and GPT Actions. It keeps Discord access read-only while supporting OAuth/Bearer authentication for multiple clients.
    Apache 2.0
  • F
    license
    A
    quality
    C
    maintenance
    Provides read-only Discord access, enabling listing guilds, mapping channels, reading and searching messages, following threads, and viewing attachments without posting.
    12
    1
    -