-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
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
- Run the following command:
npx -y github:PinMeTo/pinmeto-location-mcp@latest
- Observe the error (likely
ENOENT: no such file or directoryfor./build/index.js)
Expected Behavior
The MCP server should:
- Automatically build the TypeScript source code
- Execute successfully from the built files
- Start the MCP server
Actual Behavior
The command fails because:
- The
binfield in package.json points to./build/index.js - The
build/directory is gitignored and doesn't exist in the GitHub repository - No
preparescript 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
npxwith GitHub URLs
Additional Context
- Environment: Node.js (any version)
- Installation method:
npxwith 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:
- Clone the repository manually
- Run
npm install && npm run build - Run
node build/index.jsor configure MCP client to use the local path
References
- npm lifecycle scripts documentation
- The
preparescript is specifically designed for this use case
Metadata
Metadata
Assignees
Labels
No labels