Skip to content

Conversation

@ljunb
Copy link
Contributor

@ljunb ljunb commented Jul 23, 2025

It seems that the extension directory prefix is missing in the mcp_config field for the python type.

I ran dxt init to generate a manifest.json, and then opened it in Claude Desktop after running dxt pack. Unfortunately, I encountered the following error:

ModuleNotFoundError: No module named 'fastmcp'

The generated mcp_config was:

"mcp_config": {
  "command": "python",
  "args": [
    "${__dirname}/time_server.py"
  ],
  "env": {
    "PYTHONPATH": "server/lib"
  }
}

After some testing and cross-checking with python example, I found that the correct configuration should be:

"mcp_config": {
  "command": "python",
  "args": [
    "${__dirname}/time_server.py"
  ],
  "env": {
    "PYTHONPATH": "${__dirname}/server/lib" // modify here
  }
}

Let me know if this is something you'd like to address—I’d be happy to help improve it.

Copy link
Member

@felixrieseberg felixrieseberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful, thank you!

@felixrieseberg felixrieseberg merged commit b062c0e into anthropics:main Jul 23, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants