Skip to content

DXT doesn't preserve binary executable permissions during packaging #12

Description

@ishaq-fynd

Summary

When creating a DXT package with dxt pack, the binary files lose their executable permissions, causing EACCES errors when Claude tries to run the MCP server.

Steps to Reproduce

  1. Create a Go binary: go build -o server/some_binary main.go
  2. Set executable permissions: chmod +x server/some_binary
  3. Create DXT package: dxt pack
  4. Install the DXT in Claude
  5. Try to use the MCP server

Expected Behavior

The binary should retain executable permissions and run without errors.

Actual Behavior

Claude fails to spawn the binary with EACCES error, requiring manual chmod +x on the extracted binary.

Error Log

2025-06-27T14:32:13.870Z [some-mcp-server] [error] spawn /Users/username/Library/Application Support/Claude/Claude Extensions/local.dxt.example.some-mcp-server/server/some_binary EACCES {
  metadata: {
    context: 'connection',
    stack: 'Error: spawn /Users/username/Library/Application Support/Claude/Claude Extensions/local.dxt.example.some-mcp-server/server/some_binary EACCES\n' +
      '    at ChildProcess._handle.onexit (node:internal/child_process:285:19)\n' +
      '    at onErrorNT (node:internal/child_process:483:16)\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)'
  }
}

Environment

  • OS: macOS
  • DXT CLI Version: 0.1.0
  • Node.js Version: v22.15.1
  • Claude Version: Claude 0.11.3 (58ae3f) 2025-06-26T02:57:32.000Z

Manifest Configuration

{
  "server": {
    "type": "binary",
    "entry_point": "server/some_binary",
    "args": ["--transport", "stdio"],
    "env": {
        "HOME": "${HOME}"
      }
  }
}

Workaround

After DXT installation, manually run:

chmod +x "/Users/username/Library/Application Support/Claude/Claude Extensions/local.dxt.*/server/some_binary"

Proposed Solution

The DXT packaging process should:

  1. Preserve file permissions when creating the ZIP archive
  2. Or automatically set executable permissions for files specified in entry_point
  3. Or provide a permissions field in manifest.json to specify required permissions

Related

This affects any DXT package using compiled binaries (Go, Rust, C++, etc.) and likely impacts other users creating binary-based MCP servers.

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