Skip to content

Commit 7adf35f

Browse files
committed
remove apikey and projectid flags + fix smithery config
1 parent e96d5dc commit 7adf35f

File tree

4 files changed

+19
-76
lines changed

4 files changed

+19
-76
lines changed

README.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -215,21 +215,19 @@ This will clean, build, and publish the package using pnpm's built-in publishing
215215

216216
The Browserbase MCP server accepts the following command-line flags:
217217

218-
| Flag | Description |
219-
| ----------------------------- | --------------------------------------------------------------------------- |
220-
| `--browserbaseApiKey <key>` | Your Browserbase API key for authentication |
221-
| `--browserbaseProjectId <id>` | Your Browserbase project ID |
222-
| `--proxies` | Enable Browserbase proxies for the session |
223-
| `--advancedStealth` | Enable Browserbase Advanced Stealth (Only for Scale Plan Users) |
224-
| `--contextId <contextId>` | Specify a Browserbase Context ID to use |
225-
| `--persist [boolean]` | Whether to persist the Browserbase context (default: true) |
226-
| `--port <port>` | Port to listen on for HTTP/SHTTP transport |
227-
| `--host <host>` | Host to bind server to (default: localhost, use 0.0.0.0 for all interfaces) |
228-
| `--cookies [json]` | JSON array of cookies to inject into the browser |
229-
| `--browserWidth <width>` | Browser viewport width (default: 1024) |
230-
| `--browserHeight <height>` | Browser viewport height (default: 768) |
231-
| `--modelName <model>` | The model to use for Stagehand (default: google/gemini-2.0-flash) |
232-
| `--modelApiKey <key>` | API key for the custom model provider (required when using custom models) |
218+
| Flag | Description |
219+
| -------------------------- | --------------------------------------------------------------------------- |
220+
| `--proxies` | Enable Browserbase proxies for the session |
221+
| `--advancedStealth` | Enable Browserbase Advanced Stealth (Only for Scale Plan Users) |
222+
| `--contextId <contextId>` | Specify a Browserbase Context ID to use |
223+
| `--persist [boolean]` | Whether to persist the Browserbase context (default: true) |
224+
| `--port <port>` | Port to listen on for HTTP/SHTTP transport |
225+
| `--host <host>` | Host to bind server to (default: localhost, use 0.0.0.0 for all interfaces) |
226+
| `--cookies [json]` | JSON array of cookies to inject into the browser |
227+
| `--browserWidth <width>` | Browser viewport width (default: 1024) |
228+
| `--browserHeight <height>` | Browser viewport height (default: 768) |
229+
| `--modelName <model>` | The model to use for Stagehand (default: google/gemini-2.0-flash) |
230+
| `--modelApiKey <key>` | API key for the custom model provider (required when using custom models) |
233231

234232
These flags can be passed directly to the CLI or configured in your MCP configuration file.
235233

config.d.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@ import type { Cookie } from "playwright-core";
22
import type { AvailableModelSchema } from "@browserbasehq/stagehand";
33

44
export type Config = {
5-
/**
6-
* The Browserbase API Key to use
7-
*/
8-
browserbaseApiKey?: string;
9-
/**
10-
* The Browserbase Project ID to use
11-
*/
12-
browserbaseProjectId?: string;
135
/**
146
* Whether or not to use Browserbase proxies
157
* https://docs.browserbase.com/features/proxies

smithery.yaml

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,4 @@
1-
runtime: "container"
1+
runtime: "typescript"
22
build:
33
dockerfile: "Dockerfile"
4-
dockerBuildPath: "."
5-
startCommand:
6-
type: "http"
7-
configSchema:
8-
type: "object"
9-
required: ["browserbaseApiKey", "browserbaseProjectId"]
10-
properties:
11-
browserbaseApiKey:
12-
type: "string"
13-
title: "Browserbase API Key"
14-
description: "The Browserbase API Key to use"
15-
browserbaseProjectId:
16-
type: "string"
17-
title: "Browserbase Project ID"
18-
description: "The Browserbase Project ID to use"
19-
proxies:
20-
type: "boolean"
21-
default: false
22-
description: "Whether or not to use Browserbase proxies"
23-
advancedStealth:
24-
type: "boolean"
25-
default: false
26-
description: "Use advanced stealth mode. Only available to Browserbase Scale Plan users"
27-
modelApiKey:
28-
type: "string"
29-
description: "API key for the custom model provider (e.g., GEMINI_API_KEY)"
30-
modelName:
31-
type: "string"
32-
default: "google/gemini-2.0-flash"
33-
description: "The model to use for Stagehand"
34-
exampleConfig:
35-
browserbaseApiKey: "bb_api_key_example"
36-
browserbaseProjectId: "bb_project_id_example"
37-
proxies: false
38-
advancedStealth: false
39-
modelApiKey: "your_gemini_api_key"
40-
modelName: "google/gemini-2.0-flash"
4+
dockerBuildPath: "."

src/config.ts

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ export type CLIOptions = {
2323

2424
// Default Configuration Values
2525
const defaultConfig: Config = {
26-
browserbaseApiKey: process.env.BROWSERBASE_API_KEY,
27-
browserbaseProjectId: process.env.BROWSERBASE_PROJECT_ID,
2826
proxies: false,
2927
server: {
3028
port: undefined,
@@ -45,31 +43,24 @@ export async function resolveConfig(cliOptions: CLIOptions): Promise<Config> {
4543
const mergedConfig = mergeConfig(defaultConfig, cliConfig);
4644

4745
// --- Add Browserbase Env Vars ---
48-
if (!mergedConfig.browserbaseApiKey) {
49-
mergedConfig.browserbaseApiKey = process.env.BROWSERBASE_API_KEY;
50-
}
51-
if (!mergedConfig.browserbaseProjectId) {
52-
mergedConfig.browserbaseProjectId = process.env.BROWSERBASE_PROJECT_ID;
53-
}
54-
5546
if (!mergedConfig.modelApiKey) {
5647
mergedConfig.modelApiKey = process.env.GEMINI_API_KEY;
5748
}
5849

5950
// --------------------------------
6051

6152
// Basic validation for Browserbase keys - provide dummy values if not set
62-
if (!mergedConfig.browserbaseApiKey) {
53+
if (!cliOptions.browserbaseApiKey) {
6354
console.warn(
6455
"Warning: BROWSERBASE_API_KEY environment variable not set. Using dummy value.",
6556
);
66-
mergedConfig.browserbaseApiKey = "dummy-browserbase-api-key";
57+
cliOptions.browserbaseApiKey = "dummy-browserbase-api-key";
6758
}
68-
if (!mergedConfig.browserbaseProjectId) {
59+
if (!cliOptions.browserbaseProjectId) {
6960
console.warn(
7061
"Warning: BROWSERBASE_PROJECT_ID environment variable not set. Using dummy value.",
7162
);
72-
mergedConfig.browserbaseProjectId = "dummy-browserbase-project-id";
63+
cliOptions.browserbaseProjectId = "dummy-browserbase-project-id";
7364
}
7465
if (!mergedConfig.modelApiKey) {
7566
console.warn(
@@ -86,8 +77,6 @@ export async function configFromCLIOptions(
8677
cliOptions: CLIOptions,
8778
): Promise<Config> {
8879
return {
89-
browserbaseApiKey: cliOptions.browserbaseApiKey,
90-
browserbaseProjectId: cliOptions.browserbaseProjectId,
9180
server: {
9281
port: cliOptions.port,
9382
host: cliOptions.host,

0 commit comments

Comments
 (0)