- Home
- MCP servers
- DingTalk
DingTalk
- python
5
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"wllcnm-dingding_mcp_v2": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"--name",
"mcp-dingding-v2",
"-e",
"DINGTALK_APP_KEY=your_app_key",
"-e",
"DINGTALK_APP_SECRET=your_app_secret",
"ghcr.io/wllcnm/mcp-dingding-v2:latest"
],
"env": {
"DINGTALK_APP_KEY": "YOUR_APP_KEY",
"DINGTALK_APP_SECRET": "YOUR_APP_SECRET"
}
}
}
}You can run a DingTalk MCP Server that speaks the MCP protocol to send messages, fetch conversation and user information, and query calendar events. This server acts as a bridge between your MCP client and DingTalk, enabling programmatic interactions with DingTalk conversations and events from your own applications.
How to use
You connect to the DingTalk MCP Server from your MCP client to perform common actions such as sending messages to a conversation, retrieving conversation details, obtaining user information, and listing a user’s calendar events. Start by configuring your MCP client to point to this server as you would with any other MCP service. Use the available endpoints to perform the actions you need, and rely on the server to translate your requests into DingTalk API calls and return structured results.
Practical usage patterns include sending text or rich messages to a DingTalk conversation, fetching fresh details about a conversation, looking up user profiles, and listing a user’s upcoming or past calendar events. You can chain these capabilities in your automation or chat tooling to build workflows that respond to user queries, post updates, or schedule events within DingTalk.
How to install
Prerequisites you need before installing: Python 3.10 or newer, MCP 0.1.0 or newer, and aiohttp 3.9.1 or newer.
Install from source using Python dependencies. Run the following to install required Python packages:
pip install -r requirements.txt
Run the server directly with Python:
python src/server.py
Alternatively, you can run the server via Docker if you prefer containerized deployment. The example below shows how to remove old containers, pull the latest image, and start a new container with the required DingTalk credentials.
docker ps -a | grep mcp-dingding-v2 | awk '{print $1}' | xargs -r docker rm -f
docker pull ghcr.io/wllcnm/mcp-dingding-v2:latest
docker run -i --rm --name mcp-dingding-v2 \
-e DINGTALK_APP_KEY=your_app_key \
-e DINGTALK_APP_SECRET=your_app_secret \
ghcr.io/wllcnm/mcp-dingding-v2:latest
Additional configuration and notes
Environment variables that you must configure for the server are the DingTalk API credentials. Set these values in your environment when running the server to authorize requests to the DingTalk API.
If you are running locally with Docker, supply the credentials as docker environment variables in the command as shown above. If you run the Python server directly, ensure your environment has DINGTALK_APP_KEY and DINGTALK_APP_SECRET set before starting the process.
Security and troubleshooting
Security: Keep your DingTalk API credentials confidential. Do not commit credentials to code repositories. Prefer environment variables or secret management where possible.
Troubleshooting: If you encounter connectivity or authentication issues, verify that your AppKey and AppSecret are correct, ensure network access to DingTalk services, and check server logs for authentication errors or API request failures.
Available tools
send_message
Send a message to a DingTalk conversation. Requires a conversation_id and message content, with an optional message type.
get_conversation_info
Retrieve information about a specific DingTalk conversation using its conversation_id.
get_user_info
Fetch information about a DingTalk user by user_id.
get_calendar_list
Query a user’s calendar events with parameters such as userid, start_time, end_time, max_results, and next_token; returns a list of events with details like summary, start_time, end_time, location, organizer, description, status, and attendees.