Skip to content

[Bug] MCP servers imported from .claude/.codex are enabled even when their command is missing #237

Open

Description

@Hylouis233

What happened?

After importing MCP servers from .claude/.codex configs, every step launch prints one warning per broken server. From a real user config: 8x Warning: MCP server '<uuid>' could not start: '/Users/lh/Mounts/chitin/.../.venv/bin/python' is not installed or not on PATH. Install it, then restart Step. plus MCP error -32001: Error: MCP connection closed for a uv --directory server whose directory is missing.

Steps to reproduce

  1. Have a .claude/.codex MCP server whose command no longer exists (moved venv, missing directory).
  2. Import the server via mcp-import and start step; the warning repeats on every launch.

Root cause hint: mcp-import writes selected servers into config.toml [mcp_servers.*] and enabled defaults to true (packages/coding-agent/src/step/mcp.ts), with no check that the command exists; warnings are emitted per launch at packages/coding-agent/src/step/mcp.ts.

Expected behavior

Validate command existence at import time and/or startup: import missing-command servers as disabled, or warn once with a way to mute, instead of warning on every launch.

Version

step 0.1.3, macOS.

Activity

  1. luoxiaoyang-ccc commented on Oct 15, 2026

    @luoxiaoyang-ccc
    Collaborator

    Thanks for reporting this. We will follow up on MCP import validation and repeated startup warnings. The details you’ve provided are sufficient for us to investigate!

  2. Hylouis233 commented on Oct 18, 2026

    @Hylouis233
    ContributorAuthor

    Fix branch: main...Hylouis233:Step-Code:fix/mcp-import-missing-command (85847b2)

    Refs #237

    Problem

    mcp-import wrote every selected server into config.toml with enabled defaulting to true and no check that the server can start. A server whose executable moved (e.g. a deleted venv) or whose working directory no longer exists then printed a "could not start" warning on every step launch. A missing cwd was also reported as "not installed or not on PATH", because spawn raises the same ENOENT for both.

    Change

    • Import: a stdio server whose executable is not on PATH (PATHEXT on Windows) or whose working directory does not exist is written with enabled = false; the rest of its declaration is unchanged. Startup already skips disabled servers, so the per-launch warning goes away.
    • The import view and the import summary say which servers were disabled, why, and how to re-enable them.
    • isSameServerConfig ignores enabled, so re-importing does not create a duplicate of a disabled entry.
    • Startup: when a server fails because its working directory is missing, the message names that directory instead of suggesting the command is not installed. Other startup failures are reported as before.
    • Out of scope: an enable/disable command for servers that were already imported.

    Verification

    • Based on main b5dbed9; 2 commits.
    • 6 new tests: without the fix, 3 import tests and the cwd test fail; with it, all 122 tests across the 5 MCP test files pass.
    • coding-agent full suite: 4819 tests, 1 failure (2791-fswatch-error-crash, needs the pi-tui dist built), the same as on main.
    • pnpm check and tsgo --noEmit pass.
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