@barewire/mcp-server
v1.0.0
Published
BareWire MCP server
Downloads
89
Readme
@barewire/mcp-server
BareWire's official Model Context Protocol (MCP) server.
Features
- Dual-Transport Architecture: Runs natively over Standard IO (
stdio) for IDE integrations (e.g. Claude Code, Cursor) or Server-Sent Events (sse) for network-based API consumers. barewire_browseTool: Maps tightly to the universal DOM extraction payload format. Route headless requests through our edge optimization layer, wait for dynamic selectors, and clean obfuscated layouts into machine-readable primitives.
Transport Modes
Configure the transport using the MCP_TRANSPORT environment variable.
1. Standard IO (stdio)
Used primarily for local IDE extensions.
export MCP_TRANSPORT=stdio
export BAREWIRE_API_KEY="your-api-key"
npm start2. Server-Sent Events (sse)
Used for remote clients, python scripts, and custom agent workflows. Runs on port 3000 by default.
export MCP_TRANSPORT=sse
export PORT=3000
export BAREWIRE_API_KEY="your-api-key"
npm startAuthentication
When running in SSE mode, downstream Python and Node engineers (using frameworks like Browser-Use, LangChain, httpx, or axios) must pass the BAREWIRE_API_KEY explicitly via an HTTP header to connect.
Provide your API key in the Authorization header as a Bearer token:
Authorization: Bearer your-api-keyExample (Python with httpx):
import httpx
headers = {
"Authorization": "Bearer your-api-key"
}
# Connect to the SSE endpoint to negotiate a session
response = httpx.get("http://localhost:3000/mcp/sse", headers=headers)Example (Node.js with axios):
import axios from 'axios';
const response = await axios.get('http://localhost:3000/mcp/sse', {
headers: {
'Authorization': 'Bearer your-api-key'
}
});The gateway parses this exact header prefix to securely route and authorize agent payloads.
