From a0d8ec1e7eda022319ef98a0472f3bcb0d379c84 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Mon, 11 Nov 2024 10:41:07 +0000 Subject: [PATCH] Make server executable on its own --- server/package.json | 7 ++++++- server/src/index.ts | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/server/package.json b/server/package.json index 78e82dc..a503374 100644 --- a/server/package.json +++ b/server/package.json @@ -6,8 +6,13 @@ "author": "Anthropic, PBC (https://anthropic.com)", "homepage": "https://modelcontextprotocol.github.io", "bugs": "https://github.com/modelcontextprotocol/inspector/issues", - "main": "build/index.js", "type": "module", + "bin": { + "mcp-inspector-server": "build/index.js" + }, + "files": [ + "build" + ], "scripts": { "build": "tsc", "start": "node build/index.js", diff --git a/server/src/index.ts b/server/src/index.ts index 58e922b..328312b 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -1,3 +1,5 @@ +#!/usr/bin/env node + import cors from "cors"; import EventSource from "eventsource";