# Atlas error: Failed to toggle MCP and Failed to refresh MCP status: no data returned

> Confirm the Atlas server is still running behind the TUI, then re-open the MCP dialog to force a fresh status fetch.

Atlas logs Failed to toggle MCP: <error>, or Failed to refresh MCP status: no data returned, when dialog-mcp.tsx calls the server API to enable or disable an MCP server and the call either throws or returns no data, which leaves the previous status on screen and the server row unchanged. Confirm the Atlas server is still running behind the TUI, because a dropped connection produces exactly this, then re-open the MCP dialog to force a fresh status fetch. Check that the server entry still exists in config, since toggling a removed server returns no data, and restart Atlas if the dialog stays stale after a reconnect.

## Symptom

The Atlas MCP dialog logs: Failed to toggle MCP: <error>, or: Failed to refresh MCP status: no data returned, and the server row does not change state. The toggle appears to do nothing and the old status stays on screen.

## Cause

dialog-mcp.tsx calls the server API to enable or disable an MCP server and logs an error when the call throws or returns no data, leaving the previous status on screen. A dropped connection to the Atlas server behind the TUI, or a server entry that has been removed from config, both produce this.

## Fix

1. Confirm the Atlas server is still running behind the TUI. A dropped connection produces exactly Failed to toggle MCP: <error>.
2. Re-open the MCP dialog to force a fresh status fetch, so the row reflects the real server state rather than the stale status left on screen.
3. Check the server entry still exists in config. Toggling a removed server returns no data, which surfaces as Failed to refresh MCP status: no data returned.
4. Restart Atlas if the dialog stays stale after a reconnect, since the dialog will keep showing the previous status until a fetch succeeds.
5. Re-open the MCP dialog once more and confirm the server row now changes state when toggled.

## Why does Atlas log Failed to toggle MCP

Atlas logs Failed to toggle MCP: <error> because dialog-mcp.tsx calls the server API to enable or disable a Model Context Protocol server, and that call threw. As of 2026, the toggle is a real server operation rather than a local UI flag, so a failed call leaves the previous status on screen.

The Atlas MCP dialog does not maintain its own idea of which servers are on. Every toggle is a round trip to the Atlas server behind the TUI, and the row on screen reflects what that server last reported. When the API call throws, dialog-mcp.tsx logs the failure and leaves the previous status on screen rather than optimistically flipping the row, which is why the toggle looks like it did nothing. The <error> in the message is the underlying failure, so read it before assuming the MCP server itself is at fault.

## What Failed to refresh MCP status: no data returned means

Failed to refresh MCP status: no data returned is 1 of the 2 errors the Atlas MCP dialog logs. It means dialog-mcp.tsx asked the server API for status and got nothing back, so the previous status stays on screen and the server row is stale rather than wrong in a way Atlas can correct.

The most common cause is a server entry that no longer exists. Check the server entry still exists in config, because toggling a removed server returns no data. If you edited the Atlas config to drop an MCP server while the dialog was open, the dialog is still holding a row for a server the backend no longer knows about. Removing the row from your view means re-opening the MCP dialog so it fetches fresh status instead of rendering what it fetched before the config changed.

## How to confirm the Atlas server behind the TUI is running

Confirm the Atlas server is still running behind the TUI, because a dropped connection produces exactly Failed to toggle MCP: <error>. Atlas is a terminal-native TUI rendered with SolidJS through the OpenTUI renderer, and in 2026 the MCP dialog talks to a separate server process. If that process is gone, every MCP call fails the same way.

A dropped connection is indistinguishable, from inside the MCP dialog, from an MCP server that refuses to start. Both produce a logged error and an unchanged row. Rule out the connection first because it is the cheaper check and it explains other symptoms at the same time: if the Atlas server behind the TUI is down, other server-backed operations will also be failing, not just the MCP toggle. If the connection is healthy and only MCP calls fail, the problem is narrower and worth investigating on the MCP side.

## How to force the Atlas MCP dialog to refresh

Re-open the MCP dialog in Atlas to force a fresh status fetch, and restart Atlas if the dialog is still stale after that 1 retry. dialog-mcp.tsx leaves the previous status on screen when a call throws or returns no data, so re-opening is what triggers a new fetch against the Atlas server.

Close the MCP dialog fully and open it again rather than toggling repeatedly, which just repeats the failing call and adds more Failed to toggle MCP lines to the log. If the reopened dialog still shows the old status after the underlying connection is healthy again, restart Atlas. A restart re-establishes the connection and rebuilds the dialog state from what the server actually reports, which is the last resort but a reliable one.

## How to verify the MCP toggle worked

Verify an Atlas MCP toggle by watching the server row change state with 0 Failed to toggle MCP lines logged. dialog-mcp.tsx leaves the previous status on screen only when the call throws or returns no data, so a row that actually flips means the server API accepted the change.

A working toggle also has a downstream signal: Atlas connects to Model Context Protocol servers and exposes their tools to the agent, so an enabled server's tools become available to the agent. Every Atlas tool call is permission-gated against allow, ask, and deny rules before it runs, so an MCP tool appearing in the agent's reach still respects your permission configuration. If the row flips but no tools appear, the toggle succeeded and the problem has moved to the MCP server itself.

## FAQ

### Why does Atlas say Failed to toggle MCP?

dialog-mcp.tsx called the server API to enable or disable an MCP server and the call threw. The most common cause is a dropped connection to the Atlas server running behind the TUI.

### What does Failed to refresh MCP status: no data returned mean?

The Atlas MCP dialog asked for status and got nothing back. Check the server entry still exists in config, because toggling a removed server returns no data and leaves the previous status on screen.

### Why does my MCP server row not change state in Atlas?

dialog-mcp.tsx logs the error and leaves the previous status on screen when the call throws or returns no data, rather than optimistically flipping the row. The row is stale, not incorrect.

### How do I refresh MCP status in the Atlas TUI?

Re-open the MCP dialog to force a fresh status fetch. Toggling repeatedly just repeats the failing call, and the dialog only fetches new status when it is opened.

### Do I need to restart Atlas to fix a stuck MCP dialog?

Only if the dialog stays stale after a reconnect. Confirm the Atlas server behind the TUI is running and re-open the MCP dialog first, and restart Atlas if the status still does not update.

### Can I toggle an MCP server that I removed from the Atlas config?

No. Toggling a removed server returns no data, which Atlas logs as Failed to refresh MCP status: no data returned. Re-open the MCP dialog so it fetches the current server list.

### Does a failed MCP toggle affect Atlas tool permissions?

No. Every Atlas tool call is permission-gated against allow, ask, and deny rules before it runs, and a failed toggle simply leaves the MCP server in its previous state without changing permissions.

---

Canonical HTML: https://runatlas.sh/resources/troubleshooting/tui-mcp-toggle-failed
Source of truth: aeo_pages row `/resources/troubleshooting/tui-mcp-toggle-failed` (segment: Troubleshooting) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
