
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
stagehand-mcp
Advanced tools
An MCP (Model Context Protocol) server that exposes Stagehand browser automation capabilities to Claude and other MCP clients.
Add to your MCP client configuration:
{
"mcpServers": {
"stagehand": {
"command": "npx",
"args": ["stagehand-mcp"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key"
}
}
}
}
--modelName - Override the default model (default: "openai/gpt-4.1-mini")--modelApiKey - Override the API key (default: OPENAI_API_KEY env var)--executablePath - Override browser executable path--headless - Run in headless mode--cdpUrl - Connect to an existing browser instance via Chrome DevTools Protocol URL--includeTokenMetrics - Include token usage metrics in AI-powered tool responsesnpm run dev # Watch mode for development
npm run inspector # Launch MCP Inspector for testing
The server provides 5 core automation tools:
The extract tool can extract structured data from web pages using natural language instructions. You can optionally provide a JSON schema to specify the exact structure you want.
Extract all product names and prices from this page
For structured data extraction, provide a JSON schema:
{
"instruction": "extract product information",
"schema": {
"type": "object",
"properties": {
"products": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"price": { "type": "string" },
"url": {
"type": "string",
"format": "uri"
}
}
}
}
}
}
}
To extract URLs or links, use the format: "uri" specification:
{
"type": "object",
"properties": {
"contactLink": {
"type": "string",
"format": "uri"
}
}
}
This ensures the extracted value is validated as a proper URL format.
When the --includeTokenMetrics flag is enabled, AI-powered tools (act, extract, observe) will include token usage data in their responses using the standard MCP usage field:
{
"content": [
{
"type": "text",
"text": "Action completed: click the login button"
}
],
"usage": {
"input_tokens": 1250,
"output_tokens": 830
}
}
{
"mcpServers": {
"stagehand": {
"command": "npx",
"args": ["stagehand-mcp", "--includeTokenMetrics"],
"env": {
"OPENAI_API_KEY": "your-openai-api-key"
}
}
}
}
MIT
FAQs
MCP server that exposes Stagehand browser automation capabilities
We found that stagehand-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.