Skip to content

npx github:PinMeTo/pinmeto-location-mcp@latest fails - missing prepare script #6

@evilmachina

Description

@evilmachina

Description

The MCP server cannot be run directly from GitHub using npx due to a missing prepare script in package.json. This prevents users from using the one-line installation method commonly used for MCP servers.

Steps to Reproduce

  1. Run the following command:
    npx -y github:PinMeTo/pinmeto-location-mcp@latest
  2. Observe the error (likely ENOENT: no such file or directory for ./build/index.js)

Expected Behavior

The MCP server should:

  1. Automatically build the TypeScript source code
  2. Execute successfully from the built files
  3. Start the MCP server

Actual Behavior

The command fails because:

  • The bin field in package.json points to ./build/index.js
  • The build/ directory is gitignored and doesn't exist in the GitHub repository
  • No prepare script exists to automatically build the project when installing from GitHub
  • npx attempts to execute a non-existent file

Root Cause

When installing from GitHub (not npm registry), npm doesn't have access to pre-built artifacts. The package requires a prepare lifecycle script to build TypeScript sources before execution.

Proposed Solution

Add a prepare script to package.json:

{
  "scripts": {
    "build": "node manifest.js && tsc && cp package.json build/",
    "prepare": "npm run build",
    "start": "node build/index.js",
    // ... other scripts
  }
}

The prepare script runs automatically:

  • After npm install (including from GitHub)
  • Before npm publish
  • When using npx with GitHub URLs

Additional Context

  • Environment: Node.js (any version)
  • Installation method: npx with GitHub URL
  • Package version: 1.0.1
  • Similar pattern: Most TypeScript-based MCP servers include a prepare script for this exact reason

Workaround (for users)

Until fixed, users must:

  1. Clone the repository manually
  2. Run npm install && npm run build
  3. Run node build/index.js or configure MCP client to use the local path

References

Metadata

Metadata

Assignees

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