Skip to content

Bug: Failed manual connection leaves un-modifiable ghost server entry #1914

Description

@brandonja991

Summary

When manually adding an MCP server and the connection attempt fails, MCP Inspector still creates a server entry that cannot be edited or removed through normal means. The failure is also silent (no visible error/toast). Later, if a user tries to import a server with the same name from a client config file, the import fails with an "already exists" error, even though the original entry never successfully connected and isn't visibly manageable.

Environment

  • Tool: MCP Inspector v2
  • Affected transports: streamable-http, sse (manual configuration flow)

Steps to Reproduce

  1. MCP Inspector > Add Server > Add manually.
  2. Set a server name.
  3. Select transport streamable-http or sse.
  4. Enter a URL that will fail to connect (in my case, the server returned HTTP 500 because required headers/cookies could not be set — see companion header/cookie ticket).
  5. Submit. Observe: the failure is silent — no error message or indication that the connection failed.
  6. Now go to MCP Server > Add Server > Import from client config > From file...
  7. Select a valid client config file that contains a server entry with the same name used in step 2.
  8. Observe: an error stating the MCP server already exists.

Expected Behavior

  • A failed manual connection attempt should surface a clear, visible error to the user (not fail silently).
  • A server entry that failed to connect should either not persist, or should be visible/editable/removable in the UI so the name can be reused or the entry fixed.
  • Importing a server from client config should not be blocked by a failed/ghost entry that the user cannot see or manage.

Actual Behavior

  • The failed manual connection attempt produces no visible error (silent failure).
  • A "ghost" entry is created under the hood for that server name that does not appear to be editable/removable through the normal UI.
  • Attempting to import a client-config server with the same name later fails with a duplicate-name/"already exists" error, with no clear path to resolve it (e.g., rename, delete the ghost entry, or overwrite).

Suggested Fix

  1. Surface connection failures to the user immediately (toast/inline error) instead of failing silently.
  2. Do not persist a server entry if the connection attempt fails, OR make any persisted-but-failed entries visible and manageable (edit/delete) in the server list.
  3. When importing from client config and a name collision occurs, provide the user an option to overwrite/replace the existing (especially failed/unconnected) entry rather than only blocking with an error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions