discordmcp
by
Discord MCP Server for Claude Integration
What is discordmcp
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
- Clone this repository:
git clone https://github.com/yourusername/discordmcp.git
cd discordmcp
- Install dependencies:
npm install
- Create a
.env
file in the root directory with your Discord bot token:
DISCORD_TOKEN=your_discord_bot_token_here
- Build the server:
npm run build
Usage with Claude for Desktop
-
Open your Claude for Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
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"
}
}
}
}
- 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 IDmessage
: 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 IDlimit
(optional): Number of messages to fetch (default: 50, max: 100)
Example:
{
"channel": "general",
"limit": 10
}
Development
- Install development dependencies:
npm install --save-dev typescript @types/node
- Start the server in development mode:
npm run dev
Testing
You can test the server using the MCP Inspector:
npx @modelcontextprotocol/inspector node build/index.js
Examples
Here are some example interactions you can try with Claude after setting up the Discord MCP server:
- "Can you read the last 5 messages from the general channel?"
- "Please send a message to the announcements channel saying 'Meeting starts in 10 minutes'"
- "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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - 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:
- Check the GitHub Issues section
- Consult the MCP documentation at https://modelcontextprotocol.io
- Open a new issue with detailed reproduction steps
Leave a Comment
Comments section will be available soon. Stay tuned!
Frequently Asked Questions
What is MCP?
MCP (Model Context Protocol) is an open protocol that standardizes how applications provide context to LLMs. Think of MCP like a USB-C port for AI applications, providing a standardized way to connect AI models to different data sources and tools.
What are MCP Servers?
MCP Servers are lightweight programs that expose specific capabilities through the standardized Model Context Protocol. They act as bridges between LLMs like Claude and various data sources or services, allowing secure access to files, databases, APIs, and other resources.
How do MCP Servers work?
MCP Servers follow a client-server architecture where a host application (like Claude Desktop) connects to multiple servers. Each server provides specific functionality through standardized endpoints and protocols, enabling Claude to access data and perform actions through the standardized protocol.
Are MCP Servers secure?
Yes, MCP Servers are designed with security in mind. They run locally with explicit configuration and permissions, require user approval for actions, and include built-in security features to prevent unauthorized access and ensure data privacy.
Related MCP Servers
Ableton Live MCP Server
MCP Server implementation for Ableton Live OSC control
Airbnb MCP Server
AI Agent Marketplace Index Search MCP Server
MCP Server for AI Agent Marketplace Index from DeepNLP
Algorand MCP Implementation
Algorand Model Context Protocol (Server & Client)
mcp-server-apache-airflow
pypi.org/project/mcp-server-apache-airflow/
airtable-mcp-server
๐๏ธ๐ค Airtable Model Context Protocol Server, for allowing AI systems to interact with your Airtable bases
Airtable MCP Server
Search, create and update Airtable bases, tables, fields, and records using Claude Desktop and MCP (Model Context Protocol) clients
Alphavantage MCP Server
A MCP server for the stock market data API, Alphavantage API.
Amadeus MCP Server
Amadeus MCP(Model Context Protocol) Server
Anki MCP Server
An MCP server for Anki
Submit Your MCP Server
Share your MCP server with the community
Submit Now