Mavis MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mavis MCP Server spawn a worker agent to review the code in /src for SQL injection risks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mavis MCP Server
将 Mavis 作为 MCP Server 暴露给 Claude Code / Agent SDK / 任何 MCP 客户端调用。
快速开始
1. 添加到 Claude Code
# 方法一:直接配置(全局)
claude mcp add mavis --type stdio -- node /Users/cunning/.mavis/agents/mavis-mcp-server/src/index.js
# 方法二:手动配置项目
# 将以下内容添加到项目根目录的 .mcp.json 文件在项目 .mcp.json 中添加:
{
"mcpServers": {
"mavis": {
"type": "stdio",
"command": "node",
"args": ["/Users/cunning/.mavis/agents/mavis-mcp-server/src/index.js"]
}
}
}2. 用 Agent SDK 调用
import { query } from "@anthropic-ai/claude-agent-sdk";
for await (const message of query({
prompt: "用 mavis_spawn_worker 启动一个 coder agent,帮我审查 /path/to/project 的代码安全",
options: {
mcpServers: {
mavis: {
command: "node",
args: ["/Users/cunning/.mavis/agents/mavis-mcp-server/src/index.js"]
}
}
}
})) {
console.log(message);
}Related MCP server: OpenClaw MCP Server
可用工具(22个)
Session 管理
Tool | 说明 |
| 列出所有会话 |
| 获取会话详情 |
| 获取会话消息历史 |
| 创建新会话(spawn agent) |
| 中止运行中的会话 |
| 轮换当前会话 |
| 查看会话的文件变更 |
通信
Tool | 说明 |
| 向会话发送消息/命令 |
| 列出所有可达会话 |
Team 编排
Tool | 说明 |
| 多 Agent 并行任务规划执行 |
Agent 管理
Tool | 说明 |
| 列出所有可用 Agent |
| 获取 Agent 详情 |
| 启动单次验证/审查 Agent |
Memory
Tool | 说明 |
| 追加记忆条目 |
| 搜索记忆 |
Cron 调度
Tool | 说明 |
| 创建定时任务 |
| 列出定时任务 |
| 删除定时任务 |
其他
Tool | 说明 |
| 技能管理 |
| Hook 管理 |
| 查看配置 |
| MCP 服务器管理 |
| 守护进程状态 |
| Token 使用统计 |
使用示例
在 Claude Code 中使用
你:我需要审查这个代码库的安全性,让 Mavis agent 来做
Claude Code:调用 mavis_team_plan,描述任务,Mavis 自动编排 coder + verifier agent 协作完成用 mavis_session_new 启动任务
{
"name": "mavis_session_new",
"arguments": {
"agent": "coder",
"prompt": "审查 /path/to/project/src 的 SQL 注入风险",
"title": "安全审查任务",
"workspace": "/path/to/project"
}
}本地开发
cd /Users/cunning/.mavis/agents/mavis-mcp-server
# 安装
npm install
# 测试 MCP server
node scripts/test-client.js
# 启动 server(stdio 模式)
node src/index.js架构说明
Claude Code / Agent SDK (MCP Client)
│
▼ stdio JSON-RPC
┌─────────────────────────┐
│ mavis-mcp-server │
│ (Node.js stdio transport)
│ │
│ 22 MCP tools │
│ │ │
│ ▼ spawn / IPC │
└────────┬────────────────┘
│
▼ exec mavis CLI
Mavis Daemon
(port 15321)
│
▼
Mavis Agents
(mavis, coder, verifier, general)文件结构
mavis-mcp-server/
├── package.json
├── src/
│ └── index.js # MCP Server 实现(22个工具)
└── scripts/
└── test-client.js # 测试客户端Available Tools
26 toolsmavis_agent_infoB
Get detailed info about a specific agent (skills, system prompt, etc.)
Inputs: agentName (required).
mavis_agent_listA
List all available Mavis agents (built-in and custom).
Inputs: no named parameters.
mavis_comm_peersB
List all reachable (active) sessions in the Mavis network.
Inputs: agent, sessionId.
mavis_comm_sendC
Send a message or command to a running session (prompt/abort/kill/summarize/fork/spawn).
Inputs: to (required), command (required), content, from.
mavis_config_showA
Show current Mavis daemon configuration (models, provider, nexus settings).
Inputs: no named parameters.
mavis_cron_createB
Create a scheduled cron job (self-reminder, recurring task, etc.)
Inputs: agentName (required), cronName (required), schedule (required), prompt (required), +4 more.
mavis_cron_deleteB
Delete a cron job.
Inputs: agentName (required), cronName (required).
mavis_cron_listB
List all scheduled cron jobs for an agent.
Inputs: agentName.
mavis_hook_listA
List all registered Mavis hooks (pre/post execution triggers).
Inputs: no named parameters.
mavis_mcp_callB
Call a specific tool on an MCP server. Useful for delegating to Playwright, Matrix, or other MCP tools from within Mavis.
Inputs: server (required), tool (required), args.
mavis_mcp_listA
List all registered MCP servers and their available tools.
Inputs: no named parameters.
mavis_memory_appendB
Append a new entry to Mavis memory (user, agent, or project level).
Inputs: scope (required), content (required), agentName, topic.
mavis_memory_searchC
Search Mavis memory for entries matching a query.
Inputs: query (required), scope.
mavis_session_abortB
Abort a running session.
Inputs: sessionId (required).
mavis_session_diffA
Show file changes (git diff) made by a session.
Inputs: sessionId (required).
mavis_session_infoB
Get detailed info about a specific session (status, workspace, model, etc.)
Inputs: sessionId (required).
mavis_session_listB
List Mavis sessions. Returns session IDs, titles, and last-updated timestamps.
Inputs: agentId, limit, includeArchived.
mavis_session_messagesB
Get the message history (conversation transcript) of a session.
Inputs: sessionId (required), limit.
mavis_session_newA
Create a new standalone Mavis session (use --from root for isolated, independent session). For child sessions linked to a parent, use mavis_spawn_worker instead.
Inputs: agent (required), prompt, title, workspace, +1 more.
mavis_session_rotateA
Rotate the current session — archives the old session and creates a fresh one with a handoff prompt.
Inputs: no named parameters.
mavis_skill_infoB
Get detailed info about a specific skill (description, triggers, commands).
Inputs: skillName (required), agentName.
mavis_skill_listA
List all installed Mavis skills (global and agent-specific).
Inputs: no named parameters.
mavis_spawn_workerA
Spawn a single-shot worker/verifier agent as a child session. Use for code review, test, verify tasks. The agent runs independently and reports back. For complex multi-agent tasks, use mavis_team_plan instead.
Inputs: agent (required), prompt (required), workspace, parentSession.
mavis_statusA
Check Mavis daemon status (running, port, version).
Inputs: no named parameters.
mavis_team_planA
List team plans or get status of a specific plan. Use team plan status <id> to view details. Create plans via YAML files with team plan run <yaml> (not exposed here — use mavis_session_new for one-off tasks).
Inputs: planId.
mavis_usageC
Inspect token usage by session, agent, or globally.
Inputs: sessionId, agentName, from, to, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Each tool targets a distinct resource and action, with clear domain prefixes like session, agent, memory. Even the session tools (new, list, info, messages, abort, rotate, diff) have well-defined purposes, and potential overlaps like session_new vs spawn_worker are clarified in descriptions.
All tools follow a consistent 'mavis_<domain>_<verb>_<noun>' pattern, using snake_case throughout. Verbs like list, info, create, delete, search, append are uniformly applied across domains.
26 tools is somewhat high but justified by the comprehensive scope covering agents, sessions, memory, skills, communication, MCP, cron, hooks, and team plans. Each tool serves a distinct purpose, and no obvious redundancy exists.
The tool surface covers most lifecycle operations for agents, sessions, memory, and skills. Notable gaps include lack of agent creation/deletion and team plan creation (only status/list), but core workflows are well-supported.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Hosted MCP server and Agent Skills for specs, engineering threads, and project memory.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server that enables multi-agent collaboration with task lists, inter-agent messaging, and tmux-based spawning, making Claude Code's agent teams protocol available to any MCP client.283MIT
- AlicenseBqualityDmaintenanceMCP server that exposes OpenClaw Gateway tools to Claude Code and other MCP clients, enabling messaging, session management, scheduling, node control, web search, memory search, and TTS.2115MIT
- AlicenseAqualityFmaintenanceAn MCP server for coordinating multiple Claude Code sessions across related projects.11MIT
- AlicenseAqualityDmaintenanceThis MCP server enables remote control and management of Claude Code agents, allowing you to execute missions, configure agent personalities, and integrate with other MCP tools.715 npm1MIT