Skip to content

[Fix]: add workflows to publish to npm + bug fixes #93

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

Merged
merged 2 commits into from
Jun 30, 2025
Merged
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
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- run: npm run build
- name: Run ESLint
run: npm run lint
- name: Ensure no changes
run: git diff --exit-code
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish
on:
release:
types: [published]
jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Apache License
Version 2.0, January 2004
Version 2.0, June 2025
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ cd mcp-server-browserbase
npm install && npm run build
```

Then in your MCP Config JSON run the server. To run locally we can use STDIO or self-host over SSE.
Then in your MCP Config JSON run the server. To run locally we can use STDIO or self-host SHTTP.

### STDIO:

Expand Down Expand Up @@ -100,7 +100,7 @@ Then in your MCP Config JSON file put the following:
{
"mcpServers": {
"browserbase": {
"url": "http://localhost:8931/sse",
"url": "http://localhost:8931/mcp",
"env": {
"BROWSERBASE_API_KEY": "",
"BROWSERBASE_PROJECT_ID": ""
Expand All @@ -124,7 +124,7 @@ The Browserbase MCP server accepts the following command-line flags:
| `--advancedStealth` | Enable Browserbase Advanced Stealth (Only for Scale Plan Users) |
| `--contextId <contextId>` | Specify a Browserbase Context ID to use |
| `--persist [boolean]` | Whether to persist the Browserbase context (default: true) |
| `--port <port>` | Port to listen on for HTTP/SSE transport |
| `--port <port>` | Port to listen on for HTTP/SHTTP transport |
| `--host <host>` | Host to bind server to (default: localhost, use 0.0.0.0 for all interfaces) |
| `--cookies [json]` | JSON array of cookies to inject into the browser |
| `--browserWidth <width>` | Browser viewport width (default: 1024) |
Expand Down Expand Up @@ -421,7 +421,7 @@ mcp-server-browserbase/
│ ├── sessionManager.ts # Browserbase session lifecycle management
│ ├── stagehandStore.ts # Multi-session store for managing parallel browser sessions
│ ├── program.ts # CLI program setup using Commander.js
│ ├── transport.ts # HTTP/SSE and STDIO transport handlers
│ ├── transport.ts # HTTP/SHTTP and STDIO transport handlers
│ ├── server.ts # Server list management
│ ├── utils.ts # Utility functions
│ ├── mcp/ # MCP protocol implementations
Expand Down Expand Up @@ -466,7 +466,7 @@ mcp-server-browserbase/

**program.ts** - CLI program setup using Commander.js with all command-line options, argument parsing, and transport initialization.

**transport.ts** - Transport layer implementations for STDIO and HTTP/SSE communication with session management across different connection types.
**transport.ts** - Transport layer implementations for STDIO and HTTP/SHTTP communication with session management across different connection types.

**server.ts** - Server list management providing factory patterns for server creation and handling multiple concurrent connections.

Expand Down Expand Up @@ -543,6 +543,6 @@ For more information about the Model Context Protocol, visit:

## License

Licensed under the MIT License.
Licensed under the Apache 2.0 License.

Copyright 2025 Browserbase, Inc.
Loading