Skip to content

astra mcp list (default project scope) reports no servers while astra chat loads user-level ~/.astra/mcp.json — no effective/merged MCP view #622

Description

@guolvlin-cn

Summary

astra mcp list (default scope project) reports "No MCP servers configured." while astra chat loads and connects the user-level ~/.astra/mcp.json servers in the same session. The CLI default hides user-level config, and there is no command that shows the effective/merged set of MCP servers that a chat session actually uses — so users configuring user-level MCP servers get a misleading "nothing configured" from the CLI while chat silently connects them.

Environment

Reproduction

1. Build + deps (same as #621)

git clone https://github.com/guolvlin-cn/astra   # or matrixorigin/astra @ 27c0c9e4
make build
make dev-init && make dev-deps-up && make dev-api-start
astra admin register --username <u> --password <p> --email <e>

2. Configure user-level MCP servers (the path astra chat honors)

Create ~/.astra/mcp.json:

{
  "mcpServers": {
    "memoria": {
      "type": "stdio",
      "command": "memoria",
      "args": ["mcp", "--tool", "astra", "--api-url", "https://api.thememoria.ai", "--token", "<TOKEN>"]
    },
    "MiniMax": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--with", "mcp<2", "minimax-coding-plan-mcp", "-y"],
      "env": { "MINIMAX_API_KEY": "<KEY>", "MINIMAX_API_HOST": "https://api.minimaxi.com" }
    },
    "playwright": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@playwright/mcp@latest"],
      "env": {}
    }
  }
}

3. Run the CLI listing from a project dir with no project-level mcp.json

cd /Users/guolvlin/astra-workspace
astra mcp list                 # default scope = project
# → "No MCP servers configured."
# → "Use astra mcp add to add a server."

4. Same command with user scope

astra mcp list -s user
#
#   Name      Type   Command / URL
#   MiniMax   stdio  uvx --with mcp<2 minimax-coding-plan-mcp -y
#   memoria   stdio  memoria mcp --tool astra --api-url https://api.thememoria.ai --token sk-…
#   playwright stdio npx -y @playwright/mcp@latest
#   Config: /Users/guolvlin/.astra/mcp.json

5. Meanwhile, astra chat loads the user-level servers

astra chat -m "hello" --permission-mode bypass --quiet
# startup log:
#   3 MCP servers connected: playwright (24) · MiniMax (2) · memoria (23)

Actual behavior

  • astra mcp list with the default project scope reports no servers, even though a user-level ~/.astra/mcp.json exists and is actively used by astra chat.
  • There is no single command that shows the effective/merged set of servers a chat session will load (project + skill manifests + user).
  • The TUI slash command /mcp list inside a chat session does show the connected set (from McpClientManager::all_tools()), so the two surfaces disagree.

Expected behavior

One of:

  • astra mcp list should surface user-level config by default (or clearly indicate scope + hint -s user), and/or
  • Provide a way to show the effective merged set that a session will load (e.g. astra mcp list --effective, or a note when user-level servers exist).

Root cause

  • astra mcp list / add default to scope project (cli_args): -s, --scope <SCOPE> Config scope: project or user [default: project].
  • astra chat loads both project and user config: manifest_loader::collect_mcp_server_configs collects project .astra/mcp.json → skill manifests → ~/.astra/mcp.json (see crates/astra-cli/src/manifest_loader.rs).
  • So a user-level-only setup is invisible to the default CLI listing, and no merged/effective view exists.
  • crates/astra-cli/src/cli/mcp_config.rs (mcp_json_path_for_scope) resolves project vs user paths, but each listing command only shows one scope at a time.

Impact

Users following the user-level ~/.astra/mcp.json configuration path (which astra chat honors) get a misleading "No MCP servers configured" from astra mcp list, and cannot inspect the effective MCP setup without knowing to pass -s user. This makes debugging MCP configs confusing.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions