[Bug] MCP Servers crash with "executable file not found in $PATH" when Antigravity is launched via macOS GUI

Description

The built-in MCP server orchestrator fails to inherit the user’s local shell environment variables ($PATH) when the Antigravity IDE is launched via the macOS graphical interface (Dock/Spotlight). This causes any MCP server relying on standard user-level CLI runtimes (like bun, npx, dart, firebase) to immediately crash with a Golang-native execution error.

This issue is widespread and affects multiple core MCP plugins simultaneously. It stems from a race condition or isolation flaw where the language_server (Golang backend) is spawned using the sterile launchd environment (/usr/bin:/bin:/usr/sbin:/sbin) and attempts to execute MCP commands before the Node.js Extension Host finishes sourcing the user’s ~/.zshrc or ~/.bash_profile.

Steps to Reproduce

  1. Install any CLI tool via user-space package managers (e.g., bun in ~/.bun/bin, or node/npx via NVM/fnm).
  2. Ensure the tool’s path is correctly exported in the user’s ~/.zshrc.
  3. Configure ~/.gemini/antigravity/mcp_config.json to run an MCP server using a relative command string (e.g., "command": "bun", "command": "npx", or "command": "dart").
  4. Fully quit the IDE application (Cmd + Q).
  5. Launch the Antigravity app by clicking its icon in the macOS Dock or Applications folder.
  6. Open the MCP Server configuration/status panel in the IDE.

Frequency: 100% reproducible on macOS when launching from the GUI.

Expected Behavior

The IDE’s MCP manager should correctly wait for or inherit the fully resolved shell environment (including ~/.zshrc paths), seamlessly locating the bun or npx executables to spawn the MCP servers. Status indicators should display as connected (Green).

Actual Behavior

All MCP servers relying on user-path binaries instantly crash. The UI displays the following native Golang error for each respective server:

  • github • Error: exec: "npx": executable file not found in $PATH
  • dart-mcp-server • Error: exec: "dart": executable file not found in $PATH

Impact

This is a critical friction point that severely degrades the reliability and out-of-the-box experience of MCP integrations. Because MCP configurations (mcp_config.json) are often shared across team members with different system usernames, hardcoding absolute paths is unacceptable. As a result, developers are left believing that first-party integrations (like Github, Firebase, or Dart) are fundamentally broken, leading to high abandonment rates for the MCP feature.

Additional Context

  • The phrasing of the error (executable file not found in $PATH) indicates that the failure occurs within Golang’s os/exec.LookPath() execution block.
  • Passing a custom "env": { "PATH": "..." } payload within mcp_config.json also triggers fatal crashes because the Go runtime completely overwrites the child environment, starving Node/Bun of required system variables like $HOME and $USER.
  • The shell resolution successfully triggers under standard conditions, meaning the failure lies purely in how or when the fetched PATH is distributed to the MCP initialization routine.

Environment

  • Product: Google Antigravity (latest as of 2026-04-08)
  • OS: macOS (Apple Silicon)
  • Configured Runtimes: Node (NVM), Bun, Dart, Firebase
  • Workflows affected: All MCP Server configurations relying on non-system binaries.
  • Version: 1.22.2
12 Likes

Same Issue here after the update

Antigravity Version: 1.22.2
VSCode OSS Version: 1.107.0
Commit: 62335c71d47037adf0a8de54e250bb8ea6016b15
Date: 2026-04-02T19:49:45.095Z
Electron: 39.2.3
Chromium: 142.0.7444.175
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.3.0
Language Server CL: 893628030

1 Like

Hi, just show screenshot to agent and ask to fix it
I faced the same issue and after two prompts it’s worked

There are some issue with mcp_config.json settings

\

restart seems to have fixed it for me.

here’s what i found
look likes agent permissions system does not work correctly

Same issue on Ubuntu 25.10 using bash.

  • MCP Errors: executable file not found on $PATH
  • Normal/Integrated terminal in Antigravity works as expected with correct $PATH
  • Terminal used by agent is non-interactive and uses limited/broken $PATH
  • I’m not using sandbox
  • Added five entries to the new Agent Permissions allow list without any luck:
    • read_file(*)
    • command(*)
    • write_file(*)
    • read_url(*)
    • mcp(*)
  • Tried switching the default terminal to sh using “CTRL+SHIFT+P → Terminal: Select Default Profile” without any luck.
  • Windows installation still working as expected.
  • Additionally the Feedback feature in Antigravity is now also broken: it simply hangs when you click on submit, so I cannot report this using the UI. Seems like google got tired of all the complaints…

In my case, since I use .nvmrc heavily and didn’t want to install Node.js directly on my computer, I solved it this way:

Note: This works on Mac, but it’s also possible on Linux/Windows.

1. Create the file my_npx (or whatever name you like) in /usr/local/bin
2. Copy the script I’ve written below for convenience
3. Inside the folder, from a terminal, run: chmod +x my_npx
4. In antigravity, open the mcp_config.json configuration
5. Wherever you see

"command": "npx",

put

"command": "/usr/local/bin/my_npx",

Script:

#!/bin/bash

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

NODE_PATH=$(nvm which default 2>/dev/null)

if [ -z "$NODE_PATH" ]; then
    echo "Error: nvm does not have a 'default' version set."
    exit 1
fi

NPX_PATH="${NODE_PATH%node}npx"

if [ -f "$NPX_PATH" ]; then
    "$NPX_PATH" "$@"
else
    echo "Error: npx not found in $NPX_PATH"
    exit 1
fi
2 Likes

Current workarounds (e.g., hardcoding absolute paths like /Users/…/bun or tying custom bash wrappers in mcp_config.json) are not viable long-term solutions.

If you try to install any new MCP servers directly from the Antigravity plugin marketplace, they all ship with standard command structures like `bun` or `npx` out of the box. This means every single new plugin you install will immediately crash on launch. You’d be forced to manually dig into the config JSON and rewrite the absolute paths for every new extension you try to use.

I think a fix is needed.

Found a really working workaround.
Remove completely the Antigravity from your MacOS. Use CCleaner or any other solution to remove it completely. Install the previous version. : Google Antigravity version 1.21.9 clean. After it just upgrade. The installation process in 1.22.2 is broken.

Thank you, works for me :slight_smile:

1 Like

I am using Antigravity Version 1.22.2. For my setup of MCP, I followed the instructions in this documentation:

https://stitch.withgoogle.com/docs/mcp/setup.

To configure MCP, simply add the following to the mcpServers section:

{
  "mcpServers": {
    "stitch": {
      "serverUrl": "https://stitch.googleapis.com/mcp",
      "headers": {
        "X-Goog-Api-Key": "YOUR-API-KEY"
      }
    }
  }
}

After making these changes, be sure to restart Antigravity. I hope this helps resolve your error!

Sure sure sure, I’m with you, but in the meantime?

Some fixes have been in progress for months (e.g. auth is a wip) and then we sit and wait for something to fall?

I prefer to have found a 5-min solution with a script that I’m happy to share so that others can waste some minutes of their lives getting back to work… and if they fix it, just a search and replace and everything goes back to how it was before!

But, really, let’s hope they solve it quickly .. bye!!!

Same issue!
Google please fix!

One alternative and simple solution for me was open Antigravity from terminal:

agy

Note: this command is installed during the Antigravity installation (it’s optional)

3 Likes

Thank you for bringing this to our attention. We have escalated the issue to our internal teams for a thorough investigation.

To ensure our engineering team can investigate and resolve these issues effectively, we highly recommend filing bug reports directly through the Antigravity in-app feedback tool. You can do this by navigating to the top-right corner of the interface, clicking the Feedback icon, and selecting Report Issue.

Same issue here, but submitting feedback via the UI does not work either.


Stuck on the submitting step.

Antigravity Version: 1.22.2
VSCode OSS Version: 1.107.0
Commit: 62335c71d47037adf0a8de54e250bb8ea6016b15
Date: 2026-04-02T19:49:45.095Z (1 wk ago)
Electron: 39.2.3
Chromium: 142.0.7444.175
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.4.0

Same problem here. I updated to the latest version and now it can’t execute any commands from my path (node, npx, homebrew commands, etc.). This happens with every attempt to run commands that Antigravity makes. For example, it can’t execute npm install. It’s really annoying; for now, I’ve switched to VSCode.

I hope they fix it in the next version.

You need to fix the symlink to npx, because this is not just about the external mcp configs, even the internal mcps that make antigravity work well (and manage files, for example) also use npx and can’t find it.

Use antigravity in Agent Manager mode, and give it this directive (use sonnet): npx is not being picked up by antigravity, check the npx version and make sure antigravity finds /opt/homebrew/bin/npx in the path while it’s starting up

1 Like

this issue exists 100% - fix / workaround was to instruct agent to run “ PRIOR TO starting a NEW shell to execute commands such as npx, node or others you MUST first source my shell profile using source ~/.zshrc” - it should be fixed though and not requiring this prompt -

I cant even submit the feedback!
Guys, Antigravity is totally broken!

2 Likes