mcp-cli
MCP management — add/configure servers, authenticate, sync skills, browse and call tools.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
MCP management — add/configure servers, authenticate, sync skills, browse and call tools.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Debug why a session/agent/daemon behaved incorrectly. Load when user mentions a session id (ses_/mvs_*), wants logs, root-cause analysis, or asks about stuck runs, retries, permissions, or recovery. Keywords: 排查, 调试, 卡住, 为什么, log, debug, inspect, retry, recovery.
Coordinate a Mavis multi-agent team plan. Use only when the user explicitly invokes /mavis-team or /team, or 100% unambiguously asks to use an agent team / multi-agent team. Do not infer team use from complexity, deep research, long-running work, parallelism, specialist value, or verification risk.
Nightly batch skill maintenance. Reads pending signals and proposals, plans which skills to create/refine via team engine. Managed by daemon's internal scheduler — not visible to agents or users. Do not load this skill manually -- it is designed for automated nightly runs.
Create one agent on disk. Load when you need to add a new role to the team — typically called by `mavis-team` (when planning analysis says no existing agent fits and the user has consented), by `init` (when bootstrapping `.harness/reins/`), or directly when the user says 'add an agent for X' / 'new an agent' / '加一个 agent' / '建一个 rein'. Two output paths: `~/.mavis/agents/<name>/` (default — cross-project helper) or `<repo>/.harness/reins/<name>/` (when caller specifies project target — coding project rein). Do NOT load to decide WHETHER to create (that lives in `mavis-team` router) or to create a skill (use `skill-creator`).
Coordinate a Mavis multi-agent team plan. Use only when the user explicitly unambiguously asks to use an agent team
Unified DOCX skill — create, template-apply, edit/fill, read, repair, and compare Word documents. Use for formal Word deliverables and DOCX diagnosis. Not for PDF/PPT or casual plain-text drafting.
استنادا إلى تصنيف SOC المهني
| name | mcp-cli |
| description | MCP management — add/configure servers, authenticate, sync skills, browse and call tools. |
| descriptions | {"zh-Hans":"管理 MCP:添加和配置 server、认证、同步 skills,并浏览或调用 MCP tools。"} |
MCP server tools are translated into Agent skills. Agents consume the generated skills and invoke tools via CLI.
mavis mcp list
Shows server name, transport type, auth status, skill status, configured/enabled state.
mavis mcp add <name> '{"url": "https://...", "auth": {"type": "bearer", "token": "..."}}'
Accepts a JSON config. Sets configured: true automatically.
mavis mcp get <name>
mavis mcp remove <name>
For builtin servers: resets to unconfigured template. For user-added servers: disables.
Use genUI for collecting credentials. Do not ask the user to paste tokens in terminal output.
mavis mcp auth login <server>
Returns an authUrl for the user to visit. Tokens are stored automatically after browser callback.
Use mavis mcp add with the auth config:
mavis mcp add my-server '{"url": "https://...", "auth": {"type": "bearer", "token": "..."}}'
Or use genUI to collect the token, then call mavis mcp add via the API.
mavis mcp auth status [server]
mavis mcp sync
Connects to each configured+enabled server, lists tools, generates skill files. Only regenerates when tools change. Skills take effect in the next session.
mavis mcp sync --status
mavis mcp tools <server> # list tools
mavis mcp tools <server> <tool> # tool schema details
mavis mcp call <server> <tool> '{"param": "value"}'
Use --timeout <ms> for long-running operations.
# 1. See available servers (including unconfigured builtins)
mavis mcp list
# 2. Configure a server
mavis mcp add my-server '{"url": "https://...", "headers": {"api-key": "..."}}'
# 3. Authenticate if needed (OAuth2)
mavis mcp auth login my-server
# 4. Sync to generate skills
mavis mcp sync
# 5. Browse tools
mavis mcp tools my-server
# 6. Call a tool
mavis mcp call my-server search_docs '{"query": "how to deploy"}'
The built-in matrix server uses the access token from the daemon's in-memory parent
context (pushed in by the Mavis desktop app at spawn time and hot-rotated via
POST /mavis/internal/auth-context on login / token refresh). The token is injected into the
matrix-mcp-cli process at spawn time. If the daemon had no token when the MCP process
first started, the process caches an empty token and all subsequent calls fail with 401 — even
after the daemon receives a fresh token via the hot-update endpoint.
Symptoms: [matrix-mcp-cli:auth] POST /mavis/api/v1/mcp/tools → 401 401: auth failed,
while mavis mcp auth status matrix shows authenticated.
Fix — force reconnect (re-spawn the MCP process with fresh token):
mavis mcp sync
This tears down the existing connection, re-spawns matrix-mcp-cli with the current token
from the daemon's in-memory parent context, and re-discovers tools.
If sync still fails with 401:
~/.mavis/auth-{region}.json file).
Confirm the daemon has a token by checking the user-name surface (which travels through the
same parent context):
curl -s http://127.0.0.1:$(cat ~/.mavis/daemon.port)/api/agent/mavis | jq .userName
If userName is null/empty, the daemon never received credentials — most likely because
Electron pushed them after the initial spawn but the hot-update endpoint failed; check the
Electron log for [Storage] daemon auth-context push warnings./internal/auth-context HTTP endpoint, no restart required).mavis mcp sync again.Root cause: The MCP connection pool keeps long-lived stdio processes. Updating the
daemon's in-memory token does NOT propagate to an already-running matrix-mcp-cli process.
mavis mcp sync is the only way to force a re-spawn with the latest token.
mavis mcp add to configure servers — do not edit files directly.sync generates skill files — they take effect in the next session.