← All integrations

CustomJS MCP server

12 operations0 webhooks

Render HTML or Markdown to PDF, capture screenshots after browser automation, run inline JavaScript, scrape pages with exact steps or an AI agent, and publish hosted HTML pages.

Try CustomJS with your agent

Connect CustomJS, then paste this into Claude, ChatGPT or Cursor. For ideas from other apps, see the use cases.

Using Corsair, show me what you can do in CustomJS on my account, then run one read-only example and show me the result.

Runs once, when you ask

CustomJS tools and triggers

Tools are what your agent can do in CustomJS through Corsair's MCP server. Triggers are the CustomJS events a routine can start from.

Pages

  • CreateWrite

    Publish an HTML page to a new live URL; CustomJS does not enforce unique names, so a repeated call publishes a second page

    pages.create

  • DeleteDestructive

    Delete a hosted page, which takes its live URL down permanently; an unknown page ID fails with a 404

    pages.delete

  • ListRead-only

    List the hosted HTML pages in the workspace with their live URLs

    pages.list

  • UpdateWrite

    Replace the HTML of a hosted page in place, keeping its live URL, and optionally rename it

    pages.update

Javascript

  • RunWrite

    Run JavaScript inline with the given input and return what it produced as text; the code can call any bundled NPM module and reach the network

    javascript.run

  • Run BinaryWrite

    Run JavaScript inline and return its Buffer result as base64, for PDFs and images; the code can call any bundled NPM module and reach the network

    javascript.runBinary

Pdf

  • From HtmlRead-only

    Render HTML or a Nunjucks template to PDF in Chromium, returning the bytes as base64 with an optional page size

    pdf.fromHtml

  • From MarkdownRead-only

    Render Markdown to PDF, returning the bytes as base64

    pdf.fromMarkdown

Scrape

  • AgentDestructive

    Give an AI agent a plain-language goal and let it drive a browser for up to maxSteps actions; it bills model tokens and can submit forms on the site it visits

    scrape.agent

  • PageWrite

    Drive a browser through exact steps (navigate, click, type, evaluate and extract) and return the extracted values, with no model tokens spent per step

    scrape.page

Auth

  • CheckRead-only

    Verify the API key and read its workspace name, rate-limit window and suspension state; the key and JWT in the raw answer are dropped

    auth.check

Screenshot

  • CaptureWrite

    Capture a URL as PNG after optional click, type, wait and scroll steps, cropped to a box when one is given

    screenshot.capture

Connect CustomJS to Claude, ChatGPT or Cursor

  1. 1

    Connect CustomJS in Corsair

    Add your CustomJS API key once in Corsair. Corsair stores the credential encrypted and makes the CustomJS API calls for your agent, so it never goes into a prompt or a config file. Connect CustomJS

    If your link lets the agent add apps, you can skip this: it gives you a sign-in link the first time it needs CustomJS. On a ChatGPT personal plan, connect CustomJS here first.

  2. 2

    Add Corsair's MCP server to your agent

    Every client uses the same address:

    https://mcp.corsair.dev/mcp
    Open Customize → Connectors → Add custom connector, paste the address, then select Connect.

    Codex, Gemini CLI, VS Code, Zed and other clients with OAuth sign-in work the same way. Clients without it, such as GitHub Copilot's coding agent, use a link's own address and an API key. Setup for every client

  3. 3

    Sign in and choose what needs your approval

    Your client opens Corsair to sign in. Pick a link: the apps your agent can use and a mode that decides what it may do without asking. In the default Cautious mode, CustomJS's read and write operations run right away and its 2 destructive operations wait for your approval. Strict mode asks before every write and refuses destructive operations, and Read mode allows reads only.

FAQ

Install corsair and @corsair-dev/customjs, add the CustomJS plugin, and connect with an API key. Then call methods like corsair.customjs.api.auth.check() from your app. Corsair keeps each tenant isolated.

Yes. CustomJS requires an API key from your CustomJS account or developer dashboard. Create credentials with access that matches what you automate, then paste them into Corsair or connect through managed auth in Hub.

Yes. One Corsair client can hit CustomJS, GitHub, Notion, Stripe, and the rest. Trigger CustomJS from a webhook, push updates to Slack, or chain actions across plugins. Same tenant context across integrations, plain TypeScript.

Teams use Corsair for render HTML or Markdown to PDF, capture screenshots after browser automation, run inline JavaScript, scrape pages with exact steps or an AI agent, and publish hosted HTML pages. Common builds include sync jobs, admin tooling, and agents that call CustomJS APIs from your backend.

The SDK is open source. Self-host and you pay Corsair nothing for the integration layer. Hub bills for hosted auth and execution, not per CustomJS API call. Hub has a generous free tier. For hobby projects you can probably run the whole thing on free. Paid plans start to matter with more tenants or heavier traffic.

We maintain @corsair-dev/customjs in the open repo. When CustomJS ships API changes, upgrade the package. Your call sites stay typed. You should not need to rewrite the integration layer each time.

No. Corsair does not read your CustomJS data or hold individual access credentials. Credentials stay in your database. API calls run on your instance. We do not store CustomJS data on your behalf.

Yes. Add https://mcp.corsair.dev/mcp as a custom connector or MCP server in Claude, ChatGPT, Cursor, VS Code, Claude Code, Codex or any client that supports remote MCP servers with OAuth sign-in, then sign in to Corsair. On ChatGPT personal plans, custom servers currently get read tools only.

Yes. Put CustomJS on a link in Strict mode and every write waits for your approval, while destructive actions are refused. The default Cautious mode asks only before the 2 destructive CustomJS operations. You can change a link's mode at hub.corsair.dev/me.