Customjs
CustomJS is a code-first automation platform that enables seamless integration of custom JavaScript logic into various systems and technologies, allowing users to extend applications by writing functions for tasks like sending emails, generating PDFs, or updating CRM data fields.
Verdict
Common use cases
- Generate PDF invoices from HTML templates
- Archive competitor landing pages as screenshots
- Merge sprint reports into one PDF
- Automate visual regression tests via Puppeteer
- Capture proof of live site status
Integration
- Vendor
- Customjs
- Category
- developer-tools
- Auth
- API_KEY
- Tools
- 6
- Composio slug
customjs
Tools
- Authenticate CustomJS API Key
Tool to authenticate a CustomJS API key. Use when verifying a user's API key before making further requests.
- Capture webpage screenshot
Tool to capture a screenshot of a webpage. Use when you need a visual snapshot of a URL.
- Convert HTML to PDF
Tool to convert HTML to a PDF document. Use when you need to generate a PDF from raw HTML. Returns raw PDF bytes suitable for download or storage.
- Convert HTML to PNG
Tool to convert HTML string to PNG image. Use when you need a PNG from HTML after preparing your markup.
- Merge multiple PDFs into one
Tool to merge multiple PDF files into a single PDF. Use when you have multiple PDF URLs and want one combined PDF.
- Run Puppeteer Script
Tool to run a Puppeteer script and capture a screenshot. Use when automating headless browser tasks and needing a PNG output. Use after confirming the script logic.
Setup
Setup guide
- 11. In Switchy, open your workspace settings and navigate to the MCP integrations panel. 2. Select 'Add MCP' and choose Customjs from the developer tools category. 3. You'll be prompted to enter your Customjs API key — generate one from your Customjs dashboard under API settings. 4. Paste the key into Switchy and click 'Connect'. 5. Switchy will authenticate the key using the MCP's verification tool; if valid, the connection saves. 6. Open any Space and type '@Customjs capture a screenshot of example.com' to test. 7. The MCP returns a PNG file you can download or share. 8. For HTML-to-PDF or Puppeteer tasks, structure your prompt with the HTML string or script inline, then @mention Customjs to execute.
What teammates see: by default, memories from Customjs are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Spaces have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Screenshot a URL
@Customjs capture a screenshot of https://example.com and return the PNG file.Open in a Space →
HTML to PDF Report
@Customjs convert this HTML to PDF: <html><body><h1>Q4 Summary</h1><p>Revenue: $50k</p></body></html>Open in a Space →
Merge Sprint PDFs
@Customjs merge these PDFs into one: https://example.com/week1.pdf, https://example.com/week2.pdfOpen in a Space →
HTML to PNG Badge
@Customjs convert this HTML to PNG: <div style='background:blue;color:white;padding:10px'>Build Passing</div>Open in a Space →
Run Puppeteer Script
@Customjs run this Puppeteer script and screenshot the result: await page.goto('https://example.com'); await page.click('#login');Open in a Space →Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@Customjs capture a screenshot of https://example.com/dashboard and show me what the homepage looks like right now
I've captured a screenshot of the dashboard at example.com. The page shows a navigation bar at the top with four menu items, a hero section featuring a product demo video, and three feature cards below the fold. The color scheme is predominantly blue and white, with a prominent 'Get Started' CTA button in the center. The screenshot was taken at 1920×1080 resolution and reflects the page state as of this moment.
This example demonstrates the screenshot tool's ability to provide visual snapshots for design reviews or monitoring. Requires a valid API key with screenshot permissions. The tool captures the page as rendered at request time—dynamic content or login-gated sections may not appear unless you configure authentication in the Puppeteer script.
@Customjs convert this HTML invoice template to PDF: <html><body><h1>Invoice #1234</h1><p>Total: $500</p></body></html>
I've converted your HTML to a PDF document. The resulting file is a single-page PDF containing the invoice header and total amount, formatted with default browser styling. The PDF is ready for download or storage—I can provide the raw bytes or save it to a specified location. The conversion preserved the HTML structure, though complex CSS or web fonts may render differently than in a browser.
This showcases the HTML-to-PDF conversion tool, useful for generating invoices, reports, or printable documents from structured data. The tool returns raw PDF bytes, so you'll need to handle file storage separately. Be aware that advanced CSS features (flexbox, grid, custom fonts) may not render identically to a live browser preview.
@Customjs run a Puppeteer script to log into staging.app.com, navigate to /reports, and screenshot the quarterly summary table
I've executed the Puppeteer script against your staging environment. The script successfully authenticated using the credentials provided, navigated to the reports page, waited for the quarterly summary table to load, and captured a screenshot. The resulting PNG shows a 4-column table with Q1-Q4 data, including revenue and user growth metrics. The automation took approximately 8 seconds to complete, including page load time.
This example highlights the custom Puppeteer scripting capability, ideal for automating complex browser workflows like authenticated scraping or testing. You must provide valid login credentials and ensure the target site allows automated access. Rate limits apply per your API tier, and long-running scripts may timeout—keep tasks under 30 seconds when possible.
Use-case deep-dives
When Customjs beats manual export for recurring team reports
A 6-person ops team runs weekly KPI reviews and needs formatted PDFs for stakeholders who don't use their dashboards. They pull data from Notion or Airtable, template it in HTML, and hit the Convert HTML to PDF tool—no designer handoff, no export-click ritual every Monday. Customjs wins here because the HTML-to-PDF conversion is deterministic and the team controls layout in code. The trade-off: if your HTML is over 2MB or relies on external fonts that load slowly, rendering can timeout. If you're generating fewer than 10 PDFs a week, a manual Notion export is faster to set up. Beyond that threshold, the MCP pays for itself in saved clicks.
Why screenshot capture works for small support queues
A 3-person support team fields bug reports where users describe UI issues but rarely attach screenshots. The team uses the Capture webpage screenshot tool to grab the live state of a reported URL and paste it into Linear or Height for triage. This works when you're handling under 30 tickets a day and the URLs are publicly accessible—no login walls. Customjs is faster than asking the customer to re-send a screenshot and more reliable than browser extensions that break across Chrome updates. The boundary: if your product requires auth or the reported pages are behind a paywall, the screenshot tool can't reach them. For those cases, you're back to asking users for screenshots or using session replay tools.
When Puppeteer scripts replace repetitive client setup tasks
A 5-person agency onboards 4-6 clients a month, each needing a branded welcome packet with screenshots of their new dashboard, analytics setup, and admin panel. They write a Puppeteer script once—using the Run Puppeteer Script tool—that logs into staging, navigates the client's instance, and captures PNGs for the packet. Customjs is the right call because the script runs headless and the team doesn't need a dedicated automation engineer to maintain Playwright infrastructure. The catch: if your script needs to interact with complex SPAs or wait for dynamic content, debugging through the MCP's error messages is slower than running Puppeteer locally. For one-off tasks, skip the MCP. For monthly repetition, the saved setup time justifies the API key cost.
Frequently asked
What does the Customjs MCP do in Switchy?
It gives your AI agents headless browser automation through Puppeteer. You can capture screenshots, convert HTML to PDF or PNG, merge PDFs, and run custom browser scripts. Useful when your team needs to generate reports, archive web pages, or automate visual testing without writing backend code.
Do I need a Customjs account to use this MCP?
Yes. You need a Customjs API key, which you get by signing up at their site. Switchy stores the key and authenticates each request. The MCP won't work without a valid key, so set that up before connecting the integration to your workspace.
Can it interact with pages that require login or JavaScript?
Yes, if you use the Puppeteer script tool. You can write scripts that click buttons, fill forms, wait for elements, and handle auth flows. The screenshot and HTML-to-image tools capture the final rendered state, so JavaScript executes before the snapshot. Static HTML conversion happens server-side without a real browser session.
Why use this instead of calling Customjs API directly?
The MCP wraps the API so your AI agents can invoke browser automation in natural language. Instead of writing curl commands or SDK calls, you describe what you want and the agent picks the right tool. Faster for ad-hoc tasks; direct API calls still make sense for production pipelines.
Who on the team should connect the Customjs MCP?
Whoever owns your Customjs account and has the API key. Typically a developer or ops lead. Once connected, any workspace member can use the tools through AI agents. Usage counts against your Customjs plan limits, so coordinate with whoever manages that budget.