Skip to content

Claude Code (Bun Version) Segfault Crash due to MCP server #102

Description

@wwzbluesky

MATLAB Release

R2026a

Operating System

Windows

Agent Platform

Claude Code

Other Agent Platform

No response

MCP Server Version

0.11.1

Steps to Reproduce

Here is the process and solution,every time the MCP is installed, claude code can not launch.
Claude code version has to be limited.

Issue: Claude Code (Bun native version) crashes with a segfault on startup, reporting panic(main thread): Segmentation fault, with the crash occurring in MozartBreathCore.dll.

Root Cause: There is a fundamental conflict between the Bun runtime and MATLAB DLLs (MozartBreathCore.dll) on Windows. Whether from third-party sources or the official MathWorks MCP Server, this DLL gets injected into the Bun process address space, causing a segmentation fault. This affects Bun versions v1.3.5 ~ v1.3.14 (Claude Code versions v2.1.11 ~ v2.1.145).

Solution: Switch to the npm/Node.js version of Claude Code instead of the Bun native version:

Install the Node.js version: npm install -g @anthropic-ai/claude-code@2.1.112

Disable the Bun native binary: mv ~/.local/bin/claude.exe ~/.local/bin/claude.exe.bun-bak

Add "DISABLE_AUTOUPDATER": "1" to ~/.claude/settings.json to prevent auto-updating back to the Bun version

Current Configuration: Claude Code v2.1.112 (npm/Node.js) + MATLAB MCP Core Server v0.11.1, running normally.

Expected Behavior

No matter what the Claude Code version is, MCP server can work.

Actual Behavior

Switch to the npm/Node.js version of Claude Code instead of the Bun native version:

Install the Node.js version: npm install -g @anthropic-ai/claude-code@2.1.112

Disable the Bun native binary: mv ~/.local/bin/claude.exe ~/.local/bin/claude.exe.bun-bak

Add "DISABLE_AUTOUPDATER": "1" to ~/.claude/settings.json to prevent auto-updating back to the Bun version

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as expectedstaleThis issue has had no activity for 7+ days and may be closed soonwaiting-for-infoWe need more information from the reporter to proceed

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions