From fe7faf9c81a356084ab6d30791ab2b922bed0d38 Mon Sep 17 00:00:00 2001 From: DP37 <13983571-DP37@users.noreply.replit.com> Date: Sun, 20 Apr 2025 09:14:51 +0000 Subject: [PATCH] docs(setup): add README with setup instructions, examples, and API details --- .replit | 1 + ...ng-Get-Started-1-Run-npm-1745139941430.txt | 110 +++++++++++++++++ ...orkspace-examples-mcp-ex-1745140447990.txt | 113 ++++++++++++++++++ 3 files changed, 224 insertions(+) create mode 100644 attached_assets/Pasted--Browserbase-MCP-Server-cover-assets-browserbase-mcp-png-Get-Started-1-Run-npm-1745139941430.txt create mode 100644 attached_assets/Pasted-if-not-available-Traceback-most-recent-call-last-File-home-runner-workspace-examples-mcp-ex-1745140447990.txt diff --git a/.replit b/.replit index b3910d43..6d97aa07 100644 --- a/.replit +++ b/.replit @@ -2,6 +2,7 @@ modules = ["python-3.10", "bash"] [nix] channel = "stable-24_05" +packages = ["libxcrypt"] [workflows] runButton = "Run MCP Demo" diff --git a/attached_assets/Pasted--Browserbase-MCP-Server-cover-assets-browserbase-mcp-png-Get-Started-1-Run-npm-1745139941430.txt b/attached_assets/Pasted--Browserbase-MCP-Server-cover-assets-browserbase-mcp-png-Get-Started-1-Run-npm-1745139941430.txt new file mode 100644 index 00000000..e96ff938 --- /dev/null +++ b/attached_assets/Pasted--Browserbase-MCP-Server-cover-assets-browserbase-mcp-png-Get-Started-1-Run-npm-1745139941430.txt @@ -0,0 +1,110 @@ +# Browserbase MCP Server + +![cover](../assets/browserbase-mcp.png) + +## Get Started + +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. + +```json +{ + "mcpServers": { + "browserbase": { + "command": "node", + "args": ["path/to/mcp-server-browserbase/browserbase/dist/index.js"], + "env": { + "BROWSERBASE_API_KEY": "", + "BROWSERBASE_PROJECT_ID": "" + } + } + } +} +``` + +3. Restart your Claude Desktop app and you should see the tools available clicking the 🔨 icon. + +4. Start using the tools! Below is an image of Claude closing a browser session. + +

+ demo +

+ + +## Tools + +### Browserbase API + +- **browserbase_create_session** + + - Create a new cloud browser session using Browserbase + - No required inputs + +- **browserbase_navigate** + + - Navigate to any URL in the browser + - Input: `url` (string) + +- **browserbase_screenshot** + + - Capture screenshots of the entire page or specific elements + - Inputs: + - `name` (string, required): Name for the screenshot + - `selector` (string, optional): CSS selector for element to screenshot + - `width` (number, optional, default: 800): Screenshot width + - `height` (number, optional, default: 600): Screenshot height + +- **browserbase_click** + + - Click elements on the page + - Input: `selector` (string): CSS selector for element to click + +- **browserbase_fill** + + - Fill out input fields + - Inputs: + - `selector` (string): CSS selector for input field + - `value` (string): Value to fill + +- **browserbase_evaluate** + + - Execute JavaScript in the browser console + - Input: `script` (string): JavaScript code to execute + +- **browserbase_get_content** + + - Extract all content from the current page + - Input: `selector` (string, optional): CSS selector to get content from specific elements + +- **browserbase_parallel_sessions** + - Create multiple browser sessions and navigate to different URLs + - Input: `sessions` (array): Array of objects containing: + - `url` (string): URL to navigate to + - `id` (string): Session identifier + +### Resources + +The server provides access to two types of resources: + +1. **Console Logs** (`console://logs`) + + - Browser console output in text format + - Includes all console messages from the browser + +2. **Screenshots** (`screenshot://`) + - PNG images of captured screenshots + - Accessible via the screenshot name specified during capture + +## Key Features + +- Cloud browser automation +- Web data extraction +- Console log monitoring +- Screenshot capabilities +- JavaScript execution +- Basic web interaction (navigation, clicking, form filling) + +## License + +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository. \ No newline at end of file diff --git a/attached_assets/Pasted-if-not-available-Traceback-most-recent-call-last-File-home-runner-workspace-examples-mcp-ex-1745140447990.txt b/attached_assets/Pasted-if-not-available-Traceback-most-recent-call-last-File-home-runner-workspace-examples-mcp-ex-1745140447990.txt new file mode 100644 index 00000000..76c3b793 --- /dev/null +++ b/attached_assets/Pasted-if-not-available-Traceback-most-recent-call-last-File-home-runner-workspace-examples-mcp-ex-1745140447990.txt @@ -0,0 +1,113 @@ +if not available "Traceback (most recent call last): + File "/home/runner/workspace/examples/mcp_example/mcp_client.py", line 4, in + from swarms.prompts.agent_prompts import FINANCE_AGENT_PROMPT, MATH_AGENT_PROMPT +ImportError: cannot import name 'FINANCE_AGENT_PROMPT' from 'swarms.prompts.agent_prompts' (/home/runner/workspace/.pythonlibs/lib/python3.10/site-packages/swarms/prompts/agent_prompts.py)" add the peorppoert "" I WNAT THIS AS TO ME EXMPALE SERVER THAT I WANT TO CONNTECT TO DO THE SMOCKE TEST "# Browserbase MCP Server + +![cover](../assets/browserbase-mcp.png) + +## Get Started + +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. + +```json +{ + "mcpServers": { + "browserbase": { + "command": "node", + "args": ["path/to/mcp-server-browserbase/browserbase/dist/index.js"], + "env": { + "BROWSERBASE_API_KEY": "", + "BROWSERBASE_PROJECT_ID": "" + } + } + } +} +``` + +3. Restart your Claude Desktop app and you should see the tools available clicking the 🔨 icon. + +4. Start using the tools! Below is an image of Claude closing a browser session. + +

+ demo +

+ + +## Tools + +### Browserbase API + +- **browserbase_create_session** + + - Create a new cloud browser session using Browserbase + - No required inputs + +- **browserbase_navigate** + + - Navigate to any URL in the browser + - Input: `url` (string) + +- **browserbase_screenshot** + + - Capture screenshots of the entire page or specific elements + - Inputs: + - `name` (string, required): Name for the screenshot + - `selector` (string, optional): CSS selector for element to screenshot + - `width` (number, optional, default: 800): Screenshot width + - `height` (number, optional, default: 600): Screenshot height + +- **browserbase_click** + + - Click elements on the page + - Input: `selector` (string): CSS selector for element to click + +- **browserbase_fill** + + - Fill out input fields + - Inputs: + - `selector` (string): CSS selector for input field + - `value` (string): Value to fill + +- **browserbase_evaluate** + + - Execute JavaScript in the browser console + - Input: `script` (string): JavaScript code to execute + +- **browserbase_get_content** + + - Extract all content from the current page + - Input: `selector` (string, optional): CSS selector to get content from specific elements + +- **browserbase_parallel_sessions** + - Create multiple browser sessions and navigate to different URLs + - Input: `sessions` (array): Array of objects containing: + - `url` (string): URL to navigate to + - `id` (string): Session identifier + +### Resources + +The server provides access to two types of resources: + +1. **Console Logs** (`console://logs`) + + - Browser console output in text format + - Includes all console messages from the browser + +2. **Screenshots** (`screenshot://`) + - PNG images of captured screenshots + - Accessible via the screenshot name specified during capture + +## Key Features + +- Cloud browser automation +- Web data extraction +- Console log monitoring +- Screenshot capabilities +- JavaScript execution +- Basic web interaction (navigation, clicking, form filling) + +## License + +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository." \ No newline at end of file