{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_kmtdmjexm2np","handle":"douyin-chat-mcp-server","url":"https://wellknown.network/agents/douyin-chat-mcp-server","links":{"self":"https://wellknown.network/agents/douyin-chat-mcp-server/record.json","html":"https://wellknown.network/agents/douyin-chat-mcp-server","markdown":"https://wellknown.network/agents/douyin-chat-mcp-server/record.md","api":"https://wellknown.network/api/v1/agents/douyin-chat-mcp-server","status":"https://wellknown.network/api/v1/agents/douyin-chat-mcp-server/status","claim":"https://wellknown.network/agents/douyin-chat-mcp-server/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/douyin-chat-mcp-server/claim.json","badge":"https://wellknown.network/agents/douyin-chat-mcp-server/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/douyin-chat-mcp-server/history","tools":"https://wellknown.network/api/v1/agents/douyin-chat-mcp-server/tools"},"ard":{"identifier":"urn:air::server:douyin-chat-mcp-server","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"douyin-chat-mcp-server","summary":"MCP Server for Douyin — let AI search users, read and send Douyin direct messages via browser automation","description":"# Douyin MCP Server\n\n将抖音网页版私信/聊天功能暴露为 MCP (Model Context Protocol) 工具，让 AI 助手可以搜索用户、读取和发送抖音私信。\n\n## 核心功能\n\n| # | 功能 | MCP 工具 | 实现方式 |\n|---|------|----------|----------|\n| 1 | 🔍 搜索用户 | `search_user(keyword)` | 搜索页面 → DOM 提取用户信息 |\n| 2 | 📥 读取私信 | `read_messages(contact, limit)` | DOM 提取消息文本（零成本） |\n| 3 | 📤 发送私信 | `send_message(user_id, text)` | Draft.js JS 注入 + 点击发送 |\n| 4 | 📋 会话列表 | `list_conversations()` | DOM 提取会话项（昵称、最后消息、未读） |\n\n## 技术架构\n\n```\n┌─────────────────────────────────────┐\n│          MCP Host (Claude 等)         │\n├─────────────────────────────────────┤\n│         Douyin MCP Server            │\n│  ┌─────────┐  ┌───────────────────┐  │\n│  │ server.py │→│  FastMCP 暴露工具  │  │\n│  ├─────────┤  ├───────────────────┤  │\n│  │ core.py  │→│  DouyinController   │  │\n│  ├─────────┤  ├───────────────────┤  │\n│  │browser.py│→│ BrowserManager     │  │\n│  │          │  │ 扫码登录 + 持久化   │  │\n│  └─────────┘  └───────────────────┘  │\n├─────────────────────────────────────┤\n│       Playwright + Chromium           │\n├─────────────────────────────────────┤\n│      抖音网页版 (www.douyin.com)       │\n└─────────────────────────────────────┘\n```\n\n## 快速开始\n\n### 前提条件\n\n- Python 3.10+\n- 手机抖音 App（用于扫码登录）\n\n### 安装\n\n```bash\n# 1. 克隆项目\ngit clone https://github.com/Lozzi1910/Douyin-mcp.git\ncd Douyin-mcp\n\n# 2. 安装依赖\npip install -e .\n\n# 3. 安装 Playwright Chromium 浏览器\nplaywright install chromium\n```\n\n### 启动\n\n```bash\n# 方式一：直接运行（stdio 模式，适合本地 MCP Host）\npython -m douyin_mcp.server\n\n# 方式二：SSE 模式（HTTP 端口，适合远程调用）\npython -m douyin_mcp.server --transport sse --port 6789\n\n# 方式三：通过 mcp CLI\nmcp run douyin_mcp/server.py --port 6789\n```\n\n---\n\n## Docker 部署\n\n### 首次部署\n\n```bash\n# 1. 构建镜像\ndocker compose build\n\n# 2. 启动\ndocker compose up -d\n\n# 3. 查看日志（等待二维码出现）\ndocker compose logs -f\n\n# 4. 用手机抖音 App 扫码\n#    二维码保存在 ./data/login_qrcode.png\nopen ./data/login_qrcode.png\n```\n\n### 连接 MCP Host\n\n```bash\n# 容器运行在 SSE 模式\n# MCP Host 通过 SSE 端点连接:\n#   http://localhost:6789/sse   (SSE 事件流)\n#   http://localhost:6789/mcp   (MCP 消息端点)\n#   http:/…","publisher":null,"homepage":"https://github.com/Lozzi1910/Douyin-mcp","repository":"https://github.com/Lozzi1910/Douyin-mcp","version":"0.1.0","license":"AGPL-3.0-only","protocols":["mcp"],"tags":["mcp","douyin","抖音","wechat","automation"],"pricing":null,"endpoints":[{"url":"pypi:douyin-chat-mcp-server","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","license":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi"}},"derived":{"capabilities":[{"slug":"infra.browser-automation","name":"Browser Automation","confidence":1,"provenance":"derived"},{"slug":"dev.version-control","name":"Version Control","confidence":0.745,"provenance":"derived"},{"slug":"communication.chat","name":"Team Chat","confidence":0.667,"provenance":"derived"}],"categories":["communication","dev","infra"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"douyin-chat-mcp-server","registry":"pypi","observedAt":"2026-09-15T13:22:05.325Z","publishedAt":"2026-06-07T02:53:39.803927Z","latestVersion":"0.1.0"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"douyin-chat-mcp-server","url":"https://pypi.org/project/douyin-chat-mcp-server/","firstSeenAt":"2026-09-09T14:32:16.204Z","fetchedAt":"2026-09-15T13:20:52.745Z","normalizedAt":"2026-09-15T13:20:52.745Z"}]},"firstSeenAt":"2026-09-09T14:32:16.204Z","updatedAt":"2026-09-15T13:22:05.325Z"}