Skip to content
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

Deployment: Dockerfile and Smithery config #15

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions browserbase/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile
# Use an official Node.js image as a base
FROM node:18-alpine AS builder

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json
COPY browserbase/package.json browserbase/package-lock.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application source code
COPY browserbase/ .

# Build the TypeScript source code
RUN npm run build

# Create the final image from a smaller Node.js runtime
FROM node:18-alpine

# Set the working directory
WORKDIR /app

# Copy built files from the builder stage
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/package-lock.json /app/package-lock.json

# Set environment variables (to be configured at runtime)
ENV BROWSERBASE_API_KEY=<YOUR_BROWSERBASE_API_KEY>
ENV BROWSERBASE_PROJECT_ID=<YOUR_BROWSERBASE_PROJECT_ID>

# Set the entry point
ENTRYPOINT ["node", "dist/index.js"]
13 changes: 12 additions & 1 deletion browserbase/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,20 @@

![cover](../assets/browserbase-mcp.png)

[![smithery badge](https://smithery.ai/badge/@browserbasehq/mcp-browserbase)](https://smithery.ai/server/@browserbasehq/mcp-browserbase)

## Get Started

### Installing via Smithery

To install Browserbase for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@browserbasehq/mcp-browserbase):

```bash
npx -y @smithery/cli install @browserbasehq/mcp-browserbase --client claude
```

### Manual Installation

1. Run `npm install` to install the necessary dependencies, then run `npm run build` to get `dist/index.js`.

2. Set up your Claude Desktop configuration to use the server.
Expand Down Expand Up @@ -31,7 +43,6 @@
<img src="../assets/browserbase-demo.png" alt="demo" width="600"/>
</p>


## Tools

### Browserbase API
Expand Down
21 changes: 21 additions & 0 deletions browserbase/smithery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml

startCommand:
type: stdio
configSchema:
# JSON Schema defining the configuration options for the MCP.
type: object
required:
- browserbaseApiKey
- browserbaseProjectId
properties:
browserbaseApiKey:
type: string
description: The API key for Browserbase.
browserbaseProjectId:
type: string
description: The project ID for Browserbase.
commandFunction:
# A function that produces the CLI command to start the MCP on stdio.
|-
config => ({command: 'node', args: ['dist/index.js'], env: {BROWSERBASE_API_KEY: config.browserbaseApiKey, BROWSERBASE_PROJECT_ID: config.browserbaseProjectId}})