Skip to content

Commit 95834ab

Browse files
authored
[Fix]: add workflows to publish to npm + bug fixes (#93)
* fix session url bugs * readme small updates + add github workflows to publish + ci
1 parent 70d99c4 commit 95834ab

File tree

8 files changed

+4394
-821
lines changed

8 files changed

+4394
-821
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Use Node.js 22
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: '22'
18+
cache: 'npm'
19+
- name: Install dependencies
20+
run: npm ci
21+
- run: npm run build
22+
- name: Run ESLint
23+
run: npm run lint
24+
- name: Ensure no changes
25+
run: git diff --exit-code

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [published]
5+
jobs:
6+
publish-npm:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
id-token: write
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 22
16+
registry-url: https://registry.npmjs.org/
17+
- run: npm ci
18+
- run: npm run build
19+
- run: npm publish --provenance
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Apache License
2-
Version 2.0, January 2004
2+
Version 2.0, June 2025
33
http://www.apache.org/licenses/
44

55
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ cd mcp-server-browserbase
6565
npm install && npm run build
6666
```
6767

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

7070
### STDIO:
7171

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

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

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

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

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

544544
## License
545545

546-
Licensed under the MIT License.
546+
Licensed under the Apache 2.0 License.
547547

548548
Copyright 2025 Browserbase, Inc.

0 commit comments

Comments
 (0)