Skip to content

[Question] How to run mcp using NPX #101

@dhtmdgkr123

Description

@dhtmdgkr123

i'm publish MCP server to my private package store(e.g ., nexus),

and run using that command
"npx clear-npx-cache && npx -y @my-namespace/my-mcp-server"

and error occured

[2025-06-11T03:04:01.832Z] [INFO] Initializing MCP Server: @my-namespace/[email protected]
[2025-06-11T03:04:01.834Z] [INFO] Starting MCP server: (Framework: 0.2.13, SDK: 1.12.1)...
[2025-06-11T03:04:01.834Z] [INFO] Capabilities detected: {}
[2025-06-11T03:04:01.835Z] [ERROR] Server failed to start: Server does not support tools (required for tools/list)
Error: Server does not support tools (required for tools/list)
    at Server.assertRequestHandlerCapability (file:///Users/macbook-user/.npm/_npx/e4fe9340b75556e8/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js:129:27)
    at Server.setRequestHandler (file:///Users/macbook-user/.npm/_npx/e4fe9340b75556e8/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js:324:14)
    at MCPServer.setupHandlers (file:///Users/macbook-user/.npm/_npx/e4fe9340b75556e8/node_modules/mcp-framework/dist/core/MCPServer.js:152:21)
    at MCPServer.start (file:///Users/macbook-user/.npm/_npx/e4fe9340b75556e8/node_modules/mcp-framework/dist/core/MCPServer.js:315:18)

how can i resolve it ?

here is my directory structure

Image

and here is my package.json


  "type": "module",
  "bin": {
    "my-mcp-server": "./dist/index.js"
  },
  "files": [
    "dist",
    "package.json"
  ],
  
  "scripts": {
    "build": "rm -rf ./dist && tsc && mcp-build && chmod +x dist/index.js",
    "inspect": "rm -rf ./dist && tsc && mcp-build && chmod +x dist/index.js && npx @modelcontextprotocol/inspector dist/index.js",
    "watch": "tsc --watch",
    "start": "node dist/index.js",
    "pub": "npm run build && npm link"
  },
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.8",
    "axios": "^1.9.0",
    "mcp-framework": "^0.2.11",
    "module-alias": "^2.2.3"
  },
  "devDependencies": {
    "@types/node": "^20.11.24",
    "typescript": "^5.3.3"
  },
  "engines": {
    "node": ">=22.14.0"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions