A proof-of-concept implementation showing how to use the Camoufox automation framework with Node.js. This repository serves as an example of integrating Camoufox's Python-based automation capabilities into Node.js applications.
pip install -U camoufox[geoip]
camoufox fetch
# Clone this example
git clone https://github.com/DemonMartin/node-camoufox.git
cd node-camoufox
# Install Playwright
npm install
import { firefox } from 'playwright';
import { CamoufoxServer } from './src/CamoufoxServer.js';
async function example() {
const server = new CamoufoxServer({
headless: false,
humanize: true,
debug: true
});
try {
const wsEndpoint = await server.start();
const browser = await firefox.connect(wsEndpoint);
server.setBrowser(browser);
const page = await browser.newPage();
await page.goto('https://example.com');
// Your automation code here...
} finally {
await server.stop();
}
}
const server = new CamoufoxServer({
headless: true, // Run in headless mode
humanize: true, // Enable humanization
debug: false, // Debug logging
proxy: { // Optional proxy
server: 'http://proxy.example.com:8080',
username: 'user',
password: 'pass'
}
});
For additional configuration options and features, please check:
This implementation doesnt support all Camoufox options - you can extend the configuration based on the official documentation by yourself.
You need to update and edit CamoufoxServer.js and server.py yourself.
Enable debug logging to see detailed operation information:
const server = new CamoufoxServer({
debug: true,
// other options...
});
Debug messages follow this format:
[2025-01-28T20:29:17.445Z] Starting server...
[2025-01-28T20:29:21.078Z] Connecting to browser...
[2025-01-28T20:29:24.049Z] Page loaded
Feel free to:
MIT - Feel free to use and modify
This is a community example showing how to use Camoufox with Node.js. It is not an official package or module. For production use, ensure you understand the Camoufox framework and adapt this implementation to your needs.
$ claude mcp add node-camoufox \
-- python -m otcore.mcp_server <graph>