@botanicastudios/mcp-deepcoding-browser
v0.0.13
Published
Custom MCP server for browser automation with preset configurations
Downloads
36
Readme
MCP DeepCoding Browser
A custom MCP (Model Context Protocol) server that wraps the playwright-mcp-server with preset configurations and simplified tool names.
Features
- Simplified tool names: Removes
playwright_prefix from tool names - Preset configurations: Built-in default values for browser settings
- Environment-aware navigation: Automatically constructs URLs using
BASE_URLenvironment variable - Reduced parameter complexity: Hide complex browser configuration options
- Improved cleanup: Properly closes browser instances on server shutdown (fixes original module issue)
Available Tools
navigate- Navigate to a relative path (automatically prepended with BASE_URL)screenshot- Take screenshots with preset dimensions and save settingsclick- Click elements on the pagefill- Fill input fieldsselect- Select dropdown optionshover- Hover over elementsevaluate- Execute JavaScriptconsole_logs- Retrieve browser console logsclose- Close the browserget_visible_text- Get page text contentget_visible_html- Get page HTMLgo_back/go_forward- Browser navigationdrag- Drag and drop elementspress_key- Press keyboard keys
Setup
- Install dependencies:
npm install- Build the server:
npm run build- Set environment variables:
export BASE_URL=http://localhost:3000
export DOWNLOADS_DIR=/path/to/screenshots # Optional, defaults to current working directoryUsage
The server can be used in several ways:
1. Via npx (after publishing)
npx @botanicastudios/mcp-deepcoding-browser2. As a local installation
npm install @botanicastudios/mcp-deepcoding-browser
# Then run with:
npx mcp-deepcoding-browser3. Direct usage with MCP clients
The server can be used directly with MCP clients or as part of a larger system.
Example Tool Usage
{
"name": "navigate",
"arguments": {
"path": "/dashboard"
}
}This will navigate to ${BASE_URL}/dashboard with preset browser configurations (800x800 viewport, chromium browser, etc.).
Configuration
The server uses static properties defined in filteredTools.ts to provide default values:
- Browser: Always uses Chromium
- Viewport: 800x800 pixels
- Screenshots: Full page, saved as PNG files to current working directory (configurable via DOWNLOADS_DIR)
- Headless: Disabled by default (browser is visible)
Architecture
index.ts- Main server entry pointfilteredTools.ts- Tool definitions with static propertiestoolWrapper.ts- Logic to transform custom calls to playwright callsrequestHandler.ts- MCP protocol handlers
The server imports and wraps the published @executeautomation/playwright-mcp-server package, reusing all the complex browser management logic while providing a simplified, preset-configured interface.
Publishing
To publish this package to npm:
Build the package:
npm run buildTest the package locally:
npm pack --dry-runPublish to npm:
npm publish --access publicTest the published package:
npx @botanicastudios/mcp-deepcoding-browser
Make sure you're logged into npm (npm login) and have the appropriate permissions for the @botanicastudios scope.
