Error of building DXT for examples/file-manager-python · Issue #47 · modelcontextprotocol/mcpb · GitHub
Skip to content

Error of building DXT for examples/file-manager-python #47

Closed

Description

@dxt0626

Description

Env

MacOS darwin,build python version 3.12

Problem1

After install the dependencies,dxt pack,and install in the Claude Desktop,with following error

2025-07-04T15:26:58.211Z [Python File Manager MCP] [info] Initializing server... { metadata: undefined }
2025-07-04T15:26:58.220Z [Python File Manager MCP] [info] Using MCP server command: python with args and path: {
metadata: {
args: [
'/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/main.py',
'--workspace=${HOME}/Documents',
[length]: 2
],
paths: [
'/usr/local/bin',
'/opt/homebrew/bin',
'/usr/bin',
'/usr/bin',
'/bin',
'/usr/sbin',
'/sbin',
[length]: 7
]
}
} %o
2025-07-04T15:26:58.225Z [Python File Manager MCP] [error] spawn python ENOENT {
metadata: {
context: 'connection',
stack: 'Error: spawn python ENOENT\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)'
}
}
2025-07-04T15:26:58.225Z [Python File Manager MCP] [error] spawn python ENOENT {
metadata: {
stack: 'Error: spawn python ENOENT\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)'
}
}
2025-07-04T15:26:58.227Z [Python File Manager MCP] [info] Server transport closed { metadata: undefined }
2025-07-04T15:26:58.227Z [Python File Manager MCP] [info] Client transport closed { metadata: undefined }

The command "python" is invalid. To fix it,Please change mcp_config.env to "python3" in manifest.json.

Problem2

After install dxt, with below error:

2025-07-04T15:42:51.865Z [Python File Manager MCP] [info] Initializing server... { metadata: undefined }
2025-07-04T15:42:51.874Z [Python File Manager MCP] [info] Using MCP server command: /opt/homebrew/bin/python3 with args and path: {
metadata: {
args: [
'/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/main.py',
'--workspace=${HOME}/Documents',
[length]: 2
],
paths: [
'/usr/local/bin',
'/opt/homebrew/bin',
'/usr/bin',
'/usr/bin',
'/bin',
'/usr/sbin',
'/sbin',
[length]: 7
]
}
} %o
2025-07-04T15:42:51.877Z [Python File Manager MCP] [info] Server started and connected successfully { metadata: undefined }
2025-07-04T15:42:51.939Z [Python File Manager MCP] [info] Message from client: {"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"claude-ai","version":"0.1.0"}},"jsonrpc":"2.0","id":0} { metadata: undefined }
Traceback (most recent call last):
File "/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/main.py", line 7, in
from mcp.server.fastmcp import FastMCP
File "/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/lib/mcp/init.py", line 1, in
from .client.session import ClientSession
File "/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/lib/mcp/client/session.py", line 7, in
from jsonschema import SchemaError, ValidationError, validate
File "/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/lib/jsonschema/init.py", line 13, in
from jsonschema._format import FormatChecker
File "/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/lib/jsonschema/_format.py", line 11, in
from jsonschema.exceptions import FormatError
File "/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/lib/jsonschema/exceptions.py", line 14, in
from referencing.exceptions import Unresolvable as _Unresolvable
File "/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/lib/referencing/init.py", line 5, in
from referencing._core import Anchor, Registry, Resource, Specification
File "/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/lib/referencing/_core.py", line 9, in
from rpds import HashTrieMap, HashTrieSet, List
File "/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/lib/rpds/init.py", line 1, in
from .rpds import *
ModuleNotFoundError: No module named 'rpds.rpds'
2025-07-04T15:42:52.575Z [Python File Manager MCP] [info] Server transport closed { metadata: undefined }
2025-07-04T15:42:52.575Z [Python File Manager MCP] [info] Client transport closed { metadata: undefined }
2025-07-04T15:42:52.575Z [Python File Manager MCP] [info] Server transport closed unexpectedly, this is likely due to the process exiting early. If you are developing this MCP server you can add output to stderr (i.e. console.error('...') in JavaScript, print('...', file=sys.stderr) in python) and it will appear in this log. { metadata: undefined }
2025-07-04T15:42:52.575Z [Python File Manager MCP] [error] Server disconnected. For troubleshooting guidance, please visit our debugging documentation { metadata: { context: 'connection', stack: undefined } }
2025-07-04T15:42:52.576Z [Python File Manager MCP] [info] Client transport closed { metadata: undefined }

" ModuleNotFoundError: No module named 'rpds.rpds' "

Image

It work in local env, but failed in Claude Desktop. Please help to debug.

Activity

  1. phiweger commented on Jul 5, 2025

    @phiweger

    same

  2. kuchin commented on Jul 6, 2025

    @kuchin

    It says

    The command "python" is invalid. To fix it,Please change mcp_config.env to "python3" in manifest.json.

    It uses installed python, but you can provide PYTHONPATH with rpds installed - just make sure your virtual environment matches the python version installed locally.

  3. dxt0626 commented on Jul 7, 2025

    @dxt0626
    Author

    It says

    The command "python" is invalid. To fix it,Please change mcp_config.env to "python3" in manifest.json.

    It uses installed python, but you can provide PYTHONPATH with rpds installed - just make sure your virtual environment matches the python version installed locally.

    I had provided the server.mcp_config.PYTHONPATH to the the python package i installed, including rpds. But the error exists.

    I changed server.mcp_config.command from 'python' to 'python3', because ‘pyhton’ can't found by Claude Desktop, with below error. And after using 'python3', another error 'rpds' occurs.
    I guess inside Claude Desktop, there should be a python build-in runtime. Otherwise, how it could be a one-click installation for DXT if it uses python env i installed.

    2025-07-07T01:59:35.207Z [Python File Manager MCP] [info] Using MCP server command: python with args and path: {
    metadata: {
    args: [
    '/Users/fly1/Library/Application Support/Claude/Claude Extensions/local.dxt.anthropic.file-manager-python/server/main.py',
    '--workspace=${HOME}/Documents',
    [length]: 2
    ],
    paths: [
    '/usr/local/bin',
    '/opt/homebrew/bin',
    '/usr/bin',
    '/usr/bin',
    '/bin',
    '/usr/sbin',
    '/sbin',
    [length]: 7
    ]
    }
    } %o
    2025-07-07T01:59:35.214Z [Python File Manager MCP] [error] spawn python ENOENT {
    metadata: {
    context: 'connection',
    stack: 'Error: spawn python ENOENT\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)'
    }
    }

  4. added a commit that references this issue on Mar 12, 2026
    a5d9ae8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions