Manus MCP
Manus MCP
一个 MCP 服务器,通过官方 Manus API v2 为 Claude Code 提供对 Manus.im 的完全程序化控制。实现了 全部 30 个已记录的端点、3 个用于常见工作流的复合工具,以及一个带有 RSA-SHA256 签名验证的 本地 Webhook 接收器。
状态: 生产就绪(单用户) — v0.1.1
语言: Python 3.11+
传输: stdio (Claude Code 原生)
基础 URL:
https://api.manus.ai
验证覆盖率 (v0.1.1)
层级 | 指标 |
单元测试 | 60+ (server.py 分发、Webhook ASGI 应用、密钥泄露防护、模式稳定性) |
实时端到端测试 | 23 (包括 task.update / sendMessage / confirmAction / agent.update / website.publish) |
复合实时测试 | 4 (包括 F2 拒绝检查) |
Webhook 实时端到端 | 1 (cloudflared 隧道 + 接收器 + Manus 投递) |
已执行的 Manus API 端点 | 30/30 (仅在账户缺少先决条件时优雅跳过 — 无代理 / 无网站) |
覆盖率 | ≥ 80% (CI 中强制要求) |
| 0 错误 |
| 0 错误 |
请参阅 docs/SECURITY.md 和 docs/RELEASE.md 了解生产流程。
Related MCP server: claudecode-mcp
包含内容
30 个直接 API 封装
类别 | 工具 |
任务 (9) |
|
项目 (2) |
|
技能 (1) |
|
代理 (3) |
|
文件 (3) |
|
Webhooks (4) |
|
使用情况 (3) |
|
连接器 (1) |
|
浏览器 (1) |
|
网站 (3) |
|
3 个复合工具
manus_file_upload— 创建预签名 URL,上传字节,并等待status=uploaded。接受path、base64或公共url。manus_task_wait— 轮询任务直到其达到终止状态 (stopped/waiting/error) 并返回新消息以及等待详情 (event_id + 响应模式)。manus_website_publish_and_wait— 发布网站并等待直到其变为published或failed。
3 个 Webhook 工具 (从本地 SQLite 数据库读取)
manus_webhook_events_list— 列出带有过滤器的已接收事件。manus_webhook_events_get— 通过event_id获取事件。manus_webhook_events_clear— 删除已接收的事件。
总计: 36 个 MCP 工具。
安装
cd path/to/Manus-MCP
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
# source .venv/bin/activate
pip install -e ".[dev]"API 密钥配置
在项目根目录放置一个 .env 文件(提供了一个 .env.example 模板)。两种变量名均可接受:
MANUS_API_KEY=sk-...
# or, for backwards compatibility:
# ManusAPI=sk-...优先级: process.env > .env。
可选设置:
MANUS_BASE_URL=https://api.manus.ai
MANUS_HTTP_TIMEOUT=60
MANUS_LOG_LEVEL=INFO在 Claude Code 中注册
将以下内容添加到 .claude/settings.json (项目级) 或 ~/.claude/settings.json (全局):
{
"mcpServers": {
"manus": {
"command": "python",
"args": ["-m", "manus_mcp"],
"cwd": "path/to/Manus-MCP"
}
}
}如果未全局设置 MANUS_API_KEY,请显式传递它:
{
"mcpServers": {
"manus": {
"command": "python",
"args": ["-m", "manus_mcp"],
"cwd": "path/to/Manus-MCP",
"env": { "MANUS_API_KEY": "sk-..." }
}
}
}重启 Claude Code — manus_* 工具将出现在工具列表中。
验证
无需启动服务器:
python scripts/list_tools.py针对真实 API:
python scripts/smoke.py单元测试:
pytestLint 和类型检查:
ruff check .
mypy manus_mcp来自 Claude Code 的使用示例
manus_task_create { "message": { "content": "Give me a 5-bullet summary of today's AI news" } }响应包含一个 task_id。然后:
manus_task_wait { "task_id": "<id>", "timeout_sec": 600 }当它完成时,你会得到包含最终回复的 last_assistant_message 和包含对话历史的 new_messages。
上传文件并将其附加到任务:
manus_file_upload { "source": { "path": "C:/docs/report.pdf" } }
manus_task_create {
"message": {
"content": [
{ "type": "text", "text": "Summarize this report" },
{ "type": "file", "file_id": "<file_id>" }
]
}
}Webhook 接收器 (可选)
一个用于 task_created / task_stopped 事件的本地接收器,具有根据 ManusAPIDocs/webhooks/security.md 的完整 RSA-SHA256 签名验证。
1. 配置环境变量
MANUS_WEBHOOK_PUBLIC_URL=https://your-tunnel.example.com/manus/webhook
MANUS_WEBHOOK_HOST=127.0.0.1
MANUS_WEBHOOK_PORT=8787
# MANUS_WEBHOOK_DB_PATH=... # defaults to %LOCALAPPDATA%\manus-mcp\events.db on WindowsMANUS_WEBHOOK_PUBLIC_URL 必须与 Manus 调用的 URL 完全匹配。Manus 签名负载包含此 URL,因此即使是一个拼写错误也会导致每个事件被拒绝。
2. 启动隧道
例如,使用 Cloudflare Tunnel:
cloudflared tunnel --url http://localhost:8787或 ngrok:
ngrok http 87873. 运行接收器
python -m manus_mcp.webhook_receiver
# or: manus-mcp-webhook --host 127.0.0.1 --port 87874. 向 Manus 注册 Webhook
在 Claude Code 中:
manus_webhook_create { "url": "https://your-tunnel.example.com/manus/webhook" }5. 读取事件
manus_webhook_events_list { "event_type": "task_stopped", "limit": 20 }
manus_webhook_events_get { "event_id": "..." }
manus_webhook_events_clear { "before_received_at": 1704000000 }架构
manus_mcp/
├── __main__.py # stdio entrypoint
├── server.py # MCP Server bootstrap
├── config.py # pydantic-settings
├── logger.py # stderr-only logger
├── client/
│ ├── manus_client.py # async httpx client + retry
│ ├── rate_limiter.py # per-endpoint token bucket (from rate-limits.md)
│ ├── retry.py # exponential backoff + jitter
│ └── errors.py # ManusApiError / ManusNetworkError
├── schemas/ # pydantic models for each resource (tasks, projects, ...)
├── tools/ # @manus_tool registration for all 36 tools
│ ├── tasks.py projects.py skills.py agents.py
│ ├── files.py webhooks.py usage.py connectors.py
│ ├── browser.py website.py
│ └── composite.py # task_wait / file_upload / website_publish_and_wait
└── webhook_receiver/
├── signature.py # RSA-SHA256 verification using {ts}.{url}.{sha256_hex(body)}
├── storage.py # SQLite WAL
├── server.py # Starlette + uvicorn
├── tools.py # events_list / events_get / events_clear
└── __main__.py速率限制
客户端遵守 API 限制(60 秒滑动窗口),并透明地重试 429 响应,采用退避 + 抖动策略。限制来自 ManusAPIDocs/getting-started/rate-limits.md:
10/分钟:
task.create,task.sendMessage40/分钟: 所有变更操作
100/分钟: 所有只读调用
600/分钟:
usage.*
安全性
API 密钥从不被记录。
Webhook 接收器验证签名并拒绝超过 5 分钟的时间戳。
公钥缓存 1 小时。
SQLite 以 WAL 模式打开,设置
check_same_thread=False以实现安全的多读取器访问。
许可证
MIT。
Available Tools
36 toolsmanus_agent_detailA
Get an agent's details including nickname and description. The 'agent-default' shortcut works only when your account has a configured IM agent; otherwise this returns 'not_found'. Use manus_agent_list to discover real agent_ids if 'agent-default' is rejected.
Inputs: agent_id (required).
manus_agent_listA
List all agents in the account.
Inputs: no named parameters.
manus_agent_updateB
Update an agent's nickname and/or description.
Inputs: agent_id (required), about, nickname.
manus_browser_online_listA
List online browser clients. Use the returned client_id with manus_task_confirm_action when the agent triggers a needConnectMyBrowser waiting event. Empty list means you need to install/enable the Manus Browser Extension.
Inputs: no named parameters.
manus_connector_listA
List all connectors installed in the account. Use the returned IDs in the connectors array of manus_task_create / manus_task_send_message.
Inputs: no named parameters.
manus_file_createA
Create a file record and get a presigned S3 upload URL. You must PUT the bytes to upload_url within 3 minutes. Prefer manus_file_upload which performs the full flow (create + PUT + wait-until-uploaded) in one call.
Inputs: filename (required).
manus_file_deleteB
Delete a file. Files auto-delete 48 hours after upload, so manual deletion is optional.
Inputs: file_id (required).
manus_file_detailB
Get a file's metadata including upload status, size, and expiration.
Inputs: file_id (required).
manus_file_uploadA
Upload a file end-to-end: create presigned URL, PUT bytes, and (by default) wait until status=uploaded. Accepts one of: local path, base64-encoded bytes, or a public URL to fetch first. Returns the final file record ready to reference as file_id in tasks.
Inputs: source (required), filename, content_type, wait_timeout_sec, +2 more.
manus_project_createA
Create a new project with an optional default instruction that will be applied to every task created with this project_id.
Inputs: name (required), instruction.
manus_project_listA
List all projects visible to the current user.
Inputs: no named parameters.
manus_skill_listA
List available skills. Provide project_id to include project-specific skills in addition to global user skills.
Inputs: project_id.
manus_task_confirm_actionA
Confirm a pending action. Use when a status_update event reports agent_status='waiting' with waiting_for_event_type != 'messageAskUser'. Pass event_id from the event and an input dict matching the event's confirm_input_schema (e.g. {'accept': true} for most events, {'action': 'select', 'client_id': '...'} for needConnectMyBrowser).
Inputs: task_id (required), event_id (required), input.
manus_task_createA
Create a new Manus task. Runs asynchronously; poll manus_task_list_messages or use manus_task_wait for completion. Supports text/file/voice content parts, connectors, skills, project scoping, and interactive mode.
Inputs: message (required), title, locale, project_id, +4 more.
manus_task_deleteA
Permanently delete a task. Agent-related tasks (main tasks, subtasks) cannot be deleted.
Inputs: task_id (required).
manus_task_detailA
Get a task's status and metadata. Use manus_task_list_messages for the full conversation history. Accepts the IM shortcut 'agent-default-main_task'.
Inputs: task_id (required).
manus_task_listB
List tasks with cursor pagination. scope='agent_subtask' requires agent_id; scope='project' requires project_id.
Inputs: limit, order, scope, cursor, +2 more.
manus_task_list_messagesC
List task events with cursor pagination. verbose=true includes tool_used, plan_update, new_plan_step, and explanation events. Inspect status_update events for agent_status.
Inputs: task_id (required), limit, order, cursor, +2 more.
manus_task_send_messageA
Send a follow-up message to a task. Use this when waiting_for_event_type='messageAskUser' (NOT manus_task_confirm_action). Accepts the same content structure as manus_task_create.
Inputs: message (required), task_id (required).
manus_task_stopA
Stop a running task. The task can be resumed with manus_task_send_message.
Inputs: task_id (required).
manus_task_updateC
Rename a task or change share visibility / task-list visibility.
Inputs: task_id (required), title, share_visibility, enable_visible_in_task_list.
manus_task_waitA
Poll a task until it reaches a terminal state (stopped / waiting / error) or times out. Returns the final status, new messages, and — if waiting — the event_id and input schema needed for manus_task_confirm_action or the body needed for manus_task_send_message.
Inputs: task_id (required), timeout_sec, include_verbose, since_message_id, +2 more.
manus_usage_listC
List the current user's credit history at session granularity (newest first).
Inputs: limit, cursor.
manus_usage_team_logA
Per-user team statistics (task counts + credit totals). Team accounts only; members see only their own row. Enterprise teams have T+1 latency.
Inputs: limit, cursor, is_asc, sort_by, +2 more.
manus_usage_team_statisticA
Daily team credit consumption totals. Team accounts only; members see only their own totals. Optional start_date / end_date filter (Unix seconds).
Inputs: end_date, start_date.
manus_webhook_createA
Register an HTTPS webhook URL to receive task_created and task_stopped events. Manus sends a test request before activation; endpoint must return 2xx within 10 seconds.
Inputs: url (required).
manus_webhook_deleteA
Delete a webhook. The endpoint will stop receiving notifications immediately.
Inputs: webhook_id (required).
manus_webhook_events_clearA
Delete webhook events from the local store. Provide any combination of filters; no filters = delete everything.
Inputs: task_id, event_type, before_received_at.
manus_webhook_events_getB
Fetch a single webhook event by event_id.
Inputs: event_id (required).
manus_webhook_events_listA
List webhook events received by the local webhook receiver. Filter by event_type ('task_created' / 'task_stopped') and/or task_id. Requires the webhook receiver to be running (see manus-mcp-webhook).
Inputs: limit, order, task_id, event_type, +1 more.
manus_webhook_listA
List all registered webhooks.
Inputs: no named parameters.
manus_webhook_public_keyA
Get the RSA public key used to sign webhook deliveries. Cache this (1 hour recommended).
Inputs: no named parameters.
manus_website_list_checkpointsB
List all checkpoints of a website (newest first). Match published_version_id against data[].version_id to find the live checkpoint.
Inputs: task_id, website_id.
manus_website_publishA
Deploy the latest checkpoint of a website. Async — poll manus_website_status until publish_status becomes 'published' or 'failed', or use manus_website_publish_and_wait for an all-in-one call.
Inputs: task_id, visibility, website_id.
manus_website_publish_and_waitA
Deploy the latest checkpoint and poll until the website is published or the deployment fails. Returns the final website status with site URLs.
Inputs: task_id, visibility, website_id, timeout_sec, +1 more.
manus_website_statusB
Get a website's publish status, live URLs, and visibility. Provide exactly one of task_id or website_id.
Inputs: task_id, website_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 36 tools
Each tool targets a distinct resource and action within well-defined domains (agent, file, task, webhook, website, etc.). There is no overlap in purpose; for example, manus_task_create, manus_task_send_message, and manus_task_stop are clearly different operations.
All tools follow a consistent 'manus_<domain>_<action>' pattern (e.g., manus_agent_list, manus_file_upload, manus_task_wait). Even compound names like manus_task_list_messages adhere to this structure, making tool names predictable and easy to parse.
With 36 tools, the server covers a broad set of features (agents, browsers, connectors, files, projects, skills, tasks, usage, webhooks, websites). While this is on the higher side, each tool is justified by the complexity of the platform and no obvious bloat is present.
The tool surface provides CRUD-like coverage for most domains: task management includes create, read, list, update, delete, stop, wait, confirm; files have create, upload, detail, delete; webhooks have full lifecycle. Minor gaps exist (no file update or project update), but these are acceptable given the domain.
Maintenance
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP Server for the Notion API, enabling Claude to interact with Notion workspaces.313,438 npm926MIT
- AlicenseAqualityBmaintenanceLocal MCP server that wraps the headless Claude Code CLI as MCP tools, providing stateless access to Claude's coding capabilities through prompt-based interactions. It enables users to execute Claude Code commands with various prompt formats and structured outputs directly from MCP clients.3MIT
- AlicenseNot gradedqualityDmaintenanceTurns any CLI tool or REST API into an MCP server for Claude, enabling Claude to use git, databases, or any API through natural language.MIT
- FlicenseNot gradedqualityDmaintenanceA remote MCP server that wraps the Manus API to expose a generate_image tool, enabling Claude to request image generation via Manus.-