feat: add HTTP server transport for MCP
Adds src/http-server.ts - a Node.js HTTP entry point that exposes the MCP implementation via Streamable HTTP transport (POST/GET /mcp) per the MCP 2025-11-25 specification. - Uses StreamableHTTPServerTransport (stateless mode) from the MCP SDK - Port configurable via MCP_PORT env var (default: 3000) - ObsidianMCPServer.connect() now accepts an optional Transport param so both stdio (existing) and HTTP (new) modes reuse the same server - Added 'npm run server' script to start the HTTP server Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
"main": "dist/index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"server": "node dist/http-server.js",
|
||||
"validate-manifest": "mcpb validate manifest.json",
|
||||
"pack": "npm run build && mcpb pack",
|
||||
"test": "jest",
|
||||
|
||||
Reference in New Issue
Block a user