MCP Client Configuration
This guide covers configuration for various MCP-compatible clients.
Claude Desktop
Claude Desktop is Anthropic's official desktop application with MCP support.
Configuration File Location
| Platform | Path |
|---|---|
| macOS | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Windows | %APPDATA%\Claude\claude_desktop_config.json |
Basic Configuration
json
{
"mcpServers": {
"wecom": {
"command": "uvx",
"args": ["wecom-bot-mcp-server"],
"env": {
"WECOM_WEBHOOK_URL": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"
}
}
}
}Multi-Bot Configuration
json
{
"mcpServers": {
"wecom": {
"command": "uvx",
"args": ["wecom-bot-mcp-server"],
"env": {
"WECOM_WEBHOOK_URL": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=default",
"WECOM_BOTS": "{\"alert\": {\"name\": \"Alert Bot\", \"webhook_url\": \"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=alert\"}, \"ci\": {\"name\": \"CI Bot\", \"webhook_url\": \"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=ci\"}}"
}
}
}
}Using pip Installation
If you installed via pip instead of uvx:
json
{
"mcpServers": {
"wecom": {
"command": "wecom-bot-mcp-server",
"env": {
"WECOM_WEBHOOK_URL": "your-webhook-url"
}
}
}
}Windsurf
Windsurf is an AI-powered IDE with MCP support.
Configuration File Location
~/.windsurf/config.jsonConfiguration
json
{
"mcpServers": {
"wecom": {
"command": "uvx",
"args": ["wecom-bot-mcp-server"],
"env": {
"WECOM_WEBHOOK_URL": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"
}
}
}
}Cline (VSCode Extension)
Cline is a VSCode extension that provides AI coding assistance with MCP support.
Configuration Steps
- Install Cline Extension
- Open VSCode Settings (
Ctrl+,/Cmd+,) - Search for "Cline MCP"
- Click "Edit in settings.json"
Configuration
json
{
"cline.mcpServers": {
"wecom": {
"command": "uvx",
"args": ["wecom-bot-mcp-server"],
"env": {
"WECOM_WEBHOOK_URL": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"
}
}
}
}Quick Install via Cline
- Open Command Palette (
Ctrl+Shift+P/Cmd+Shift+P) - Search for "Cline: Install Package"
- Type "wecom-bot-mcp-server"
- Configure the webhook URL when prompted
Cursor
Cursor is an AI-first code editor with MCP support.
Configuration File Location
~/.cursor/mcp.jsonConfiguration
json
{
"mcpServers": {
"wecom": {
"command": "uvx",
"args": ["wecom-bot-mcp-server"],
"env": {
"WECOM_WEBHOOK_URL": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"
}
}
}
}Trae
Trae is an AI assistant with MCP support.
Configuration
json
{
"mcpServers": {
"wecom": {
"command": "uvx",
"args": ["wecom-bot-mcp-server"],
"env": {
"WECOM_WEBHOOK_URL": "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY"
}
}
}
}Common Issues
Server Not Starting
- Check uvx is installed: Run
uvx --version - Check Python version: Requires Python 3.10+
- Verify webhook URL: Ensure URL is valid and starts with
https://
Server Not Connecting
- Restart the client: After configuration changes, restart your MCP client
- Check logs: Look for errors in the client's developer console
- Verify JSON syntax: Use a JSON validator for your configuration
Messages Not Sending
- Check webhook URL: Test the URL with curl or Postman
- Check network: Ensure you can reach
qyapi.weixin.qq.com - Enable debug logging: Set
MCP_LOG_LEVEL=DEBUG
Verification
After configuration, verify the server is working:
- Ask your AI assistant: "What MCP tools are available?"
- You should see
send_message,send_wecom_file,send_wecom_image, andlist_wecom_bots - Try sending a test message: "Send 'Hello from MCP!' to WeCom"
