MCPcopy Index your code
hub / github.com/DemonMartin/node-camoufox

github.com/DemonMartin/node-camoufox @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
16 symbols 41 edges 3 files 10 documented · 62% updated 17mo ago★ 38
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

node-camoufox

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.

MIT License Powered by Camoufox

Important Notes

  • This is not an NPM package - it's an example implementation
  • For the latest features and options, always refer to the official Camoufox documentation
  • This implementation can be freely used as a starting point for your own projects

Prerequisites

  1. Python 3.8 or higher
  2. Node.js 16.0 or higher
  3. Camoufox Python package with GeoIP support (recommended):
pip install -U camoufox[geoip]
  1. Camoufox browser:
camoufox fetch

Quick Start

# Clone this example
git clone https://github.com/DemonMartin/node-camoufox.git
cd node-camoufox

# Install Playwright
npm install

Basic Usage

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();
    }
}

Basic Configuration

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'
    }
});

Extended Configuration

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.

Debugging

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

Contributing

Feel free to:

  • Fork and modify for your needs
  • Open issues for bugs
  • Suggest improvements
  • Share your use cases
  • Open pull requests

License

MIT - Feel free to use and modify

Credits

Disclaimer

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.

Core symbols most depended-on inside this repo

debug
called by 7
example.js
#cleanup
called by 6
src/CamoufoxServer.js
start
called by 2
src/CamoufoxServer.js
stop
called by 2
src/CamoufoxServer.js
runExample
called by 1
example.js
parse_arguments
called by 1
src/server.py
load_config
called by 1
src/server.py
main
called by 1
src/server.py

Shape

Function 7
Method 7
Class 2

Languages

TypeScript81%
Python19%

Modules by API surface

src/CamoufoxServer.js11 symbols
src/server.py3 symbols
example.js2 symbols

For agents

$ claude mcp add node-camoufox \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page