Kaption WhatsApp

io.github.Kaption-AIv0.5.6更新于 Oct 5, 2026

Read and manage your WhatsApp conversations through the KaptionAI browser extension.

概览

AI 生成的概览

通过 KaptionAI 浏览器扩展,让助手读取和管理 WhatsApp 会话、联系人、标签、提醒与定时消息。

功能
通过本地 WebSocket 将 AI 助手经 KaptionAI Chrome 扩展连接到 WhatsApp Web。工具可查询会话、联系人、消息、转录、标签和社群;生成会话摘要;管理 Business 标签、个人聊天列表和聊天状态(归档、置顶、静音、草稿等);创建提醒;以 bot 或 local 模式安排定时消息;下载消息媒体;读写联系人备注;以及读取带逐词时间轴的通话录音。get_api_info 工具可返回 REST 连接信息,多个账号和多个 AI 客户端可共用同一扩展连接。
适用场景
当你希望助手搜索和整理 WhatsApp 聊天、总结会话、处理未读消息、管理标签或列表,或在不离开 AI 工具的情况下安排和起草消息时使用。适合已在使用 KaptionAI 扩展、并希望 Claude、Cursor、VS Code 等 MCP 客户端获得 WhatsApp 上下文的桌面用户。
运行要求
需要 Node.js 与 npx 以 stdio 方式运行 npm 包 @kaptionai/mcp-extension,并安装 KaptionAI Chrome 扩展且启用其 MCP 桥接。需在 Chrome 或 Edge 中打开 WhatsApp Web,扩展才能通过本地 WebSocket 连接。仅支持桌面端,无网页版。未声明 API 密钥或环境变量。标签和备注功能需要 WhatsApp Business 账号。
安装前请注意
写操作会改动真实的 WhatsApp 数据:可创建或删除标签与列表,归档、静音、置顶或标记已读聊天,设置草稿,并发送定时消息。bot 模式的消息由 Kaption 的 WhatsApp 号码发出并存储在 Kaption 云端;local 模式从你自己的号码发出,需要你在扩展中明确开启。提醒存储在云端。get_api_info 会返回 REST 地址和认证令牌。锁定聊天会被排除,且必须启用 MCP 桥接。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Kaption WhatsApp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@kaptionai/mcp-extension

MCP server that lets AI assistants read and manage your WhatsApp conversations through the KaptionAI Chrome extension. Also supports WebMCP for zero-config browser-native AI tool discovery.

Claude / Cursor ──stdio──> mcp-whatsapp ──ws://localhost:7865──> KaptionAI Extension ──> WhatsApp WebBrowser AI Agent ──navigator.modelContext──> KaptionAI Extension ──> WhatsApp Web (WebMCP)

Setup

1. Install the extension

Install the KaptionAI Chrome Extension and enable the MCP bridge in settings.

2. Configure your AI tool

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "whatsapp": {      "command": "npx",      "args": ["-y", "@kaptionai/mcp-extension@latest"]    }  }}

Claude Code

bash
claude mcp add whatsapp -- npx -y @kaptionai/mcp-extension@latest

Cursor

Add to .cursor/mcp.json in your project or go to Settings > MCP Servers:

json
{  "mcpServers": {    "whatsapp": {      "command": "npx",      "args": ["-y", "@kaptionai/mcp-extension@latest"]    }  }}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

json
{  "mcpServers": {    "whatsapp": {      "command": "npx",      "args": ["-y", "@kaptionai/mcp-extension@latest"]    }  }}

VS Code (Copilot)

Add to .vscode/mcp.json in your project:

json
{  "servers": {    "whatsapp": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@kaptionai/mcp-extension@latest"]    }  }}

Or add to your VS Code settings.json:

json
{  "mcp": {    "servers": {      "whatsapp": {        "type": "stdio",        "command": "npx",        "args": ["-y", "@kaptionai/mcp-extension@latest"]      }    }  }}

Zed

Add to Zed settings (~/.config/zed/settings.json):

json
{  "context_servers": {    "whatsapp": {      "command": {        "path": "npx",        "args": ["-y", "@kaptionai/mcp-extension@latest"]      }    }  }}

OpenAI Agents SDK (Python)

python
from agents import Agentfrom agents.mcp import MCPServerStdio
whatsapp = MCPServerStdio(    name="whatsapp",    command="npx",    args=["-y", "@kaptionai/mcp-extension@latest"],)
agent = Agent(    name="assistant",    instructions="You can access WhatsApp conversations.",    mcp_servers=[whatsapp],)

Any MCP-compatible client

This package runs as a standard MCP server over stdio. To connect from any client:

bash
npx -y @kaptionai/mcp-extension@latest

The server communicates via stdin/stdout using the MCP protocol. Point your client's MCP configuration to this command.

3. Open WhatsApp Web

Open web.whatsapp.com in Chrome or Edge. The extension will auto-connect to the MCP server.

Tools

query

Query WhatsApp data — conversations, contacts, messages, transcriptions, labels, and communities.

# List conversationsquery {}
# Search everythingquery { query: "meeting" }
# Unread onlyquery { unread: true }
# Look up a conversation with messagesquery { id: "[email protected]" }
# Search contactsquery { query: "Alice", entity: "contacts" }
# List labels (Business accounts)query { entity: "labels" }
# Filter by labelquery { label: "Important" }
# List communitiesquery { entity: "communities" }
# Filter by communityquery { community: "My Community" }
# Get session infoquery { entity: "session" }
ParameterTypeDescription
querystringSearch text (names, messages, transcriptions)
idstringLook up a specific conversation, contact, or label
entitystringconversations, contacts, messages, transcriptions, labels, communities, session
limitnumberMax results (default 25, max 5000)
unreadbooleanOnly unread conversations
labelstringFilter by label name or ID
communitystringFilter by community name or ID
beforestringMessages before this ISO 8601 timestamp (pagination)
afterstringMessages after this ISO 8601 timestamp (incremental sync)

summarize_conversation

Generate a summary of a conversation.

ParameterTypeDescription
conversation_idstringThe conversation ID

manage_labels

Manage WhatsApp Business labels — add, remove, create, or delete labels.

ParameterTypeDescription
actionstringadd, remove, create, delete
label_namestringLabel name
label_idstringLabel ID (alternative to name)
conversation_idstringRequired for add/remove

manage_lists

Manage personal chat lists (custom lists). The personal account equivalent of Business labels — organize chats into custom categories.

# List all custom listsmanage_lists { action: "list" }
# Get a list with its chatsmanage_lists { action: "get", name: "Family" }
# Create a new listmanage_lists { action: "create", name: "Work", conversation_id: "[email protected]" }
# Add a chat to a listmanage_lists { action: "add_chat", name: "Family", conversation_id: "[email protected]" }
# Remove a chat from a listmanage_lists { action: "remove_chat", name: "Family", conversation_id: "[email protected]" }
# Delete a listmanage_lists { action: "delete", name: "Old List" }
ParameterTypeDescription
actionstringlist, get, create, edit, delete, add_chat, remove_chat
idstringList ID
namestringList name (for create/edit, or to resolve by name)
conversation_idstringChat ID(s) to add/remove

manage_chat

Manage chat state — archive, unarchive, mark as read/unread, pin, unpin, mute, unmute, set/clear draft messages.

# Archive a chatmanage_chat { action: "archive", conversation_id: "[email protected]" }
# Mark as readmanage_chat { action: "mark_read", conversation_id: "[email protected]" }
# Pin a chat (max 3)manage_chat { action: "pin", conversation_id: "[email protected]" }
# Mute for 1 weekmanage_chat { action: "mute", conversation_id: "[email protected]", mute_duration: "1w" }
# Set a draft messagemanage_chat { action: "set_draft", conversation_id: "[email protected]", text: "Hey, I'll call you back" }
ParameterTypeDescription
actionstringarchive, unarchive, mark_read, mark_unread, pin, unpin, mute, unmute, set_draft, clear_draft
conversation_idstringThe conversation ID
mute_durationstring8h, 1w, or forever (default). Only for mute
textstringDraft text. Required for set_draft

manage_reminders

Create and manage personal reminders. Stored in the cloud and delivered via the Kaption extension.

# List active remindersmanage_reminders { action: "list" }
# Create a remindermanage_reminders { action: "create", title: "Follow up with client", datetime: "2026-03-07T14:00:00Z" }
# Complete a remindermanage_reminders { action: "complete", id: "rem_abc123" }
# List all including completedmanage_reminders { action: "list", filter: "all" }
ParameterTypeDescription
actionstringlist, get, create, update, delete, complete, uncomplete
filterstringFor list: active (default), completed, all
idstringReminder ID (for get/update/delete/complete/uncomplete)
titlestringReminder text (max 800 chars, no newlines)
datetimestringISO 8601 datetime
notification_typestringextension, whatsapp, or automatic (default)

manage_scheduled_messages

Schedule messages to be sent automatically at a specific time, in one of two modes:

  • bot (default) — sent from Kaption's WhatsApp number, not yours. Stored in Kaption's cloud and sent even when your computer is off. One-to-one chats only; one line, up to 800 characters.
  • local ("From this computer") — sent from your own WhatsApp number, as you, while this computer and WhatsApp are open. Nothing leaves your device. Kaption keeps it within safe limits automatically (a few messages an hour and a day, minutes apart, only to chats where the other person has written, at most 3 a day to groups) and refuses what doesn't fit, with the reason. The only mode that can send to groups (ones you can post in and posted in within the last 30 days). Text only. A message whose time passes while the computer is off is marked missed, never sent late on its own.

The local mode has to be turned on by you in Kaption first (the "From this computer" option in the scheduling picker, after reading the limits and risks). An AI assistant can't turn it on; until you do, local requests are refused with (reason: no-consent). It is also rolled out gradually: where it isn't available yet, local requests are refused with (reason: flag-off) and the bot works as before.

# List pending messages of both modes (each one has a "mode")manage_scheduled_messages { action: "list" }
# Schedule with the Kaption botmanage_scheduled_messages { action: "create", message: "Hey, just following up!", datetime: "2026-03-07T09:00:00Z", conversation_id: "[email protected]" }
# Schedule from your own number, or to a groupmanage_scheduled_messages { action: "create", mode: "local", message: "Running 10 min late", datetime: "2026-03-07T09:00:00-03:00", conversation_id: "[email protected]" }manage_scheduled_messages { action: "create", mode: "local", message: "Standup moved to 10", datetime: "2026-03-07T09:00:00Z", conversation_id: "[email protected]" }
# Cancel a scheduled messagemanage_scheduled_messages { action: "delete", id: "msg_abc123" }manage_scheduled_messages { action: "cancel", mode: "local", id: "3f2c…" }
ParameterTypeDescription
actionstringlist, get, create, update, delete; with mode: "local" also cancel, remove (a finished one), send_now (a missed or failed one)
modestringbot (default) or local. For list, omit to get both modes
filterstringFor list: pending (default), sent, all
idstringScheduled message ID (for get/update/delete/cancel/remove/send_now)
conversation_idstringChat to send to (for create): a person, or a group with mode: "local"
messagestringMessage text. Bot: max 800 chars, no newlines. Local: up to 2000 chars
datetimestringISO 8601 datetime when the message should be sent
notification_typestringBot only: extension, whatsapp, or automatic (default)

download_media

Download and decrypt media from a message (images, videos, audio, documents).

ParameterTypeDescription
message_idstringThe message ID containing media
conversation_idstringThe conversation the message belongs to

Returns base64-encoded media data with mimetype, size, duration, and caption.

manage_notes

Read and write contact notes (WhatsApp Business).

ParameterTypeDescription
actionstringget, set
contact_idstringThe contact ID
notestringNote text (required for set)

call_recordings

Read WhatsApp call recordings made by the Kaption extension and their transcripts, with every word timed. Each recording names its conversation (the other person, or the group for a group call). Recordings of locked chats are never returned.

ParameterTypeDescription
actionstringlist, get, search
idstringRecording ID (required for get)
searchstringText to find in names and transcripts (required for search)
conversation_idstringOnly recordings of this contact or group
date_from / date_tostringISO 8601 date range of when the call started
limitnumberMax recordings (default 20, max 100)
include_wordsbooleanFor get: each word with its start and end in seconds

get_api_info

Get HTTP REST API connection info for programmatic access without MCP overhead. Returns URL, auth token, and available endpoints.

Multi-account support

Multiple WhatsApp accounts can be connected simultaneously (e.g. personal + business). Use target_session on any tool to route to a specific account. Query entity: "session" to see all connected accounts and their session IDs.

Multi-instance support

Multiple AI tools can share the same extension connection. The first instance starts a WebSocket hub; subsequent instances auto-detect the existing hub and relay through it. If the hub stops, a relay automatically promotes itself.

WebMCP support

Kaption is WebMCP-ready. On browsers that support the W3C WebMCP draft (navigator.modelContext, Chrome 146+), the extension automatically registers all tools with the browser's native AI tool registry. This means browser-based AI agents can discover and invoke Kaption tools without any MCP server or WebSocket connection — zero configuration.

When WebMCP is available, the extension registers tools prefixed with kaption_ (e.g. kaption_query, kaption_manage_chat) complete with JSON Schema input definitions and readOnlyHint annotations. The tools use the same handlers as the MCP server, so behavior is identical across both paths.

Security

  • Localhost only — no cloud relay, no external connections
  • No messages sent — AI assistants can read, organize, schedule, and draft, but never send messages directly
  • Locked chats hidden — WhatsApp-locked conversations are excluded from all queries
  • Feature-gated — MCP bridge must be explicitly enabled in the extension
  • Business features gated — labels and notes require a WhatsApp Business account
  • Rate limited — draft messages limited to 10 conversations per 5-minute window; write operations include random delays

License

BSL 1.1 — free to use, converts to MIT after 4 years.

来源:README.md,提交 6880ae5

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v0.5.6最新Oct 5, 2026