Skip to content
Back to search

discordmcp

Discord MCP Server for Claude Integration

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/v-3--discordmcp/badge.svg)](/listings/v-3--discordmcp)

HTML

<a href="/listings/v-3--discordmcp"><img src="/api/listings/v-3--discordmcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Clone this repository:

git clone https://github.com/yourusername/discordmcp.git
cd discordmcp

2. Install dependencies:

npm install

3. Create a `.env` file in the root directory with your Discord bot token:

DISCORD_TOKEN=your_discord_bot_token_here

4. Build the server:

npm run build

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 157 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Discord MCP Server
  2. A Model Context Protocol (MCP) server that enables LLMs to interact with Discord channels, allowing them to send and read messages through Discord's API. Using this server, LLMs like Claude can directly interact with Discord channels while maintaining user control and security.
  3. ## Features
  4. - Send messages to Discord channels
  5. - Read recent messages from channels
  6. - Automatic server and channel discovery
  7. - Support for both channel names and IDs
  8. - Proper error handling and validation
  9. ## Prerequisites
  10. - Node.js 16.x or higher
  11. - A Discord bot token
  12. - The bot must be invited to your server with proper permissions:
  13. - Read Messages/View Channels
  14. - Send Messages
  15. - Read Message History
  16. ## Setup
  17. 1. Clone this repository:
  18. ```bash
  19. git clone https://github.com/yourusername/discordmcp.git
  20. cd discordmcp
  21. ```
  22. 2. Install dependencies:
  23. ```bash
  24. npm install
  25. ```
  26. 3. Create a `.env` file in the root directory with your Discord bot token:
  27. ```
  28. DISCORD_TOKEN=your_discord_bot_token_here
  29. ```
  30. 4. Build the server:
  31. ```bash
  32. npm run build
  33. ```
  34. ## Usage with Claude for Desktop
  35. 1. Open your Claude for Desktop configuration file:
  36. - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
  37. - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
  38. 2. Add the Discord MCP server configuration:
  39. ```json
  40. {
  41. "mcpServers": {
  42. "discord": {
  43. "command": "node",
  44. "args": ["path/to/discordmcp/build/index.js"],
  45. "env": {
  46. "DISCORD_TOKEN": "your_discord_bot_token_here"
  47. }
  48. }
  49. }
  50. }
  51. ```
  52. 3. Restart Claude for Desktop
  53. ## Available Tools
  54. ### send-message
  55. Sends a message to a specified Discord channel.
  56. Parameters:
  57. - `server` (optional): Server name or ID (required if bot is in multiple servers)
  58. - `channel`: Channel name (e.g., "general") or ID
  59. - `message`: Message content to send
  60. Example:
  61. ```json
  62. {
  63. "channel": "general",
  64. "message": "Hello from MCP!"
  65. }
  66. ```
  67. ### read-messages
  68. Reads recent messages from a specified Discord channel.
  69. Parameters:
  70. - `server` (optional): Server name or ID (required if bot is in multiple servers)
  71. - `channel`: Channel name (e.g., "general") or ID
  72. - `limit` (optional): Number of messages to fetch (default: 50, max: 100)
  73. Example:
  74. ```json
  75. {
  76. "channel": "general",
  77. "limit": 10
  78. }
  79. ```
  80. ## Development
  81. 1. Install development dependencies:
  82. ```bash
  83. npm install --save-dev typescript @types/node
  84. ```
  85. 2. Start the server in development mode:
  86. ```bash
  87. npm run dev
  88. ```
  89. ## Testing
  90. You can test the server using the MCP Inspector:
  91. ```bash
  92. npx @modelcontextprotocol/inspector node build/index.js
  93. ```
  94. ## Examples
  95. Here are some example interactions you can try with Claude after setting up the Discord MCP server:
  96. 1. "Can you read the last 5 messages from the general channel?"
  97. 2. "Please send a message to the announcements channel saying 'Meeting starts in 10 minutes'"
  98. 3. "What were the most recent messages in the development channel about the latest release?"
  99. Claude will use the appropriate tools to interact with Discord while asking for your approval before sending any messages.
  100. ## Security Considerations
  101. - The bot requires proper Discord permissions to function
  102. - All message sending operations require explicit user approval
  103. - Environment variables should be properly secured
  104. - Token should never be committed to version control
  105. - Channel access is limited to channels the bot has been given access to
  106. ## Contributing
  107. 1. Fork the repository
  108. 2. Create your feature branch (`git checkout -b feature/amazing-feature`)
  109. 3. Commit your changes (`git commit -m 'Add some amazing feature'`)
  110. 4. Push to the branch (`git push origin feature/amazing-feature`)
  111. 5. Open a Pull Request
  112. ## License
  113. This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
  114. ## Support
  115. If you encounter any issues or have questions:
  116. 1. Check the GitHub Issues section
  117. 2. Consult the MCP documentation at https://modelcontextprotocol.io
  118. 3. Open a new issue with detailed reproduction steps

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.