mcp-status

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

MCP Status

MCP状态检查

Overview

概述

Check the authentication status of all configured Model Context Protocol (MCP) servers.
检查所有已配置的Model Context Protocol(MCP)服务器的认证状态。

Definitions

定义

  • MCP server: A configured Model Context Protocol server in Cursor (e.g. github, atlassian, ado, asdlc).
  • User-level MCP configuration: The
    mcpServers
    section in
    ~/.cursor/mcp.json
    (macOS/Linux) or
    %USERPROFILE%\.cursor\mcp.json
    (Windows), or configured via Cursor Settings → Features → Model Context Protocol.
  • Project-level MCP configuration: Optional
    mcpServers
    in
    .cursor/mcp.json
    at the workspace root. When present, Cursor may merge or override with user-level config; discover from this file so status reflects project-configured servers. If the file is missing, skip (not an error).
  • Extension-exposed MCP: An MCP server provided by a VS Code/Cursor extension (e.g. Agent Context Explorer / extension-ace). Tools may use prefixes like
    mcp_<vendor>_*
    . When the agent has access to such tools, include them in status and tag as source (extension).
  • MCP服务器:Cursor中已配置的Model Context Protocol服务器(例如github、atlassian、ado、asdlc)。
  • 用户级MCP配置
    ~/.cursor/mcp.json
    (macOS/Linux)或
    %USERPROFILE%\.cursor\mcp.json
    (Windows)中的
    mcpServers
    段,也可通过Cursor设置→功能→Model Context Protocol进行配置。
  • 项目级MCP配置:工作区根目录下可选的
    .cursor/mcp.json
    中的
    mcpServers
    段。当该文件存在时,Cursor可能会合并或覆盖用户级配置;需从此文件中发现服务器,以确保状态反映项目配置的服务器。若文件缺失,可跳过(不属于错误)。
  • 扩展暴露的MCP:由VS Code/Cursor扩展提供的MCP服务器(例如Agent Context Explorer / extension-ace)。工具可能使用
    mcp_<vendor>_*
    这类前缀。当Agent可访问此类工具时,需将其纳入状态检查,并标记来源为**(extension)**。

Prerequisites

前提条件

  • None required. Run anytime to check status. If no MCP servers are configured, the command reports that.
  • MCP Tool Usage Standards: MCP tool usage should follow best practices (check schema files, validate parameters, handle errors gracefully). These standards are documented in AGENTS.md §3 Operational Boundaries if AGENTS.md exists, but apply universally regardless.
  • 无特殊要求。可随时运行以检查状态。若未配置任何MCP服务器,命令会相应报告。
  • MCP工具使用标准:MCP工具的使用应遵循最佳实践(检查模式文件、验证参数、优雅处理错误)。这些标准记录在AGENTS.md第3节“操作边界”中(若AGENTS.md存在),无论该文件是否存在,标准均通用。

Purpose

用途

MCP servers can disconnect or lose authentication after periods of inactivity. Use this command to verify all integrations are ready before starting work.
MCP服务器可能会在闲置一段时间后断开连接或丢失认证。在开始工作前,使用此命令验证所有集成是否就绪。

Steps

步骤

  1. Discover configured MCP servers (user, project, extension)
    • User-level: Read
      ~/.cursor/mcp.json
      (macOS/Linux) or
      %USERPROFILE%\.cursor\mcp.json
      (Windows). Extract
      mcpServers
      keys. Tag each server as source (user). If the file is not accessible, try common server names:
      github
      ,
      atlassian
      ,
      ado
      ,
      asdlc
      ,
      user-github
      ,
      user-atlassian
      ,
      user-ado
      ,
      user-asdlc
      .
    • Project-level: If workspace root is available, read
      .cursor/mcp.json
      at workspace root. If the file exists, extract
      mcpServers
      keys and tag each as (project). If a server name already appeared from user config, record both sources (e.g. "user, project") or report once with combined source. If the file is missing, skip (not an error).
    • Extension-exposed: When the agent has access to MCP tools from extensions (e.g. Agent Context Explorer; tool names use a prefix pattern such as
      mcp_<vendor>_<suffix>
      ), treat each distinct extension server as one entry. Call one read-only tool per known extension server (e.g. extension-ace: list rules or list commands) and tag as (extension). If no extension tools are available, skip (not an error).
    • Note: Server names in config may differ from tool prefixes (e.g. config has
      github
      but tools use
      mcp_github_*
      ).
  2. Test each server connection
    • For each discovered server (from any source), attempt to call one lightweight read-only tool to verify connectivity and authentication. Record the server's source (user / project / extension) with the result.
    • Use common tool patterns for known server types:
      • github / user-github → Try
        list_commits
        (may require owner/repo args) or
        list_branches
      • atlassian / user-atlassian → Try
        getAccessibleAtlassianResources
        or
        atlassianUserInfo
      • ado / user-ado → Try
        core_list_projects
      • asdlc / user-asdlc → Try
        list_articles
    • For unknown server types, try common tool names like
      list_*
      ,
      get_*
      , or
      *_info
      with minimal or empty args.
    • Record success or failure for each server. Handle "server not found" vs "authentication error" vs "tool not found" differently.
  3. Report status
    • Display results in a clear, formatted list. Group or label by source (User config, Project config, Extensions) so users see where each server comes from.
    • Show server name, authentication status, and source (e.g. "(user)", "(project)", "(extension)").
    • For disconnected servers, provide reconnection instructions (Cursor Settings → Features → Model Context Protocol).
  1. 发现已配置的MCP服务器(用户级、项目级、扩展级)
    • 用户级:读取
      ~/.cursor/mcp.json
      (macOS/Linux)或
      %USERPROFILE%\.cursor\mcp.json
      (Windows)。提取
      mcpServers
      的键。将每个服务器标记为来源**(user)**。若无法访问该文件,尝试常见服务器名称:
      github
      atlassian
      ado
      asdlc
      user-github
      user-atlassian
      user-ado
      user-asdlc
    • 项目级:若工作区根目录可用,读取根目录下的
      .cursor/mcp.json
      。若文件存在,提取
      mcpServers
      的键并标记为**(project)**。若服务器名称已在用户配置中出现,记录两个来源(例如“user, project”)或合并来源后报告一次。若文件缺失,可跳过(不属于错误)。
    • 扩展级:当Agent可访问来自扩展的MCP工具时(例如Agent Context Explorer;工具名称使用
      mcp_<vendor>_<suffix>
      这类前缀模式),将每个不同的扩展服务器视为一个条目。为每个已知的扩展服务器调用一个只读工具(例如extension-ace:list rules或list commands),并标记为**(extension)**。若无可用的扩展工具,可跳过(不属于错误)。
    • 注意:配置中的服务器名称可能与工具前缀不同(例如配置中有
      github
      ,但工具使用
      mcp_github_*
      )。
  2. 测试每个服务器的连接
    • 对于每个发现的服务器(来自任意来源),尝试调用一个轻量级只读工具以验证连通性和认证状态。记录服务器的来源(user / project / extension)及结果。
    • 针对已知服务器类型使用通用工具模式:
      • github / user-github → 尝试
        list_commits
        (可能需要owner/repo参数)或
        list_branches
      • atlassian / user-atlassian → 尝试
        getAccessibleAtlassianResources
        atlassianUserInfo
      • ado / user-ado → 尝试
        core_list_projects
      • asdlc / user-asdlc → 尝试
        list_articles
    • 对于未知服务器类型,尝试通用工具名称,如
      list_*
      get_*
      *_info
      ,并使用最少或空参数。
    • 记录每个服务器的成功或失败状态。需区分“服务器未找到”、“认证错误”和“工具未找到”等不同情况。
  3. 报告状态
    • 以清晰的格式化列表展示结果。按来源(用户配置、项目配置、扩展)分组或标记,让用户了解每个服务器的来源。
    • 显示服务器名称、认证状态和来源(例如“(user)”、“(project)”、“(extension)”)。
    • 对于断开连接的服务器,提供重新连接的说明(Cursor设置→功能→Model Context Protocol)。

Tools

工具

Filesystem

文件系统

  • Read user MCP configuration:
    ~/.cursor/mcp.json
    (macOS/Linux) or
    %USERPROFILE%\.cursor\mcp.json
    (Windows). Parse JSON to extract
    mcpServers
    keys.
  • Read project MCP configuration:
    .cursor/mcp.json
    at workspace root (if present). Parse JSON to extract
    mcpServers
    keys. If file is missing, skip.
  • 读取用户MCP配置:
    ~/.cursor/mcp.json
    (macOS/Linux)或
    %USERPROFILE%\.cursor\mcp.json
    (Windows)。解析JSON以提取
    mcpServers
    的键。
  • 读取项目MCP配置:工作区根目录下的
    .cursor/mcp.json
    (若存在)。解析JSON以提取
    mcpServers
    的键。若文件缺失,可跳过。

MCP (per discovered server)

MCP(按发现的服务器)

  • github / user-github → Try
    list_commits
    ,
    list_branches
    , or other read-only tools
  • atlassian / user-atlassian → Try
    getAccessibleAtlassianResources
    ,
    atlassianUserInfo
  • ado / user-ado → Try
    core_list_projects
  • asdlc / user-asdlc → Try
    list_articles
  • Extension-exposed (e.g. extension-ace): Try a read-only tool such as list rules or list commands (no args or minimal args). Tag result as (extension).
  • Other servers: Try common read-only tool patterns (
    list_*
    ,
    get_*
    ,
    *_info
    ) with minimal or empty args
  • Note: Tool names may be prefixed with
    mcp_<server>_
    or
    mcp_user-<server>_
    depending on configuration. Record source (user / project / extension) with each result.
  • github / user-github → 尝试
    list_commits
    list_branches
    或其他只读工具
  • atlassian / user-atlassian → 尝试
    getAccessibleAtlassianResources
    atlassianUserInfo
  • ado / user-ado → 尝试
    core_list_projects
  • asdlc / user-asdlc → 尝试
    list_articles
  • 扩展暴露的(例如extension-ace):尝试只读工具,如list rules或list commands(无参数或最少参数)。将结果标记为(extension)。
  • 其他服务器:尝试通用只读工具模式(
    list_*
    get_*
    *_info
    ),并使用最少或空参数
  • 注意:工具名称可能会根据配置添加
    mcp_<server>_
    mcp_user-<server>_
    前缀。需为每个结果记录来源(user / project / extension)。

Expected Output

预期输出

All Connected (with sources)

全部已连接(含来源)

🔌 MCP Server Status

User config:
  ✅ atlassian - Connected (user)
  ✅ github - Connected (user)

Project config:
  (none)

Extensions:
  ✅ extension-ace - Connected (extension)

All systems operational!
(When only user-level config exists and no extensions, output may show no "Project config" or "Extensions" sections, and servers with "(user)" or no source label for backward compatibility.)
🔌 MCP Server Status

User config:
  ✅ atlassian - Connected (user)
  ✅ github - Connected (user)

Project config:
  (none)

Extensions:
  ✅ extension-ace - Connected (extension)

All systems operational!
(当仅存在用户级配置且无扩展时,输出可能不会显示“Project config”或“Extensions”部分,服务器会标记“(user)”或不显示来源标签以保持向后兼容性。)

Some Disconnected

部分断开连接

🔌 MCP Server Status

User config:
  ❌ atlassian - Needs authentication (user)
  ✅ github - Connected (user)

⚠️ Action Required:
1. Open Cursor Settings (Cmd+, or Ctrl+,)
2. Navigate to: Tools & MCP
3. Click "Connect" next to: atlassian
4. Run /mcp-status again to verify
🔌 MCP Server Status

User config:
  ❌ atlassian - Needs authentication (user)
  ✅ github - Connected (user)

⚠️ Action Required:
1. Open Cursor Settings (Cmd+, or Ctrl+,)
2. Navigate to: Tools & MCP
3. Click "Connect" next to: atlassian
4. Run /mcp-status again to verify

When to Use

使用场景

  • Start of day - Verify connections before beginning work
  • After inactivity - MCP servers may disconnect after timeout
  • Before critical commands - Ensure integrations are ready for commands like
    /start-task
    ,
    /create-task
    , etc.
  • Troubleshooting - When other commands fail with authentication errors
  • 每日开始工作时 - 开始工作前验证连接状态
  • 闲置后 - MCP服务器可能会超时断开连接
  • 执行关键命令前 - 确保集成已就绪,以便执行
    /start-task
    /create-task
    等命令
  • 故障排查时 - 当其他命令因认证错误失败时

Error Handling

错误处理

If unable to discover MCP servers:
  • If user config file is not accessible, try common server names as fallback
  • If project
    .cursor/mcp.json
    is missing, skip (not an error)
  • If no extension tools are available, skip extension section (not an error)
  • If no servers respond, report that no MCP servers are configured or accessible
  • Provide link to MCP setup documentation (e.g.,
    docs/reference/mcp-setup.md
    if present, or general MCP setup instructions)
If a server test fails:
  • Server not found: Server name doesn't exist in MCP configuration
  • Authentication error: Server exists but needs reconnection/authentication
  • Tool not found: Server exists but the tested tool isn't available (try a different tool)
  • Network/connection error: Server unreachable or connection failed
  • Provide specific guidance for each failure type, especially authentication errors which require user action
若无法发现MCP服务器:
  • 若无法访问用户配置文件,尝试使用常见服务器名称作为备选
  • 若项目
    .cursor/mcp.json
    缺失,可跳过(不属于错误)
  • 若无可用的扩展工具,可跳过扩展部分(不属于错误)
  • 若没有服务器响应,报告未配置或无法访问任何MCP服务器
  • 提供MCP设置文档链接(例如若存在
    docs/reference/mcp-setup.md
    ,或通用MCP设置说明)
若服务器测试失败:
  • 服务器未找到:服务器名称在MCP配置中不存在
  • 认证错误:服务器存在但需要重新连接/认证
  • 工具未找到:服务器存在但测试的工具不可用(尝试其他工具)
  • 网络/连接错误:服务器无法访问或连接失败
  • 为每种失败类型提供具体指导,尤其是需要用户操作的认证错误

Notes

注意事项

  • This command performs read-only operations only
  • No data is modified or created
  • Safe to run at any time
  • Does not require any parameters or arguments
  • 此命令仅执行只读操作
  • 不会修改或创建任何数据
  • 可随时安全运行
  • 不需要任何参数或参数

Guidance

指导说明

Role

角色

Act as a developer checking that MCP integrations are ready before running commands that depend on them.
作为一名开发者,在运行依赖MCP集成的命令前,检查MCP集成是否就绪。

Instruction

指令

Read the MCP configuration file (
~/.cursor/mcp.json
or Windows equivalent) to discover configured servers. For each server, attempt to call a lightweight read-only MCP tool to verify connectivity and authentication. Report connected / disconnected status; for disconnected servers, provide reconnection steps (Cursor Settings → Features → Model Context Protocol).
读取MCP配置文件(
~/.cursor/mcp.json
或Windows等效文件)以发现已配置的服务器。对于每个服务器,尝试调用一个轻量级只读MCP工具以验证连通性和认证状态。报告已连接/断开连接状态;对于断开连接的服务器,提供重新连接步骤(Cursor设置→功能→Model Context Protocol)。

Context

背景

  • MCP servers can disconnect or lose auth after inactivity. Use at start of day, after inactivity, or before critical commands.
  • Discover servers from three sources: (1) user-level
    mcp.json
    , (2) project-level
    .cursor/mcp.json
    at workspace root when present, (3) extension-exposed MCPs when the agent has access to their tools. Report each server with its source (user / project / extension).
  • If user config file is not accessible, try common server names and test connectivity. Missing project or extension config is not an error.
  • ASDLC patterns: Context Gates
  • ASDLC pillars: Quality Control (pre-flight validation for other commands)
  • MCP服务器可能会在闲置后断开连接或丢失认证。在每日开始工作时、闲置后或执行关键命令前使用此工具。
  • 从三个来源发现服务器:(1) 用户级
    mcp.json
    ,(2) 工作区根目录下的项目级
    .cursor/mcp.json
    (若存在),(3) 当Agent可访问其工具时的扩展暴露MCP。需报告每个服务器及其来源(user / project / extension)。
  • 若无法访问用户配置文件,尝试常见服务器名称并测试连通性。缺失项目或扩展配置不属于错误。
  • ASDLC模式Context Gates
  • ASDLC支柱质量控制(为其他命令提供预飞验证)

Examples

示例

ASDLC: Context Gates — MCP checks act as an input gate before running commands that depend on them.
ASDLCContext Gates — MCP检查作为运行依赖命令前的输入门控。

Constraints

约束条件

Rules (Must Follow):
  1. Operational Standards Compliance: This command follows operational standards (documented in AGENTS.md if present, but apply universally):
    • MCP Tool Usage: Check schema files, validate parameters, handle errors gracefully
    • AGENTS.md Optional: Commands work without AGENTS.md. Standards apply regardless of whether AGENTS.md exists.
    • See AGENTS.md §3 Operational Boundaries (if present) for detailed standards
  2. Read-only Operations: This command performs read-only operations only; no data is modified or created.
  3. Error Handling: If a server test fails, distinguish authentication errors (needs reconnect) from other errors and provide specific guidance.
规则(必须遵守)
  1. 操作标准合规:此命令遵循操作标准(若AGENTS.md存在则记录在其中,否则标准通用):
    • MCP工具使用:检查模式文件、验证参数、优雅处理错误
    • AGENTS.md可选:命令可在无AGENTS.md的情况下运行。无论该文件是否存在,标准均适用。
    • 若AGENTS.md存在,可查看第3节“操作边界”获取详细标准
  2. 只读操作:此命令仅执行只读操作;不会修改或创建任何数据。
  3. 错误处理:若服务器测试失败,需区分认证错误(需要重新连接)与其他错误,并提供具体指导。