Discord For Chatgpt
БесплатноНе проверенAn open-source, self-hostable application that connects ChatGPT to Discord through the Model Context Protocol.
Описание
An open-source, self-hostable application that connects ChatGPT to Discord through the Model Context Protocol.
README
License: Apache 2.0 Python 3.12+ FastAPI MCP PRs welcome Discord
Let ChatGPT understand, structure, and safely manage your Discord servers.
Discord for ChatGPT is an open-source, self-hostable application that connects ChatGPT to Discord through the Model Context Protocol (MCP). It allows ChatGPT to discover server structure, read messages, prepare and execute changes with controlled approval flows, and manage moderation, webhooks, and more - all through Discord's official API with strict permission checks.
Perfect for: server administrators who want AI-assisted server management, communities looking for safer automation, and teams who want auditable Discord operations through natural language.
Contents
- Discord for ChatGPT
Why Discord for ChatGPT matters
🎯 Official API only — No self-bots or user automation. Everything uses Discord's official OAuth2 and bot APIs with proper authentication.
🔒 Secure by design — Operations are validated, require explicit approval for mutations, and follow the principle of least privilege with full audit trails.
👁️ Transparent operations — Before any change, ChatGPT presents an interactive preview with diffs, risks, and required permissions for your review and confirmation.
🧩 MCP-first integration — Built as a ChatGPT App via Model Context Protocol with typed tools, proper error handling, and session-based authorization.
🤝 Auditable & controlled — Every mutation is tracked through operation plans, single-use approvals, post-execution verification, and comprehensive logging.
What you can do
Discover & Read
- Identity - Connect and identify your Discord account via OAuth2
- Server overview - List accessible servers and their capabilities
- Structure mapping - Inventory categories, channels, roles, and permissions
- Message exploration - Read and search messages in accessible channels with pagination
- Audit reports - Generate reports on naming, categories, and permission consistency
Structure & Roles
- Channel management - Create, rename, update, and reorganize channels
- Category management - Create, modify, and structure channel categories
- Role management - Create, update roles and manage permissions within authorized scopes
- Safe reorganization - Plan and preview structural changes before execution
Messages & Community
- Message preparation - Draft messages with previews before sending
- Announcements - Post in announcement-compatible channels
- Message management - Edit or delete messages when permissions allow
- Thread access - Read accessible threads and conversations
Webhooks & Integrations
- Webhook inventory - List webhooks with metadata only (tokens never exposed)
- Webhook management - Create, update, or revoke webhooks when authorized
- Secure handling - Webhook URLs and tokens are treated as secrets and never logged
Moderation & Audit
- Member inspection - View accessible member information
- Moderation actions - Prepare and execute kicks/bans with proper authorization
- Audit trail - Track all operations, approvals, and results
- Permission validation - Real-time permission checks before every action
Quick start
Self-host with Docker Compose
Requirements: Docker Engine with the Compose plugin. You'll need a Discord application for OAuth2 and optionally a bot for extended permissions.
git clone https://github.com/skygenesisenterprise/discord-for-chatgpt.git
cd discord-for-chatgpt
cp .env.example .env
Edit .env with your Discord application credentials. Generate secure values for SECRET_KEY and ENCRYPTION_KEY:
openssl rand -hex 32 # for SECRET_KEY
openssl rand -base64 32 # for ENCRYPTION_KEY
Start the stack:
docker compose up --build -d
docker compose logs -f app
The API will be available at http://localhost:8000. Configure your Discord OAuth2 redirect URI to point to http://localhost:8000/oauth/discord/callback.
For production, use HTTPS, proper secrets management, and follow the deployment guide.
Architecture
Discord for ChatGPT follows a layered architecture with clear separation of concerns:
- ChatGPT App - Interacts with users, displays previews, and requests confirmations
- MCP Gateway - Exposes typed tools via Streamable HTTP with validation and auth
- Identity & Authorization - OAuth2 flow, session management, token encryption
- Policy & Approval Engine - Risk assessment, operation planning, single-use approvals
- Discord API Adapter - Centralized API calls with rate limiting and error handling
- Persistence & Audit - PostgreSQL for operations, approvals, and audit logs
All mutations flow through: prepare → plan → review → approve → validate → execute → verify → audit.
How it's built
Project layout
discord-for-chatgpt/
├── src/discord_for_chatgpt/ # Application source code
│ ├── api/ # REST endpoints (health, oauth, approvals)
│ ├── mcp/ # MCP server, auth, schemas, errors
│ ├── identity/ # OAuth2, sessions, token storage
│ ├── discord/ # Discord API client and resource handlers
│ ├── services/ # Business logic (discovery, planning, execution)
│ ├── policies/ # Risk assessment and validation
│ ├── db/ # Models, repositories, migrations
│ └── ui/ # UI resources and templates
├── tests/ # Unit, integration, security, contract, e2e tests
├── docs/ # Architecture, OAuth, permissions, security docs
├── pyproject.toml # Dependencies and project config
├── Dockerfile # Container definition
├── compose.yaml # Local development stack
└── alembic.ini # Database migrations
Core components
| Module | Role |
|---|---|
mcp/ |
MCP server implementation with typed tools and authentication |
api/ |
HTTP endpoints for OAuth callbacks and approval confirmations |
identity/ |
Discord OAuth2 flow, session management, encrypted token storage |
discord/ |
Official Discord API client with rate limiting and normalization |
services/ |
Application services for discovery, planning, execution, and auditing |
policies/ |
Risk classification, permission validation, and safety checks |
db/ |
Data persistence with PostgreSQL and Alembic migrations |
Tech stack
| Domain | Technology |
|---|---|
| Runtime | Python 3.12+ |
| API Framework | FastAPI, Starlette |
| MCP | Official Python MCP SDK |
| Validation | Pydantic v2 |
| HTTP Client | httpx |
| Database | PostgreSQL with SQLAlchemy 2, Alembic |
| Security | Cryptography for token encryption |
| Observability | OpenTelemetry, structured logging |
| Testing | pytest, pytest-asyncio, respx |
Development
Requirements
- Python 3.12 or later
- uv for dependency management
- PostgreSQL 16 (or use Docker Compose)
- Discord Application credentials
Setup
git clone https://github.com/skygenesisenterprise/discord-for-chatgpt.git
cd discord-for-chatgpt
cp .env.example .env
# Edit .env with your credentials
uv venv && source .venv/bin/activate
uv pip install -e ".[dev]"
Commands
| Command | Purpose |
|---|---|
uvicorn discord_for_chatgpt.main:app --reload |
Start development server |
pytest |
Run test suite |
ruff check . |
Run linting |
ruff format . |
Format code |
mypy src/ |
Type checking |
alembic upgrade head |
Run database migrations |
alembic revision --autogenerate -m "message" |
Create new migration |
Security
Security is a core design principle. Key measures include:
- No self-bots - Only official Discord APIs
- Least privilege - Minimal scopes and permission checks
- Approval required - All mutations need explicit, single-use approval
- Secret protection - Tokens encrypted at rest, never logged
- Prompt injection defense - Discord content treated as untrusted data
- Audit logging - Complete trail of operations and approvals
- Rate limiting - Respects Discord API limits
Do not report security vulnerabilities in public issues. Follow the private reporting instructions in SECURITY.md.
Contributing
Contributions are welcome! Please read the Code of Conduct before participating, then follow the guidelines in CONTRIBUTING.md.
- Follow the existing code style and conventions
- Write tests for new functionality
- Update documentation as needed
- Use Conventional Commits for commit messages
- Ensure all tests pass and linting is clean before submitting PRs
License
This project is licensed under the MIT License.
Note
Discord for ChatGPT is an independent open-source project. It is not affiliated with, endorsed by, or sponsored by Discord Inc. or OpenAI. Use of Discord's API is subject to Discord's Terms of Service and Developer Terms.
Установка Discord For Chatgpt
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/skygenesisenterprise/discord-for-chatgptFAQ
Discord For Chatgpt MCP бесплатный?
Да, Discord For Chatgpt MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Discord For Chatgpt?
Нет, Discord For Chatgpt работает без API-ключей и переменных окружения.
Discord For Chatgpt — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Discord For Chatgpt в Claude Desktop, Claude Code или Cursor?
Открой Discord For Chatgpt на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Gmail
Read, send and search emails from Claude
автор: GoogleSlack
Send, search and summarize Slack messages
автор: SlackRunbear
No-code MCP client for team chat platforms, such as Slack, Microsoft Teams, and Discord.
Discord Server
A community discord server dedicated to MCP by [Frank Fiegel](https://github.com/punkpeye)
Klavis AI
Open Source MCP Infra. Hosted MCP servers and MCP clients on Slack and Discord.
Work90210/APIFold
Turn any REST API into a hosted MCP server, with ready-made public servers for GitHub, Stripe, Slack, OpenAI, Notion and more.
автор: Work90210arikusi/deepseek-mcp-server
DeepSeek AI chat and reasoning with multi-turn sessions, function calling, thinking mode and cost tracking.
автор: arikusihashgraph-online/hashnet-mcp-js
Discover, register and chat with AI agents on the Hashgraph network via the Registry Broker.
автор: hashgraph-onlineprofullstack/mcp-server
Developer utilities: SEO optimization, document conversion, domain lookup, email validation, QR codes, weather data, social media posting and security scanning.
автор: profullstackWayStation-ai/mcp
Connect MCP hosts to apps such as Notion, Slack, Monday and Airtable.
автор: waystation-aiCompare Discord For Chatgpt with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории communication
