Set up Claude Code, Codex, Cursor or Windsurf for BrewInTH

Which permission mode to pick, token lifetime and scopes, carrying on after a token expires, and whether you need MCP, so the AI deploys in one go.
You have the link and token from BrewInTH and paste them into your AI, but it stops to ask about every line, says it "cannot reach the internet", or refuses to run the deploy step, and the work stalls there. Most of the time the problem is not the code but how the coding agent is set up before it starts.
This guide sets up Claude Code, Codex, Cursor and Windsurf to work smoothly with BrewInTH from the first message: picking the permission mode, choosing the token's lifetime, carrying on when a token expires, and what you need to know about MCP.
In short
✅ Handing over the link and token needs a coding agent on a PC or Mac; a chat app on a phone cannot upload or build
✅ Create the AI link and token (automatic) issues a 24-hour token that can do everything in that project
✅ Claude Code: pick Bypass permissions or Manual before pasting; Auto mode currently tends to refuse deploy steps
✅ Other agents: allow terminal commands and internet access
✅ Token expired? No need to start over: send one short line in the same chat and the AI carries on
Why it has to be a coding agent on a computer
On BrewInTH your own AI puts the site online. It reads the files on your machine, packs them, uploads, starts the build and then opens the live site to check it. That takes a coding agent, an AI that can run commands on your computer, such as Claude Code, Codex, Cursor or Windsurf.
A chat app on a phone cannot do this part. Status, domains and settings work fine from a phone. If you have no coding agent at all, the Upload and go live page (BETA) takes a ZIP file or code pasted from an AI chat instead.

Step 1: Issue the link and token
The shortcut: the automatic button
On the project page, under the project name, press Create the AI link and token (automatic). A Ready-made message for your AI box appears with the link and token already inside. Press Copy the AI message and paste it.
A token from this button lasts 24 hours and can do everything in that project. It suits the usual job where the AI goes from start to finish.
Your own permissions and lifetime
To narrow it down, use the Custom permissions / lifetime link next to the same button, or open the AI connections menu and choose:
- Token lifetime: 1, 4, 24, 72 or 168 hours (7 days)
- Permissions: untick Let AI manage everything in this project, open Customize permissions and, for example, allow only uploading and publishing, with no access to databases or domains
A simple rule: short jobs get short lifetimes, and a job that does not touch the database does not need database permissions.
Step 2: Set up the agent before pasting

Claude Code
Before pasting, open the Mode menu (or press Shift+Tab) and pick:
- Bypass permissions: runs to the end without asking; best when the folder open is this project's own
- Manual: asks each time and you press allow; slower, but you see every command
Auto mode currently tends to refuse deploy steps. If it is selected and the work stalls, switch to one of the two modes above and tell it to continue.
Codex, Cursor and Windsurf
Menu names change between versions, but you need the same three things:
- Open the project's own folder, not a big folder with other work mixed in, so the AI packs only this site's files.
- Allow terminal commands such as zip, curl and npm; without them the AI cannot upload.
- Allow internet access. Some agents run commands in a sandbox with the network switched off. If the AI says it cannot reach brewinth.com, turn this on in the agent's settings or approve it when asked.
An agent that asks before every command still works; you just have to keep approving. The upside is that you see everything it does.
Step 3: Paste the message and let the AI work
Paste the ready-made message into the agent's chat. It tells the AI what BrewInTH is, where the guide is and which permissions it has. The AI opens the link with the token, reads the deploy guide and carries on by itself:
- Checks the code and the files it needs
- Packs and uploads them
- Runs the preflight check, then builds and publishes
- Waits until the site is live and opens the real site to check that it works
The link in the message is a bare link and the token travels separately in the text. Someone who has only the link cannot open the guide; they see a page telling them to ask the owner for a token.
If the deploy fails, let the AI read the logs and fix it in the same chat; see the article on reading logs.
Do I have to set up MCP?
No. The ready-made message works straight away with any agent that can run commands.
Behind the scenes BrewInTH offers the AI two ways in:
- REST API, called with curl or any program, with the token in an
Authorization: Bearerheader - MCP at
https://www.brewinth.com/mcp, with 25 tools for the AI, such as reading the project's status, uploading, publishing, reading logs and checking the live site. It uses the same token, and agents that support MCP with OAuth can connect through OAuth as well.
The AI picks whichever its tooling supports. You do not have to edit any MCP configuration yourself.
When the token expires, or you want to cancel it

Carry on in the same chat
You come back the next day and the old token has expired. Do not start a new chat. Issue a new token; under the ready-made message box you will find Continue earlier work (the old token expired). Press Copy the short message and paste it into the old chat. The AI still remembers the code and what it did, so it redeploys with the new token right away.
Revoke a token
Sent the token to the wrong place, or finished and do not want it used again? Open AI connections, go to Existing access / revoke and press Revoke. Revoking also stops the jobs that AI had queued and switches off the schedules it created.
The Hide token button on the project page only hides the box; it does not revoke the token.
The AI gives you a code instead
Some agents ask to connect with a pairing code instead of receiving a token. If the AI gives you a code, open AI connections and use Have a code from your AI? Approve connection. Approve within 10 minutes; the AI then has access for 24 hours.
Security points
- Share the token only with your AI. Never paste it into group chats, posts or public issues.
- A token works only for the project it was issued for; your other sites are not affected.
- A token that can do everything can also read your app's secret values. If the job does not need them, choose the permissions yourself.
- Use Bypass permissions only with this project's folder open, and read the summary the AI reports at the end.
- If you think a token has leaked, revoke it at once and issue a new one.
Watch the video
▶ From creating a project to opening the site (1:30, in Thai)
Watch on YouTube
Frequently asked questions
Can I use ChatGPT or Claude in the browser?
A browser chat cannot run commands on your machine, so it cannot upload or deploy by itself. It can still write the code; then send the files yourself on the Upload and go live page (BETA).
Which agent is best?
Any agent that can run commands and reach the internet. Use the one you know; the ready-made message and the guide are the same for all of them.
The AI refuses to run the deploy. What now?
It is almost always the permission mode. In Claude Code switch from Auto to Bypass permissions or Manual; in other agents allow terminal commands and internet access. Then type "Go ahead, I allow you to deploy this project."
24 hours is not enough. What can I do?
Choose up to 168 hours (7 days) under AI connections, or keep 24 hours and carry on with the short message when it expires, which is safer.
Can I do this from a phone?
Status, domains and settings work from a phone, but the step where the AI deploys your code needs a computer. If you open the project page on a phone, a button sends that page's address to your computer.
Summary
Set things up once before pasting, and the AI does the rest to the end: open the project's folder, let the agent run commands and reach the internet, pick Bypass permissions or Manual in Claude Code, then paste the ready-made message. When the token expires, send the short line in the same chat, and revoke a token as soon as you no longer need it.
Start your first project for free →
