{"id":29637432,"url":"https://github.com/iqaicom/mcp-discord","last_synced_at":"2025-07-21T18:37:43.230Z","repository":{"id":304926792,"uuid":"1020045586","full_name":"IQAIcom/mcp-discord","owner":"IQAIcom","description":"Implement Discord MCP server enabling AI assistants to interact with the Discord platform.","archived":false,"fork":false,"pushed_at":"2025-07-16T04:15:28.000Z","size":179,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-17T07:11:11.297Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@iqai/mcp-discord","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IQAIcom.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-15T08:59:36.000Z","updated_at":"2025-07-16T09:19:17.000Z","dependencies_parsed_at":"2025-07-17T11:55:17.457Z","dependency_job_id":"15626594-fd58-42ab-9a40-a5440ce1eea4","html_url":"https://github.com/IQAIcom/mcp-discord","commit_stats":null,"previous_names":["iqaicom/mcp-discord"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/IQAIcom/mcp-discord","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IQAIcom%2Fmcp-discord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IQAIcom%2Fmcp-discord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IQAIcom%2Fmcp-discord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IQAIcom%2Fmcp-discord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IQAIcom","download_url":"https://codeload.github.com/IQAIcom/mcp-discord/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IQAIcom%2Fmcp-discord/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266353335,"owners_count":23915947,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-21T18:37:42.035Z","updated_at":"2025-07-21T18:37:43.198Z","avatar_url":"https://github.com/IQAIcom.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MCP-Discord\n\nA Discord MCP (Model Context Protocol) server that enables AI assistants to interact with the Discord platform.\n\n## Overview\n\nMCP-Discord provides the following Discord-related functionalities:\n\n- Login to Discord bot\n- Get server information\n- Read/delete channel messages\n- Send messages to specified channels (using either channel IDs or channel names)\n- Retrieve forum channel lists\n- Create/delete/reply to forum posts\n- Create/delete text channels\n- Add/remove message reactions\n- Create/edit/delete/use webhooks\n\n## Table of Contents\n\n- [Prerequisites](#prerequisites)\n- [Installation](#installation)\n- [Configuration](#configuration)\n- [Tools Documentation](#tools-documentation)\n  - [Basic Functions](#basic-functions)\n  - [Channel Management](#channel-management)\n  - [Forum Functions](#forum-functions)\n  - [Messages and Reactions](#messages-and-reactions)\n  - [Webhook Management](#webhook-management)\n- [Development](#development)\n\n## Prerequisites\n\n- Node.js (v16.0.0 or higher)\n- npm (v7.0.0 or higher)\n- A Discord bot with appropriate permissions\n  - Bot token (obtainable from the [Discord Developer Portal](https://discord.com/developers/applications))\n  - Message Content Intent enabled\n  - Server Members Intent enabled\n  - Presence Intent enabled\n- Permissions required in your Discord server:\n\n  ### Easiest Setup\n\n  - Administrator (Recommended for quick setup and full functionality)\n\n  #### Or, select only the required permissions\n\n  - Send Messages\n  - Create Public Threads\n  - Send Messages in Threads\n  - Manage Messages\n  - Manage Threads\n  - Manage Channels\n  - Manage Webhooks\n  - Add Reactions\n  - View Channel\n\n- Add your Discord bot to your server\n  - To add your Discord bot to your server, use one of the following invite links (replace `INSERT_CLIENT_ID_HERE` with your bot's client ID):\n    - **Administrator (full access):**\n        \u003chttps://discord.com/oauth2/authorize?client_id=INSERT_CLIENT_ID_HERE\u0026scope=bot\u0026permissions=8\u003e\n    - **Custom permissions (minimum required):**\n        \u003chttps://discord.com/oauth2/authorize?client_id=INSERT_CLIENT_ID_HERE\u0026scope=bot\u0026permissions=52076489808\u003e\n\n\u003e **Note:**  \n\u003e According to Discord's security model, a bot can only access information from servers it has been explicitly added to.  \n\u003e If you want to use this MCP server to access a specific Discord server, you must add the bot to that server first.  \n\u003e Use the invite link below to add the bot to your target server.\n\n## Installation\n\n### Installing via NPM\n\nYou can use it with the following command:\n\n```bash\nnpx mcp-discord --config ${DISCORD_TOKEN}\n```\n\nFor more details, you can check out the [NPM Package](https://www.npmjs.com/package/mcp-discord).\n\n### Manual Installation\n\n```bash\n# Clone the repository\ngit clone https://github.com/IQAICOM/mcp-discord.git\ncd mcp-discord\n\n# Install dependencies\nnpm install\n\n# Compile TypeScript\nnpm run build\n```\n\n## Configuration\n\nAll configuration is now handled via the `src/config.ts` file, which supports both environment variables and command-line arguments. The following options are available:\n\n| Option                        | Type     | Default   | Description                                                                 |\n|-------------------------------|----------|-----------|-----------------------------------------------------------------------------|\n| `DISCORD_TOKEN`               | string   | —         | **Required.** Discord bot token.                                            |\n| `SAMPLING_ENABLED`            | boolean  | `true`    | Enables bi-directional message sampling (see [Sampling](#sampling)).        |\n| `TRANSPORT`                   | string   | `stdio`   | Transport method: `stdio` (default) or `http`.                              |\n| `HTTP_PORT`                   | number   | `8080`    | Port for HTTP transport (only if `TRANSPORT` is `http`).                    |\n| `DEFAULT_RATE_LIMIT_SECONDS`  | number   | `2`       | Rate limit (seconds) for sampling requests per user.                        |\n| `DEFAULT_MESSAGE_CHUNK_SIZE`  | number   | `2000`    | Max message chunk size for sampling responses.                              |\n\nYou can set these options via environment variables or command-line arguments:\n\n**Environment variables:**\n\n```bash\nDISCORD_TOKEN=your_discord_bot_token\nSAMPLING_ENABLED=false\nTRANSPORT=http\nHTTP_PORT=3000\nDEFAULT_RATE_LIMIT_SECONDS=5\nDEFAULT_MESSAGE_CHUNK_SIZE=1500\n```\n\n**Command-line arguments:**\n\n```bash\nnode build/index.js --config \"your_discord_bot_token\" --sampling --transport http --port 3000 --rate-limit 5 --message-chunk-size 1500\n```\n\nIf both are provided, command-line arguments take precedence.\n\n---\n\n## Sampling\n\nThe Sampling feature enables bi-directional communication between Discord and the MCP server, allowing the bot to listen to messages and respond automatically. This is controlled by the `SAMPLING_ENABLED` config option (enabled by default).\n\n**How it works:**\n\n- When enabled, the bot listens for new messages and bot mentions in Discord channels.\n- If a user sends a message, the bot can process it and respond using the MCP protocol.\n- The bot adds a 🤔 reaction when mentioned.\n- Rate limiting is enforced per user (see `DEFAULT_RATE_LIMIT_SECONDS`).\n- Long responses are split into chunks (see `DEFAULT_MESSAGE_CHUNK_SIZE`).\n\n**Disabling Sampling:**\n\n- Set `SAMPLING_ENABLED=false` in your environment or omit the `--sampling` flag.\n- The bot will not listen to or respond to messages automatically.\n\n**Advanced options:**\n\n- `DEFAULT_RATE_LIMIT_SECONDS`: Minimum seconds between sampling responses per user.\n- `DEFAULT_MESSAGE_CHUNK_SIZE`: Maximum size of each message chunk sent in response.\n\n---\n\n## Tools Documentation\n\n### Basic Functions\n\n- `discord_send`: Send a message to a specified channel (supports both channel ID and channel name)\n- `discord_get_server_info`: Get Discord server information\n\n### Channel Management\n\n- `discord_create_text_channel`: Create a text channel\n- `discord_delete_channel`: Delete a channel\n\n### Forum Functions\n\n- `discord_get_forum_channels`: Get a list of forum channels\n- `discord_create_forum_post`: Create a forum post\n- `discord_get_forum_post`: Get a forum post\n- `discord_reply_to_forum`: Reply to a forum post\n- `discord_delete_forum_post`: Delete a forum post\n\n### Messages and Reactions\n\n- `discord_read_messages`: Read channel messages\n- `discord_add_reaction`: Add a reaction to a message\n- `discord_add_multiple_reactions`: Add multiple reactions to a message\n- `discord_remove_reaction`: Remove a reaction from a message\n- `discord_delete_message`: Delete a specific message from a channel\n\n### Webhook Management\n\n- `discord_create_webhook`: Creates a new webhook for a Discord channel\n- `discord_send_webhook_message`: Sends a message to a Discord channel using a webhook\n- `discord_edit_webhook`: Edits an existing webhook for a Discord channel\n- `discord_delete_webhook`: Deletes an existing webhook for a Discord channel\n\n## Development\n\n```bash\n# Development mode\npnpm run dev\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiqaicom%2Fmcp-discord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiqaicom%2Fmcp-discord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiqaicom%2Fmcp-discord/lists"}