English | 简体中文
This project integrates the official DingTalk MCP service into Gemini CLI. You can use natural language or custom commands in the terminal to manage schedules, check tasks, manage people, and publish notices directly.
- Calendar Management: Query personal primary calendars and schedules.
- Task Statistics: Check personal todo items and tasks.
- People Management: Look up employee information, departments, and contact details.
- Notice Publishing: Send notices and files to departments.
- Node.js: Ensure Node.js is installed.
- Gemini CLI: Ensure Gemini CLI is installed and up to date.
- DingTalk App: You need an internal enterprise app with DingTalk Open Platform access.
- Create a directory for the project (for example,
dingtalk-mcp) and place the extension files inside. - Open your terminal and navigate to this directory.
Before using the extension, you must configure your credentials in gemini-extension.json.
This is required for the MCP server to connect to the DingTalk API.
- Open
gemini-extension.json. - Locate the
envobject undermcpServers. - Replace the placeholders with your actual credentials.
{
"name": "dingtalk-mcp",
"version": "1.0.0",
"description": "A Gemini CLI extension for DingTalk's MCP server.",
"contextFileName": "GEMINI.md",
"mcpServers": {
"dingtalk-mcp": {
"command": "npx",
"args": ["-y", "dingtalk-mcp@latest"],
"env": {
"DINGTALK_Client_ID": "<your_dingtalk_client_id>",
"DINGTALK_Client_Secret": "<your_dingtalk_client_secret>",
"ACTIVE_PROFILES": "dingtalk-contacts,dingtalk-calendar"
}
}
}
}Environment variables:
DINGTALK_Client_ID: DingTalk app Client IDDINGTALK_Client_Secret: DingTalk app Client SecretACTIVE_PROFILES: Official DingTalk MCP profiles to enable
If you only need basic scenarios, it is recommended to enable at least:
dingtalk-contacts,dingtalk-calendar
If you want to use more commands added by this repository directly, add the following profiles to ACTIVE_PROFILES as needed:
dingtalk-calendarprovides official calendar tools such asgetCalendarViewandcreateEventdingtalk-departmentprovides department search and department detail capabilitiesdingtalk-tasksprovides task query, creation, update, and deletiondingtalk-noticeprovides work notice sending, progress and result queries, and recall
For more custom commands and profile details, see open-dingtalk/dingtalk-mcp
If you want to use all features directly, you can set:
all
After updating the configuration file, run the following command to link the extension to Gemini CLI:
gemini extensions link .After running the command, restart your Gemini CLI session.
Permission names in the DingTalk console may vary by app type and version, but at minimum you need to enable the permissions required by the official profiles you turned on:
- Calendar read/write permissions for calendar commands
- Contacts and organization permissions for people and department lookup commands
- Task permissions for todo commands
- Message permissions and additional environment variables for work notices, robot messages, and DING
- "Show me Zhang San's DingTalk schedule for tomorrow."
- "Create a release review meeting for Li Si tomorrow at 3 PM."
- "Move my Weekly Sync tomorrow from 2 PM to 4 PM."
- "Delete Wang Wu's 1:00 PM schedule tomorrow."
/dingtalk:searchUser "Zhang San"/dingtalk:getUserDetailByUserId "manager123"/dingtalk:getUserIdByMobile "13800138000"/dingtalk:searchDepartment "Engineering"/dingtalk:getDepartmentDetail "Platform Engineering"/dingtalk:listSubDepartments "R&D Center"/dingtalk:getCalendarView "tomorrow"/dingtalk:getEvent "View the schedule whose eventId is xxx"/dingtalk:createEvent "Create a release review for Li Si tomorrow at 3 PM"/dingtalk:updateEvent "Move Zhang San's weekly meeting tomorrow from 2 PM to 4 PM"/dingtalk:deleteEvent "Delete Li Si's release review tomorrow at 3 PM"/dingtalk:addAttendee "Add Wang Wu to the review meeting whose eventId is xxx"/dingtalk:removeAttendee "Remove Zhao Liu from the review meeting whose eventId is xxx"/dingtalk:getAttendees "View the attendees of the event whose eventId is xxx"/dingtalk:queryTasks "View Zhang San's unfinished tasks today"/dingtalk:createTask "Create a task for Li Si to finish API integration before this Friday"/dingtalk:updateTask "Mark the task whose taskId is xxx as completed"/dingtalk:deleteTask "Delete the task whose taskId is xxx"/dingtalk:updateExecutorsTaskStatus "Mark Wang Wu's executor status as completed in taskId xxx"/dingtalk:sendNotice "Send tonight's release notice to Platform Engineering"/dingtalk:getSendProgress "task_id 123456"/dingtalk:getSendResult "task_id 123456"/dingtalk:recallNotice "msg_task_id 123456"/dingtalk:sendMessageToGroupByRobot "Send a release reminder to the group whose openConversationId is xxx"/dingtalk:batchSendMessageToUsersByRobot "Send direct release reminders to Zhang San and Li Si"/dingtalk:sendDINGMessageByRobot "Send a DING to Wang Wu to remind him about the meeting in 10 minutes"
If the extension does not respond or returns errors, check the following first:
- Check Credentials: Ensure
DINGTALK_Client_IDandDINGTALK_Client_Secretare correct ingemini-extension.json. - Check Profiles: Ensure
ACTIVE_PROFILESincludes the official profiles required by the current command. - Check Permissions: Ensure your DingTalk app has the necessary Open Platform permissions enabled.
- Re-link: If the extension directory was moved, run
gemini extensions link .again.
Based on the Gemini CLI Extensions Guide and open-dingtalk/dingtalk-mcp.