warp icon indicating copy to clipboard operation
warp copied to clipboard

Add edit and open config actions for file-based MCP servers

Open vkodithala opened this issue 7 months ago • 4 comments

Summary

File-based MCP server cards should provide a working way to open the defining config file from Warp's MCP settings. Spawned file-based MCP servers should include an edit button, and the Edit config/Open config action shown for MCP error states should open the file that defines the server instead of no-oping.

Problem

Project rules already provide an Open file action that opens the rule file in Warp's editor. File-based MCP servers would benefit from the same affordance because their source of truth is also a local configuration file.

Today, file-based MCP cards are inconsistent:

  • Unlike templatable servers, spawned file-based MCP servers do not expose an edit button while active.
  • When a file-based MCP server is errored, the card can render an Edit config/Open config style action, but that action does not open the defining config file.

This makes it harder to recover from broken file-based MCP configuration. The user can see the errored server in MCP settings, but cannot jump directly to the .mcp.json or provider config file that needs to be edited.

Expected behavior

  • A spawned file-based MCP server card includes an edit action when the server is active/running, consistent with other editable MCP server cards.
  • The edit action opens the local config file that defines that file-based MCP server in Warp's editor.
  • The Edit config/Open config action rendered on file-based MCP error states uses the same target and opens the defining config file instead of doing nothing.
  • The target file can be derived from FileBasedMCPManager using the server's tracked root path and provider-specific relative config path.
  • The behavior should mirror the project-rules Open file experience where possible: clicking the action opens an editor pane for the relevant local file.

Actual behavior

  • Spawned file-based MCP server cards suppress the edit icon.
  • Errored file-based MCP cards can show an Edit config/Open config text action, but the action is not wired to open the defining file.
  • Users must manually locate the config path to fix a broken file-based MCP server.

Reproduction steps or desired workflow

  1. Configure a file-based MCP server through a Warp-supported config file, such as a project or global .mcp.json.
  2. Start/spawn the file-based MCP server so it appears in the installed/running section of MCP settings.
  3. Observe that the active file-based MCP card does not provide a working edit affordance for its config file.
  4. Put the server into an error state, such as by making the config invalid or causing startup failure.
  5. Click the Edit config/Open config action on the errored card.

Desired workflow: both the active-card edit action and the error-card config action open the file that defines the server in Warp's editor.

Artifacts

None attached.

Warp version

v0.2026.04.30.08.57.dev_00

Operating system

macOS 26.4.1 (build 25E253)

Possible source references

  • app/src/workspace/view.rs: handle_ai_fact_view_event handles AIFactViewEvent::OpenFile by opening a local file in Warp's editor; this is the project-rules precedent for opening a backing config/rules file.
  • app/src/settings_view/mcp_servers/list_page.rs: create_file_based_spawned_card currently comments that file-based edit/share controls are omitted and sets show_edit_config_icon_button: false for spawned file-based servers.
  • app/src/settings_view/mcp_servers/server_card.rs: ServerCardStatus::Error renders show_edit_config_text_button: true, and both icon/text edit actions emit ServerCardEvent::Edit, which needs a file-backed path for file-based MCPs.
  • app/src/ai/mcp/file_based_manager.rs: file_based_servers_by_root tracks the root PathBuf by provider for each file-based MCP server, and directory_paths_for_installation_and_provider exposes the roots associated with a file-based installation; this data can identify the defining config file when combined with the provider's relative config path.

vkodithala avatar May 02 '26 02:05 vkodithala

@vkodithala

Here's what I found while triaging this issue:

Code inspection confirms this is currently not wired for file-based MCP servers, so the report looks actionable without more details from the reporter.

Maintainer details

I concluded that file-based MCP server cards have edit/open-config affordances that are either suppressed or routed to an unimplemented file-based edit path instead of opening the backing config file..

Triage summary

This looks like an actionable MCP settings bug rather than a request needing more reporter detail. The file-based MCP card and edit flow currently do not provide a working route from a detected/spawned file-based server back to its source config file.

Evidence

  • app/src/settings_view/mcp_servers/list_page.rs creates spawned file-based cards with show_edit_config_icon_button: false, overriding the edit affordance that normal installed/running server statuses would otherwise show.
  • app/src/settings_view/mcp_servers/server_card.rs renders Edit config for error cards and emits ServerCardEvent::Edit for both the icon and text edit actions.
  • app/src/settings_view/mcp_servers_page.rs handles list-page Edit by navigating to the MCP edit page for the card item.
  • app/src/settings_view/mcp_servers/edit_page.rs treats ServerCardItemId::FileBasedMCP(_) as unimplemented in both set_mcp_server and Save, so the error-card action does not open the backing config file.
  • app/src/ai/mcp/file_based_manager.rs already tracks file-based installations by root/provider and exposes directory_paths_for_installation_and_provider; app/src/ai/mcp/mod.rs defines provider-specific home/project config paths that could be combined with those roots to locate the config file.
  • app/src/workspace/view.rs shows the project-rules precedent for opening a local file in Warp's editor via AIFactViewEvent::OpenFile.

Suggested implementation direction

Add a file-backed edit path for FileBasedMCP cards that derives the provider config path from the tracked installation root/provider, enables the edit affordance for spawned file-based cards when a target can be resolved, and opens the local config file in the editor rather than routing to the generic MCP JSON edit page. Ambiguous multi-provider/multi-root cases may need deterministic selection or a small chooser, but the current tracked data appears sufficient for the common global/project config cases.

This is my automated analysis and may be incorrect. A maintainer will verify the details.

Powered by Oz

warp-for-oss[bot] avatar May 02 '26 02:05 warp-for-oss[bot]

This issue has been labeled ready-to-spec and is open for contributions in the form of a product or technical spec. If you'd like to draft one, feel free to open a pull request with the spec under specs/. You can also comment @oz-agent on this issue to have the bot draft the spec automatically.

warp-for-oss[bot] avatar May 02 '26 03:05 warp-for-oss[bot]

@oz-agent Cool, let's go ahead and spec out this change. Explain the necessary code paths to edit here.

vkodithala avatar May 02 '26 03:05 vkodithala

@vkodithala

I'm starting work on product and tech specs for this issue.

You can view the conversation on Warp.

I created a new spec PR for this issue.

Preview generated specs:

Next steps:

  • Review the spec PR and confirm that the proposed approach looks right.
  • Request or make any needed spec updates before moving on to implementation.

Powered by Oz

warp-for-oss[bot] avatar May 02 '26 03:05 warp-for-oss[bot]