A Discord webhook server using MCP
Project description
Discord MCP Server
一个基于MCP的Discord webhook服务器。
安装
uv pip install discord-mcp-server
使用方法
1. 环境变量配置
设置Discord webhook URL环境变量:
# Windows PowerShell
$env:DISCORD_WEBHOOK_URL="your-discord-webhook-url"
# Linux/Mac
export DISCORD_WEBHOOK_URL="your-discord-webhook-url"
2. 运行服务器
# 使用uvx
uvx discord-mcp-server
# 使用完整路径
.\.venv\Scripts\discord-mcp-server.exe
3. Cursor配置
3.1 Webhook配置
- 打开Cursor设置
- 搜索"Discord"
- 在Webhook URL字段中输入你的Discord webhook URL
- 保存设置
3.2 MCP配置
在Cursor的MCP配置文件中添加:
{
"name": "discord-mcp-server",
"type": "uvx",
"entry_point": "discord_mcp_server:main",
"config": {
"webhook_url": "your-discord-webhook-url"
}
}
4. CLine配置
4.1 Webhook配置
在CLine配置文件中添加:
discord:
webhook_url: "your-discord-webhook-url"
4.2 MCP配置
在CLine的MCP配置文件中添加:
{
"name": "discord-mcp-server",
"type": "uvx",
"entry_point": "discord_mcp_server:main",
"config": {
"webhook_url": "your-discord-webhook-url"
}
}
环境变量
DISCORD_WEBHOOK_URL: Discord webhook URL(必需)
功能
- 支持发送文本消息
- 支持发送Markdown格式消息
- 通过MCP提供API接口
- 支持Cursor和CLine集成
- 支持异步操作
- 支持错误处理
注意事项
- 确保使用Python 3.10或更高版本
- 确保已安装所有依赖项
- 确保Discord webhook URL正确配置
- 如果使用虚拟环境,确保已激活
- MCP配置中的
webhook_url优先级高于环境变量 - 支持的消息类型:
- text: 普通文本消息
- markdown: Markdown格式消息
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
discord_mcp_server-0.1.2.tar.gz
(25.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file discord_mcp_server-0.1.2.tar.gz.
File metadata
- Download URL: discord_mcp_server-0.1.2.tar.gz
- Upload date:
- Size: 25.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40a7d6c28315dda94d6911004cccd127f37e611f2228ed71df2b96e20b80488d
|
|
| MD5 |
01dc370df5dd22bdcd1f1a372ad5d678
|
|
| BLAKE2b-256 |
148fefbfa3441adf4a43a760245ce0588a7954c73a5af3a056904e9b8ef8c5ff
|
File details
Details for the file discord_mcp_server-0.1.2-py3-none-any.whl.
File metadata
- Download URL: discord_mcp_server-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bb36ae319133e07d6ee63ac90e3e7cc7ee20e6a097bea9ed809f6bee3085cca
|
|
| MD5 |
fad71207493a82fd4f3fecb8c5851eb8
|
|
| BLAKE2b-256 |
70c12f7f3c5897c7126522eba47856c168b9ee9d97b10574f42bc8de6439df01
|