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 🙏

© 2025 – Pkg Stats / Ryan Hefner

mcp-dingtalk-doc

v1.0.6

Published

钉钉文档 MCP 服务器 | DingTalk Document MCP Server - 钉钉文档解析,支持自动登录和Cookie管理

Readme

钉钉文档 MCP | mcp-dingtalk-doc

钉钉文档 MCP 服务器 | DingTalk Document MCP Server

钉钉文档解析 · 自动登录 · Cookie管理

🚀 钉钉文档 MCP 工具 - 让 AI 助手(Cursor/Claude)直接读取钉钉文档内容

🚀 DingTalk MCP Server - Enable AI assistants to read DingTalk documents directly

✨ Features | 特性

  • 🚀 Fast | 快速 - Startup ~100ms
  • 📦 Simple | 简单 - One-click npm installation | npm 一键安装
  • 🔐 Auto Login | 自动登录 - Browser-based cookie management | 浏览器自动获取 Cookie
  • 🎯 Type Safe | 类型安全 - Native TypeScript

📦 Installation | 安装

npm install mcp-dingtalk-doc

Or clone and build | 或克隆构建:

git clone https://github.com/hykfft/mcp-dingtalk-doc.git
cd mcp-dingtalk-doc/nodejs
npm install
npm run build

⚡ Quick Start | 快速开始

Method 1: Auto Cookie Management (Recommended) | 方式 1:自动 Cookie 管理(推荐)

# Auto login - Browser will open for QR code scan
# 自动登录 - 浏览器会自动打开,扫码登录即可
npm run cookie:login

# Verify cookie | 验证 Cookie
npm run cookie:check

Method 2: Manual Cookie | 方式 2:手动配置 Cookie

  1. Open https://alidocs.dingtalk.com and login | 打开钉钉文档并登录
  2. Press F12Network tab | 按 F12 打开开发者工具
  3. Copy Cookie from Request Headers | 复制请求头中的 Cookie
  4. Set environment variable | 设置环境变量:
# Windows
set DINGTALK_COOKIE=your_cookie_here

# Linux/Mac
export DINGTALK_COOKIE="your_cookie_here"

🔧 MCP Configuration | MCP 配置

Edit Cursor config file | 编辑 Cursor 配置文件:

Windows: %APPDATA%\Cursor\mcp.json
Mac: ~/Library/Application Support/Cursor/mcp.json
Linux: ~/.cursor/mcp.json

{
  "mcpServers": {
    "dingtalk-doc": {
      "command": "node",
      "args": [
        "/path/to/mcp-dingtalk-doc/nodejs/dist/index.js"
      ],
      "env": {
        "DINGTALK_COOKIE": "your_cookie_here"
      }
    }
  }
}

🎯 Usage | 使用方法

In Cursor, tell the AI | 在 Cursor 中对 AI 说:

Please parse this DingTalk document:
请帮我解析这个钉钉文档:
https://alidocs.dingtalk.com/i/nodes/xxx

🛠️ Available Tools | 可用工具

1. parse_document

Parse document and generate HTML files | 解析文档并生成 HTML 文件

Parameters | 参数:

  • url_or_node_id (required | 必需): DingTalk document URL or NODE_ID | 钉钉文档 URL 或 NODE_ID
  • cookie (optional | 可选): Cookie string | Cookie 字符串
  • save_files (optional | 可选): Save files, default true | 是否保存文件
  • output_dir (optional | 可选): Output directory | 输出目录

2. get_html

Get HTML content without saving files | 快速获取 HTML 内容(不保存文件)

Parameters | 参数:

  • url_or_node_id (required | 必需): DingTalk document URL or NODE_ID
  • cookie (optional | 可选): Cookie string

🍪 Cookie Commands | Cookie 管理命令

npm run cookie:login   # Auto login | 自动登录
npm run cookie:check   # Check validity | 检查有效性
npm run cookie:show    # Show cookie | 显示 Cookie
npm run cookie:auto    # Auto get valid cookie | 自动获取有效 Cookie
npm run cookie:delete  # Delete cookie | 删除 Cookie

📖 Supported Elements | 支持的元素

  • ✅ Paragraphs and rich text | 段落和富文本
  • ✅ Tables (cell merging) | 表格(支持合并单元格)
  • ✅ Images | 图片
  • ✅ Code blocks (11 languages) | 代码块(11种语言)
  • ✅ Text styles (bold, color, font size) | 文本样式

⚠️ Known Limitations | 已知限制

  • OSS encrypted documents not fully supported | OSS 加密文档暂不完全支持
  • Some elements pending support (lists, quotes) | 部分元素待支持(列表、引用块)
  • Cookie expires in 7-30 days | Cookie 7-30 天后过期

🔧 Troubleshooting | 故障排查

Module not found | 找不到模块

npm run build
npm install

Cookie expired | Cookie 过期

npm run cookie:login

📦 Dependencies | 依赖

  • @modelcontextprotocol/sdk - Official MCP SDK
  • axios - HTTP client
  • cheerio - HTML parsing
  • playwright - Auto cookie management
  • zod - Data validation

📄 License | 许可证

MIT License

🔗 Links | 链接

  • npm: https://www.npmjs.com/package/mcp-dingtalk-doc
  • GitHub: https://github.com/hykfft/mcp-dingtalk-doc

Quick Start | 快速开始: npm installnpm run cookie:login → Configure MCP | 配置 MCP → Use | 使用!🚀