Skip to content

Context7 Platform -- Up-to-date docs for AI agents

feat: support http on smithery

arjunkmrm6490a81afb43
diff --git a/Dockerfile b/Dockerfile
index 3fe62763..fabcb295 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -25,7 +25,12 @@ COPY package.json ./
# Install only production dependencies
RUN npm install --production --ignore-scripts
-# Expose no ports (stdio only)
+# Set default environment variables for HTTP mode
+ENV MCP_TRANSPORT=http
+ENV PORT=8080
+
+# Expose HTTP port
+EXPOSE 8080
# Default command
CMD ["node", "dist/index.js"]
diff --git a/package.json b/package.json
index 131d0013..28fc3027 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,8 @@
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc && chmod 755 dist/index.js",
"format": "prettier --write .",
- "lint": "eslint \"**/*.{js,ts,tsx}\" --fix"
+ "lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
+ "start": "MCP_TRANSPORT=http node dist/index.js"
},
"repository": {
"type": "git",
diff --git a/smithery.yaml b/smithery.yaml
index ef5cdf7b..d561f8cf 100644
--- a/smithery.yaml
+++ b/smithery.yaml
@@ -1,13 +1,9 @@
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
startCommand:
- type: stdio
+ type: http
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
- description: Empty configuration
- commandFunction:
- # A JS function that produces the CLI command based on the given config to start the MCP on stdio.
- |-
- (config) => ({ command: 'node', args: ['dist/index.js'] })
- exampleConfig: {}
+ description: No configuration required
+ exampleConfig: {}
\ No newline at end of file