From d500167ae752f0e8acf03df15f9dbcf5cc6cc805 Mon Sep 17 00:00:00 2001 From: silvermissile <5319647+silvermissile@users.noreply.github.com> Date: Thu, 5 Feb 2026 10:01:40 +0800 Subject: [PATCH] fix: add shebang to make npx execution work Adds #!/usr/bin/env node shebang to src/index.ts to fix the "import: not found" error when running via npx. Without the shebang, the shell tries to execute the JavaScript file directly instead of passing it to Node.js. TypeScript preserves shebangs from source files in the compiled output, so this fix ensures dist/index.js can be properly executed as a command-line tool. Fixes #3 Co-authored-by: Cursor --- src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index d6abb12..50ef755 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,4 @@ +#!/usr/bin/env node import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import { z } from "zod"; @@ -291,4 +292,4 @@ const __filename = fileURLToPath(import.meta.url); if (process.argv[1] === __filename) { run(); -} \ No newline at end of file +}