npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dingtalk-calendar-mcp

v1.4.0

Published

MCP server for DingTalk Calendar API - manage events, attendees, and calendar views

Readme

DingTalk Calendar MCP Server

钉钉日程管理 MCP 服务器 - 通过 Model Context Protocol 管理钉钉日程

English | 中文

English

A Model Context Protocol (MCP) server for managing DingTalk calendar events. This server provides tools to create, update, delete, and query calendar events, manage attendees, and configure event reminders and recurrence rules.

Features

  • 📅 Event Management: Create, update, delete, and query calendar events
  • 👥 Attendee Management: Add or remove event attendees
  • Reminders: Configure event reminders
  • 🔁 Recurrence: Support for recurring events with various patterns
  • 🔗 Online Meetings: Create events with DingTalk video meetings
  • 🎨 UI Customization: Control the display of event detail page components
  • 🔐 Token Management: Automatic token refresh with caching

Available Tools

  1. createEvent - Create a new calendar event
  2. updateEvent - Update an existing event
  3. deleteEvent - Delete an event
  4. getEvent - Get details of a single event
  5. listEvents - List events with time range filtering
  6. addAttendee - Add attendees to an event
  7. removeAttendee - Remove attendees from an event
  8. getAttendees - Get the list of event attendees
  9. getCalendarView - Query calendar view by time range

Installation

# Clone the repository
git clone https://github.com/your-org/dingtalk-calendar-mcp
cd dingtalk-calendar-mcp

# Install dependencies
npm install

# Build the project
npm run build

Configuration

  1. Copy the environment variables template:
cp env.example .env
  1. Edit .env file and add your DingTalk credentials:
# Option 1: Direct access token (for testing, valid for 2 hours)
DINGTALK_ACCESS_TOKEN=your_access_token_here

# Option 2: Client ID and Secret (recommended, auto-refresh)
DINGTALK_Client_ID=your_client_id_here
DINGTALK_Client_Secret=your_client_secret_here

Usage

As MCP Server

Start the server:

npm start
# or
./start-mcp.sh

In Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "dingtalk-calendar": {
      "command": "node",
      "args": ["/path/to/dingtalk-calendar-mcp/dist/cli.js"],
      "env": {
        "DINGTALK_Client_ID": "your_client_id",
        "DINGTALK_Client_Secret": "your_client_secret"
      }
    }
  }
}

Example Usage

Create an Event

{
  "unionId": "user_union_id",
  "calendarId": "primary",
  "summary": "Team Meeting",
  "description": "Weekly team sync",
  "start": {
    "dateTime": "2024-01-15T10:00:00+08:00",
    "timeZone": "Asia/Shanghai"
  },
  "end": {
    "dateTime": "2024-01-15T11:00:00+08:00",
    "timeZone": "Asia/Shanghai"
  },
  "attendees": [
    {
      "id": "attendee_union_id",
      "isOptional": false
    }
  ],
  "reminders": [
    {
      "method": "dingtalk",
      "minutes": 15
    }
  ]
}

Create a Recurring Event

{
  "unionId": "user_union_id",
  "calendarId": "primary",
  "summary": "Daily Standup",
  "start": {
    "dateTime": "2024-01-15T09:30:00+08:00",
    "timeZone": "Asia/Shanghai"
  },
  "end": {
    "dateTime": "2024-01-15T09:45:00+08:00",
    "timeZone": "Asia/Shanghai"
  },
  "recurrence": {
    "pattern": {
      "type": "daily",
      "interval": 1
    },
    "range": {
      "type": "endDate",
      "endDate": "2024-12-31T23:59:59+08:00"
    }
  }
}

Development

# Run in development mode
npm run dev

# Build
npm run build

# Test with MCP Inspector
npm run inspector

中文

基于 Model Context Protocol (MCP) 的钉钉日程管理服务器。该服务器提供了创建、更新、删除和查询日程的工具,以及管理参与者、设置提醒和重复规则等功能。

功能特性

  • 📅 日程管理:创建、更新、删除和查询日程
  • 👥 参与者管理:添加或删除日程参与者
  • 提醒设置:配置日程提醒
  • 🔁 重复日程:支持多种重复模式的循环日程
  • 🔗 在线会议:创建包含钉钉视频会议的日程
  • 🎨 UI自定义:控制日程详情页组件的显示
  • 🔐 令牌管理:自动刷新令牌并缓存

可用工具

  1. createEvent - 创建新日程
  2. updateEvent - 更新已有日程
  3. deleteEvent - 删除日程
  4. getEvent - 获取单个日程详情
  5. listEvents - 列出日程,支持时间范围过滤
  6. addAttendee - 添加日程参与者
  7. removeAttendee - 删除日程参与者
  8. getAttendees - 获取日程参与者列表
  9. getCalendarView - 按时间范围查询日程视图

安装

# 克隆仓库
git clone https://github.com/your-org/dingtalk-calendar-mcp
cd dingtalk-calendar-mcp

# 安装依赖
npm install

# 构建项目
npm run build

配置

  1. 复制环境变量模板:
cp env.example .env
  1. 编辑 .env 文件,添加钉钉凭证:
# 方式一:直接使用访问令牌(用于测试,有效期2小时)
DINGTALK_ACCESS_TOKEN=your_access_token_here

# 方式二:使用客户端ID和密钥(推荐,自动刷新)
DINGTALK_Client_ID=your_client_id_here
DINGTALK_Client_Secret=your_client_secret_here

使用方法

作为 MCP 服务器

启动服务器:

npm start
# 或
./start-mcp.sh

在 Claude Desktop 中使用

添加到 Claude Desktop 配置文件(~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "dingtalk-calendar": {
      "command": "node",
      "args": ["/path/to/dingtalk-calendar-mcp/dist/cli.js"],
      "env": {
        "DINGTALK_Client_ID": "your_client_id",
        "DINGTALK_Client_Secret": "your_client_secret"
      }
    }
  }
}

使用示例

创建日程

{
  "unionId": "用户的unionId",
  "calendarId": "primary",
  "summary": "团队会议",
  "description": "每周团队同步会",
  "start": {
    "dateTime": "2024-01-15T10:00:00+08:00",
    "timeZone": "Asia/Shanghai"
  },
  "end": {
    "dateTime": "2024-01-15T11:00:00+08:00",
    "timeZone": "Asia/Shanghai"
  },
  "attendees": [
    {
      "id": "参与者的unionId",
      "isOptional": false
    }
  ],
  "reminders": [
    {
      "method": "dingtalk",
      "minutes": 15
    }
  ]
}

创建重复日程

{
  "unionId": "用户的unionId",
  "calendarId": "primary",
  "summary": "每日站会",
  "start": {
    "dateTime": "2024-01-15T09:30:00+08:00",
    "timeZone": "Asia/Shanghai"
  },
  "end": {
    "dateTime": "2024-01-15T09:45:00+08:00",
    "timeZone": "Asia/Shanghai"
  },
  "recurrence": {
    "pattern": {
      "type": "daily",
      "interval": 1
    },
    "range": {
      "type": "endDate",
      "endDate": "2024-12-31T23:59:59+08:00"
    }
  }
}

开发

# 开发模式运行
npm run dev

# 构建
npm run build

# 使用 MCP Inspector 测试
npm run inspector

API 权限要求

使用本服务需要在钉钉开发者后台为应用开通以下权限:

  • 日历应用中日程写权限
  • 日历应用中日程读权限

注意事项

  1. 所有日程操作都需要提供用户的 unionId
  2. calendarId 统一使用 primary,表示用户的主日历
  3. 时间格式遵循 ISO-8601 标准
  4. 全天日程使用 date 字段,非全天日程使用 dateTime 字段
  5. 每次参与者操作最多支持 500 人

License

MIT

Contributing

欢迎提交 Issue 和 Pull Request!

Support

如有问题,请提交 Issue