Skip to content

[Workaround] Fix Python/uvx and Node/npx MCP servers failing silently on Linux AppImage #205

Description

@GodsQuantum

Describe the bug

When running Atomic Chat on Linux via the official .AppImage, MCP servers relying on local binaries (like uvx for Python or npx for Node) fail to start silently. The UI toggle switches to active: false instantly.

The Cause

The AppImage sandbox injects its own environment variables (LD_LIBRARY_PATH, PYTHONHOME, PYTHONPATH). When a local tool tries to download and spawn a native environment on the host machine, it inherits these AppImage variables. This corrupts the native runtime, causing a silent crash in the background.

The Workaround / Fix

For anyone facing this issue, you can bypass the AppImage's environment by using /usr/bin/env to explicitly unset (-u) the conflicting variables before launching the MCP server.

Note: Node (npx) only requires unsetting LD_LIBRARY_PATH, while Python (uvx) requires unsetting PYTHONHOME and PYTHONPATH as well.

Example 1: Python MCP Server (using uvx)

Change your Python MCP server configuration in Atomic Chat to this format:

"fetch": {
  "active": true,
  "args": [
    "-u", "LD_LIBRARY_PATH",
    "-u", "PYTHONHOME",
    "-u", "PYTHONPATH",
    "uvx",
    "mcp-server-fetch"
  ],
  "command": "/usr/bin/env",
  "cwd": "/home/YOUR_USERNAME",
  "env": {},
  "type": "stdio"
}

Example 2: Node MCP Server (using npx)

Change your Node MCP server configuration to this format:

"browsermcp": {
  "active": true,
  "args": [
    "-u", "LD_LIBRARY_PATH",
    "/usr/bin/npx",
    "-y",
    "@browsermcp/mcp"
  ],
  "command": "/usr/bin/env",
  "cwd": "/home/YOUR_USERNAME",
  "env": {},
  "type": "stdio"
}

Key elements of the fix:

  • command: "/usr/bin/env" replaces direct binary calls.
  • -u LD_LIBRARY_PATH (and PYTHONHOME/PYTHONPATH for Python) prevents the AppImage from poisoning the host's execution environment.
  • A safe cwd ensures the process doesn't fail on ENOENT.

(Tested on CachyOS / Arch Linux with the latest Atomic Chat AppImage).

Hopefully, this helps other Linux users until the AppImage launcher natively sanitizes stdio environments for subprocesses!

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