discordmcp
Discord MCP Server for Claude Integration TypeScript-based implementation.
Documentation
Discord MCP Server
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.
Features
- Send messages to Discord channels
- Read recent messages from channels
- Automatic server and channel discovery
- Support for both channel names and IDs
- Proper error handling and validation
Prerequisites
- Node.js 16.x or higher
- A Discord bot token
- The bot must be invited to your server with proper permissions:
- Read Messages/View Channels
- Send Messages
- Read Message History
Setup
1. Clone this repository:
git clone https://github.com/yourusername/discordmcp.git
cd discordmcp2. Install dependencies:
npm install3. Create a `.env` file in the root directory with your Discord bot token:
DISCORD_TOKEN=your_discord_bot_token_here4. Build the server:
npm run buildUsage with Claude for Desktop
1. Open your Claude for Desktop configuration file:
2. Add the Discord MCP server configuration:
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["path/to/discordmcp/build/index.js"],
"env": {
"DISCORD_TOKEN": "your_discord_bot_token_here"
}
}
}
}3. Restart Claude for Desktop
Available Tools
send-message
Sends a message to a specified Discord channel.
Parameters:
- `server` (optional): Server name or ID (required if bot is in multiple servers)
- `channel`: Channel name (e.g., "general") or ID
- `message`: Message content to send
Example:
{
"channel": "general",
"message": "Hello from MCP!"
}read-messages
Reads recent messages from a specified Discord channel.
Parameters:
- `server` (optional): Server name or ID (required if bot is in multiple servers)
- `channel`: Channel name (e.g., "general") or ID
- `limit` (optional): Number of messages to fetch (default: 50, max: 100)
Example:
{
"channel": "general",
"limit": 10
}Development
1. Install development dependencies:
npm install --save-dev typescript @types/node2. Start the server in development mode:
npm run devTesting
You can test the server using the MCP Inspector:
npx @modelcontextprotocol/inspector node build/index.jsExamples
Here are some example interactions you can try with Claude after setting up the Discord MCP server:
1. "Can you read the last 5 messages from the general channel?"
2. "Please send a message to the announcements channel saying 'Meeting starts in 10 minutes'"
3. "What were the most recent messages in the development channel about the latest release?"
Claude will use the appropriate tools to interact with Discord while asking for your approval before sending any messages.
Security Considerations
- The bot requires proper Discord permissions to function
- All message sending operations require explicit user approval
- Environment variables should be properly secured
- Token should never be committed to version control
- Channel access is limited to channels the bot has been given access to
Contributing
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
If you encounter any issues or have questions:
1. Check the GitHub Issues section
2. Consult the MCP documentation at https://modelcontextprotocol.io
3. Open a new issue with detailed reproduction steps
Frequently asked questions
What is discordmcp?
discordmcp is Discord MCP Server for Claude Integration TypeScript-based implementation.
How do I install discordmcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is discordmcp open source?
Yes — it is hosted on GitHub at https://github.com/v-3/discordmcp and has 147 stars.
Related MCP tools
An MCP server built with Node.js/TypeScript that allows AI agents to securely read PDF files (local or URL) and extract text, metadata, or page counts.
🍒 Cherry Studio is a desktop client that supports for multiple LLM providers. Built for the Model Context Protocol to enhance AI capabilities.
Enhanced ChatGPT Clone: Features Agents, MCP, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini...
FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, ...
Composio equips your AI agents & LLMs with 100+ high-quality integrations via function calling for the Model Context Protocol. Enhance AI assistants with powerf
📦 Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Lan...
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP