Discord Research MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Discord Research MCPsearch the archive for messages about the release plan in #engineering"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Discord Research MCP
Discord Research MCP is an independent, community-maintained, read-only MCP server for Discord research. It combines an explicitly authorized Discord Desktop local-RPC/OAuth2 acquisition path with a small Discord-focused MCP surface for bounded current-channel reads and provenance-aware research over a local msgvault archive.
This project is not affiliated with, endorsed by, or officially maintained by Discord. Discord remains the authorization boundary for live provider access; msgvault remains a separate product and the sole durable archive writer.
The product is designed for evidence gathering, not account automation. It does not use normal-user session tokens, self-bot techniques, Discord Client Experiment APIs, message writes, read-state mutations, automatic provider fallback, account-wide history crawling, or attachment-binary acquisition.
Why this repository exists
The reusable Discord acquisition and research behavior belongs in a product repository rather than in deployment-specific infrastructure. This repository therefore owns:
the Discord Desktop OAuth2/local-RPC client behavior;
selective forward acquisition and normalized observation output;
bounded explicit live channel reads;
the curated five-tool Discord MCP surface;
the adapter that maps those archive tools onto an authenticated msgvault HTTP API;
provenance and incomplete-history semantics;
tests, container builds, CI/security checks and versioned releases.
It deliberately does not own a msgvault writer, archive database, reverse proxy, browser authentication, deployment-specific source IDs, host paths, secret delivery, backup scheduling, or MCP gateway policy.
Related MCP server: discord-mcp
Current compatibility baseline
Component | Tested baseline |
Discord Research MCP release |
|
Container platform | Docker Engine + Docker Compose v2 on Linux |
Published image |
|
Runtime | Node.js 22 |
Discord | Desktop local RPC/IPC with OAuth2 scopes |
Archive backend | msgvault |
MCP transport | Streamable HTTP on |
Other combinations may work, but they are not claimed as tested by this release.
Architecture
The reference deployment has two product containers:
discord-research, running the product'sforward,archive-bridge, andmcpchild processes under the supervisedservecommand;an existing
msgvaultwriter, reachable only through an authenticated internal HTTP endpoint in the deployment.
flowchart LR
Desktop["Discord Desktop\nlocal IPC"] -->|authorized local RPC/OAuth2| Discord["discord-research\nserve: forward + archive-bridge + mcp"]
Client["MCP client / gateway"] -->|Streamable HTTP| Discord
Discord -->|bounded JSONL observations| Importer["deployment-owned importer"]
Importer -->|single-writer import path| Vault["msgvault\nsole archive writer\nSQLite / FTS / Web UI"]
Discord -->|authenticated HTTP archive reads| Vault
Browser["Browser"] -->|deployment-owned auth / reverse proxy| VaultThe three Discord roles are process boundaries, not container boundaries:
forward owns the Discord Desktop IPC/OAuth2 session, selected-source subscriptions, normalized observations, token rotation state, acquisition health, and the live-read control socket.
archive-bridge owns only the curated Discord-to-msgvault query mapping. In the reference deployment it authenticates to msgvault with an API key supplied as a secret file.
mcp exposes the five agent-facing Discord tools and communicates with the two sibling processes through private in-container Unix sockets.
All three roles intentionally share one container trust boundary in the reference deployment. msgvault stays separate because it owns durable archive state and the single-writer lifecycle.
MCP tools
All tools are read-only.
Tool | Purpose | Provider behavior |
| Full-text search of configured archived Discord evidence. | Archive-only; a miss never contacts Discord. |
| Read bounded body context for one archive result. | Archive-only. |
| List a bounded page in one archived conversation/thread. | Archive-only. |
| Search a bounded local page within one archived conversation/thread. | Archive-only. |
| Read one explicit account-visible channel as a current snapshot. | Exactly one bounded Discord |
See docs/tools.md for the complete input, limit, provenance and failure contract.
Provenance and coverage
Every result states what it actually proves:
read_channel:acquisition=live_rpc,complete_history=false, one bounded current-client snapshot;direct archived observations:
acquisition=local_rpc_observation,complete_history=false;imported public-mirror evidence:
acquisition=public_git_mirror,complete_history=false, with stored repository/commit provenance and an optional deployment-supplied cutoff.
Archive presence never upgrades evidence to “complete history”. An archive miss is terminal and never falls back to Discord.
Container image
Versioned images are published to GitHub Container Registry:
ghcr.io/x1pher/discord-research-mcp:v0.5.6The Git tag, package version, MCP server version and image tag use the same release version.
Quick start
The included compose.yaml runs one discord-research service. It expects an existing msgvault writer on a shared Docker network. msgvault is a separate product and keeps its own deployment/release lifecycle.
Prerequisites:
Discord Desktop is running and its IPC directory is mountable by Docker.
A Discord OAuth2 application is authorized for
rpc,identify,guilds,messages.read.A msgvault writer is already running on a Docker network reachable by
discord-research.The msgvault HTTP API requires an API key; store the same key in a read-only file for Discord Research.
Your archive import/acknowledgement path is configured separately; this product does not create a second msgvault writer.
Copy and edit the example environment:
cp .env.example .env
mkdir -p runtime/secrets
# Write your Discord client secret, bootstrap refresh token and msgvault API key
# into the files referenced by .env. Never commit those files.
# Edit examples/selected-sources.json with your authorized guild/channel parents.
docker compose --env-file .env config -q
docker compose pull
docker compose up -dCheck health:
curl --fail http://127.0.0.1:3021/healthzThe MCP endpoint is http://127.0.0.1:3021/mcp with the default example binding.
See docs/docker-compose.md for the msgvault network/API contract, secret-file setup, archive import ownership and deployment security notes.
Configuration
Discord provider and acquisition
Variable | Purpose |
| Discord OAuth2 application/client ID. |
| OAuth2 scopes; tested baseline is |
| Registered OAuth2 redirect URI. |
| Read-only file containing the Discord client secret. |
| Read-only bootstrap refresh-token file. |
| Private application-owned latest refresh-token state. |
| Optional persisted explicit forum-thread seed state. |
| Selected-source JSON configuration. |
| Content-free acquisition health record. |
| Content-free importer health record. |
| Private normalized JSONL handoff directory. |
Archive adapter
Variable | Purpose |
| Authenticated msgvault HTTP base URL, for example |
| Read-only file containing the msgvault API key. |
| Private in-container Unix socket between |
| Optional evidence cutoff applied only to public-mirror provenance. |
MCP listener
Variable | Purpose |
| Private in-container live-read socket between |
| Private in-container archive socket. |
| MCP HTTP listen host. |
| MCP HTTP listen port. |
| Optional comma-separated Host-header allowlist. |
Source selection
Selection is configuration, never a product default. The checked-in example uses synthetic IDs:
{
"version": 1,
"sources": [
{"guild_id": "700", "channel_id": "800"},
{"guild_id": "700", "channel_id": "801"}
]
}A selected forum parent may admit only provider-validated child thread channels whose guild, type and parent_id bind them to that selected parent.
Observation handoff
forward writes private version-1 JSONL observations. A deployment may import them through msgvault's import-discord-observations path, but it must preserve msgvault's single-writer contract.
Docker invocation, importer scheduling, acknowledgement cleanup, host storage paths, backup wiring and recovery policy remain deployment-owned rather than product-owned.
Security model
The main guarantees are:
no normal-user Discord token or self-bot path;
no Discord writes or read-state mutations;
no automatic archive-to-provider fallback;
no attachment-binary acquisition;
source scope is configuration-driven and revalidated;
msgvault credentials are supplied through external secret files;
the current reference topology uses authenticated msgvault HTTP on a deployment-owned internal network;
the public example publishes no msgvault host port because msgvault is not defined by this repository;
the agent-facing MCP namespace contains only the five reviewed Discord tools.
Read SECURITY.md and docs/security-provider-boundary.md before deployment.
Development and verification
Node.js 22 is the tested development runtime.
The canonical repository-local verification gate is:
./scripts/verify.shIt installs the locked dependencies, runs the product tests, checks public-source hygiene and public package consistency, validates the Compose example when Docker Compose is available, and builds the container image when Docker is available. CI and release workflows reuse this gate.
Feedback and contributions
Use GitHub Issues for focused bugs and proposals. Pull requests should remain within the documented read-only/provider/archive boundaries and include applicable tests and documentation updates.
Roadmap and project planning live in GitHub Projects.
See CONTRIBUTING.md for the development workflow. Security reports must follow SECURITY.md.
User-visible changes are summarized in CHANGELOG.md.
Release model
A release is accepted only when the package version, MCP server version, Git tag and GHCR tag agree and the repository verification gate passes.
package: 0.5.6
Git tag: v0.5.6
image: ghcr.io/x1pher/discord-research-mcp:v0.5.6Deployment-specific msgvault versions, source selections, credentials, reverse proxies and backup policies are independent concerns and are not embedded in the image.
License and project relationships
Discord Research MCP is licensed under the MIT License.
Discord is an independent upstream service governed by Discord's own software, authorization and policies. msgvault is a separate open-source archive product with its own source, releases and licensing. This repository does not redistribute Discord Desktop or msgvault.
This server cannot be deployed
Maintenance
Related MCP Connectors
Durable technocore-chat archive plus DID activity, filler-bot and identity-rate analysis.
Machine-native research commons for agent evidence, discovery, rooms, and bounded research quests.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Live X/Twitter and Reddit research. 10 read-only MCP tools, Google/GitHub sign-in. Free tier.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables local AI agents to securely search and read Discord messages and channels visible to the current client, without requiring a bot or user token.-
- AlicenseNot gradedqualityBmaintenanceEnables reading and acting on Discord through your own running desktop client, including messages, direct messages, group chats, threads, forum posts, search, and write operations like sending, editing, reacting, and managing threads.128 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables safe, least-privilege reads and audits of Discord guilds and allowlisted direct conversations, with reviewed administrative actions through an operator-owned bot.70 npm1AGPL 3.0
- AlicenseNot gradedqualityAmaintenanceEnables 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