-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add HTTP transport (Streamable HTTP) #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ dist/ | |
|
|
||
| # Dependencies | ||
| node_modules/ | ||
| .pnpm-store/ | ||
|
|
||
| # Environment variables | ||
| .env | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # IcePanel MCP Server Dockerfile | ||
| # Multi-stage build for minimal production image | ||
|
|
||
| # Stage 1: Build | ||
| FROM node:22-alpine AS builder | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Copy package files | ||
| COPY package.json pnpm-lock.yaml ./ | ||
|
|
||
| # Install pnpm and dependencies | ||
| RUN corepack enable && corepack prepare pnpm@latest --activate | ||
| RUN pnpm install | ||
|
|
||
| # Copy source code | ||
| COPY tsconfig.json ./ | ||
| COPY src/ ./src/ | ||
| COPY bin/ ./bin/ | ||
|
|
||
| # Build TypeScript | ||
| RUN pnpm run build | ||
|
|
||
| # Stage 2: Production | ||
| FROM node:22-alpine AS production | ||
|
|
||
| WORKDIR /app | ||
|
|
||
| # Copy package files | ||
| COPY package.json pnpm-lock.yaml ./ | ||
|
|
||
| # Install pnpm and production dependencies only | ||
| RUN corepack enable && corepack prepare pnpm@latest --activate | ||
| RUN pnpm install --prod | ||
|
|
||
| # Copy built files from builder stage | ||
| COPY --from=builder /app/dist ./dist | ||
| COPY --from=builder /app/bin ./bin | ||
|
|
||
| # Environment variables (to be provided at runtime) | ||
| # Required: | ||
| # API_KEY - Your IcePanel API key | ||
| # ORGANIZATION_ID - Your IcePanel organization ID | ||
| # Optional: | ||
| # ICEPANEL_API_BASE_URL - Override API base URL | ||
| # MCP_TRANSPORT - Transport type: 'stdio' (default) or 'http' | ||
| # MCP_PORT - HTTP port for Streamable HTTP transport (default: 3000) | ||
|
|
||
| # Default port for HTTP transport (can be overridden with --port flag) | ||
| EXPOSE 3000 | ||
|
|
||
| # Run the MCP server | ||
| # Supports CLI flags: --transport <stdio|http> --port <number> | ||
| # Example: docker run -p 3000:3000 ... icepanel-mcp-server --transport http --port 3000 | ||
| ENTRYPOINT ["node", "bin/icepanel-mcp-server.js"] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "@icepanel/mcp-server", | ||
| "version": "0.2.0", | ||
| "version": "0.1.1", | ||
| "description": "IcePanel MCP Server for integrating with MCP clients", | ||
| "type": "module", | ||
| "main": "dist/main.js", | ||
|
|
@@ -25,11 +25,15 @@ | |
| "author": "IcePanel", | ||
| "license": "MIT", | ||
| "dependencies": { | ||
| "@modelcontextprotocol/sdk": "1.24.0", | ||
| "@modelcontextprotocol/sdk": "1.9.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. SDK downgrade breaks StreamableHTTPServerTransport importHigh Severity The Additional Locations (1) |
||
| "cors": "^2.8.5", | ||
| "express": "^5.0.1", | ||
| "fuse.js": "^7.1.0", | ||
| "zod": "^3.22.4" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/cors": "^2.8.17", | ||
| "@types/express": "^5.0.0", | ||
| "@types/node": "^22.0.0", | ||
| "tsx": "^4.7.0", | ||
| "typescript": "^5.8.0" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Package and server version mismatch after changes
Medium Severity
The diff changes
package.jsonversion from0.2.0to0.1.1while simultaneously changingsrc/main.tsversion from0.1.1to0.2.0. The newhttp-server.tsalso hardcodes"0.2.0"in the health endpoint. After this PR, the package version is0.1.1but the server reports0.2.0in both the MCP handshake and health endpoint, creating an inconsistency that complicates debugging and version tracking.Additional Locations (2)
src/main.ts#L27-L28src/http-server.ts#L41-L42