Skip to content

Commit 44884c7

Browse files
committed
dockerfile and smithery setup
1 parent 508958f commit 44884c7

File tree

2 files changed

+67
-10
lines changed

2 files changed

+67
-10
lines changed

browserbase/Dockerfile

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,38 @@
11
# Basic Node.js Dockerfile
22
FROM node:20-slim
33

4-
WORKDIR /usr/src/app
4+
WORKDIR /app
55

66
# Install dependencies
7-
COPY package*.json ./
7+
COPY browserbase/package.json browserbase/package-lock.json ./
88
RUN npm ci --only=production
99

10-
# Copy application code
11-
COPY dist ./dist
12-
COPY src ./src
10+
# Install dependencies
11+
RUN npm install
12+
13+
# Copy the rest of the application source code
14+
COPY browserbase/ .
15+
16+
# Build the TypeScript source code
17+
RUN npm run build
18+
19+
# Create the final image from a smaller Node.js runtime
20+
FROM node:18-alpine
21+
22+
# Set the working directory
23+
WORKDIR /app
24+
25+
# Copy built files from the builder stage
26+
COPY --from=builder /app/dist /app/dist
27+
COPY --from=builder /app/package.json /app/package.json
28+
COPY --from=builder /app/package-lock.json /app/package-lock.json
1329

1430
# Define environment variables (can be overridden)
1531
ENV NODE_ENV=production
16-
# ENV BROWSERBASE_API_KEY=your_api_key
17-
# ENV BROWSERBASE_PROJECT_ID=your_project_id
32+
ENV BROWSERBASE_API_KEY=<YOUR_BROWSERBASE_API_KEY>
33+
ENV BROWSERBASE_PROJECT_ID=<YOUR_BROWSERBASE_PROJECT_ID>
1834

19-
# Expose a default port (useful if deploying as a service, though stdio is used now)
20-
EXPOSE 8080
35+
# Expose a default port (useful if deploying as a service) 8931 is standard for sse mcp
36+
EXPOSE 8931
2137

22-
CMD [ "node", "dist/index.js" ]
38+
CMD [ "node", "cli.js" ]

browserbase/smithery.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
2+
3+
startCommand:
4+
type: stdio
5+
configSchema:
6+
# JSON Schema defining the configuration options for the MCP.
7+
type: object
8+
required:
9+
- browserbaseApiKey
10+
- browserbaseProjectId
11+
properties:
12+
browserbaseApiKey:
13+
type: string
14+
description: The API key for Browserbase.
15+
browserbaseProjectId:
16+
type: string
17+
description: The project ID for Browserbase.
18+
commandFunction:
19+
|-
20+
config => ({command: 'node', args: ['cli.js'], env: {BROWSERBASE_API_KEY: config.browserbaseApiKey, BROWSERBASE_PROJECT_ID: config.browserbaseProjectId}})
21+
22+
type: http
23+
configSchema:
24+
type: object
25+
required:
26+
- port
27+
- browserbaseApiKey
28+
- browserbaseProjectId
29+
properties:
30+
port:
31+
type: number
32+
description: The port to listen on.
33+
browserbaseApiKey:
34+
type: string
35+
description: The API key for Browserbase.
36+
browserbaseProjectId:
37+
type: string
38+
description: The project ID for Browserbase.
39+
commandFunction:
40+
|-
41+
config => ({command: 'node', args: ['cli.js --port', config.port], env: {BROWSERBASE_API_KEY: config.browserbaseApiKey, BROWSERBASE_PROJECT_ID: config.browserbaseProjectId}})

0 commit comments

Comments
 (0)