EN
Log in Start for free

Codex integration

Live chat on your site with Codex

Codex writes the code in your project, from the terminal, your editor or the desktop app. Give it the Hooky prompt: it adds the chat bubble to your template. Then add Hooky’s MCP server, and Codex reads your conversations and stats, or creates a site for you.

Two ways to connect Hooky to Codex

To have chat on your site, one prompt is enough: Codex adds one line to your template, you deploy, and you reply from your phone. The MCP server is a bonus: it gives Codex access to your Hooky account (sites, conversations, channels, stats, AI agent). You can do either without the other.

Did your site come out of a conversation on chatgpt.com, with no repository? The ChatGPT guide is for you.

Install the bubble with a prompt

  1. Create your Hooky account (free for one site), add your site and copy its prompt from Sites: the key is already in it.

  2. Open Codex in your project: codex at the root of the repository, the extension in your editor, or the desktop app on that folder.

  3. Paste the prompt. Codex finds the shared template and adds the tag. Review the change: only one line should appear (two with the import for Next.js).

  4. Deploy as usual: commit, push, or your host’s command. If you hand the task to Codex on your GitHub repository, review the proposed change, then merge it.

The prompt for Codex

Add the Hooky chat bubble to this site, on every page. Find the HTML template shared by every page (index.html for React or Vite, app/layout.tsx for Next.js with the Script component from next/script and strategy="afterInteractive", the base layout for Astro, Nuxt, SvelteKit, Rails or Django) and paste this tag there once, right before </body>:

<script src="https://heyhooky.com/widget.js" data-site-key="SITE_PUBLIC_KEY" async></script>

Don’t change the script URL or the data-site-key attribute. Don’t add any other code: the bubble shows up on its own. If the site has several independent templates, add the tag to each and tell me which ones.

Start the prompt with “Read https://heyhooky.com/llms.txt first”: Codex will also know how to count your signups or orders with Hooky.track.

Add Hooky’s MCP server

Hooky’s MCP server lives at https://api.heyhooky.com/mcp (HTTP transport). The Codex CLI, the extension for your editor and the ChatGPT desktop app read the same configuration: you write it once.

  1. Add the server to ~/.codex/config.toml (create the file if it doesn’t exist):

    [mcp_servers.hooky]
    url = "https://api.heyhooky.com/mcp"
  2. Sign in from a terminal:

    codex mcp login hooky

    A Hooky page opens in your browser: sign in (or create your account), pick the account and allow access. In the desktop app or the extension, the Authenticate button does the same.

  3. Check: codex mcp list in the terminal, or /mcp in Codex, shows hooky.

Prefer an API key? Create one in Developers, put it in an environment variable (export HOOKY_API_KEY=hka_…) and tell Codex to send it in the Authorization: Bearer header:

[mcp_servers.hooky]
url = "https://api.heyhooky.com/mcp"
bearer_token_env_var = "HOOKY_API_KEY"

This keeps the key out of the configuration file. Everything is detailed in the MCP server docs.

What you can ask Codex

  • “Add the Hooky chat to this project”: it creates the site in your account (or finds the existing one), fetches its tag and adds it to your template.
  • “Summarize yesterday’s conversations”: who wrote, about what, and what is waiting for a reply.
  • “Turn on my site’s AI agent”: on paid plans, it switches it on, tells it which page to read and can add your instructions.
  • “Add my staging domain to the allowed addresses”: the site settings (addresses, color, side, style) without opening the dashboard.
  • “Find yesterday’s order notifications”: it reads your sites’ channels, where your alerts arrive.
  • “Draft a reply to the latest visitor”: it writes it, shows it to you, and only sends it with your OK.

Stay in control

A reply sent by Codex really reaches your visitor, signed with your name: Codex should show it to you first. Signing in creates a key named after the tool in Developers; remove it to cut off access. You keep replying yourself from the Hooky app (iPhone, iPad, Mac, Android) or the web dashboard.

Frequently asked questions

Do I need the MCP server to have chat on my site?

No. The prompt is enough: the bubble only needs its tag. The MCP server is for managing your Hooky account from Codex.

I don’t have a Hooky account yet

Run codex mcp login hooky: the sign-in page offers to create your account. Without MCP, Codex can also create it through the signup API: tell it “Read https://heyhooky.com/llms.txt, then create a Hooky account with my email and install the bubble” (see the docs).

My machine has no browser

Run codex mcp login hooky --no-browser, made for this case, or use the API key with bearer_token_env_var.

What about ChatGPT on the web?

ChatGPT on the web doesn’t read Codex’s local configuration. For a site made in a conversation, follow the ChatGPT guide.

How do I cut off Codex’s access?

Remove its key in Developers, on the Hooky side, and delete the [mcp_servers.hooky] section from your config.toml.

Other tools

Your visitors have questions. Answer them from wherever you are.

Free for one site, installed with one prompt. Then just keep your phone in your pocket.