Skip to content

The readme lacks a description about npx. #303

@CharlinChen

Description

@CharlinChen

Describe the bug
I followed the steps in the README to run the simplest demo and encountered an error:

Error: Cannot find module 'libnpx'

To Reproduce
Steps to reproduce the behavior:

  1. in Ubuntu 20.04.6 LTS
  2. pip install mcp
  3. pip install mcp[cli]
  4. run mcp dev server.py

Expected behavior
Error with:

node:internal/modules/cjs/loader:1078
  throw err;
  ^

Error: Cannot find module 'libnpx'
Require stack:
- /usr/share/npm/bin/npx-cli.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
    at Module._load (node:internal/modules/cjs/loader:920:27)
    at Module.require (node:internal/modules/cjs/loader:1141:19)
    at require (node:internal/modules/cjs/helpers:110:18)
    at Object.<anonymous> (/usr/share/npm/bin/npx-cli.js:3:13)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)
    at Module._load (node:internal/modules/cjs/loader:958:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/usr/share/npm/bin/npx-cli.js' ]
}

Node.js v18.16.0
[03/17/25 03:22:12] ERROR    Dev server failed                                                                                                  cli.py:261

Screenshots
If applicable, add screenshots to help explain your problem.

Image

Desktop (please complete the following information):

  • OS: linux
  • Browser None
  • Version 1.4.1

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