Tutorial · Cursor · AI agents

    Cursor to Android and iOS: hands-free builds with Claude or GPT

    Nathan Claiborne
    If you build your app in Cursor, its agent can now take it the rest of the way: build a signed Android or iOS app, read the log when a build fails, fix the code, push, and build again until it works. It does that through Corenna's MCP server, with whichever Claude or GPT model you pick in Cursor. This tutorial sets it up in about ten minutes.

    What you'll end up with

    One message to Cursor's agent starts a loop that runs by itself:

    1. The agent adds your repo to Corenna and runs the pre-build check.
    2. It fixes anything the check finds in your code, commits and pushes.
    3. It creates your Android signing key and starts the build on GitHub Actions.
    4. If the build fails, it reads the log, fixes the cause, pushes and builds again.
    5. When the build succeeds, it hands you the download link.

    Cursor can edit your code and Corenna can build it, so between them nothing has to be copied and pasted. You stay in charge of the few steps that need you (see below).

    Before you start

    • A Corenna account (sign up; your first month is $1).
    • Your app open in Cursor, in a GitHub repo you can push to. Web apps (Vite, Next, React), Flutter and React Native all work. Not sure about yours? Run the free repo check.
    • Cursor's desktop app, signed in to a plan that lets you choose Claude or GPT models.

    Step 1: Add Corenna to Cursor

    Open (or create) ~/.cursor/mcp.json in your home folder, so Corenna is available in every project, and add the server. Use .cursor/mcp.json inside the repo instead if you only want it there.

    {
      "mcpServers": {
        "corenna": {
          "url": "https://dqwnwgkjhbiluockgnji.supabase.co/functions/v1/mcp"
        }
      }
    }

    If the file already has other servers, add the "corenna" entry inside the existing mcpServers. You can also add it from Customize in Cursor's sidebar, which writes the same entry.

    Step 2: Sign in

    Open Customize in the sidebar and find Corenna in your MCP servers. It shows that it needs you to sign in: click it, sign in with your Corenna account in the browser window that opens, and approve access. Cursor handles the rest; there's no API key to copy.

    When it's connected, Corenna's ten tools appear under the server, including add_project, trigger_build, get_build_logs and get_download_link. Make sure its toggle is on.

    Step 3: Pick Claude or GPT

    Open the Agent chat and choose a model in the model picker. Corenna works the same with any model that can use tools, Claude or GPT. Pick the one you already trust with your code; a stronger model is worth it here, because fixing a failed build means reading logs and changing the right file.

    Step 4: Let it run without asking every time

    By default, Cursor asks before every MCP tool call, so you'd approve each step. For a hands-free loop, allow Corenna's tools to run on their own. Create ~/.cursor/permissions.json:

    {
      "mcpAllowlist": ["corenna:*"]
    }

    Then, in Settings → Agents → Approvals & Execution, choose Auto-review or Allowlist. Allowlisted Corenna calls then run straight away, while other risky actions still get checked. Committing and pushing are terminal commands: allow git there too if you want those without prompts. Run Everything also works, but it skips every check, for all tools and commands.

    Allowing Corenna is low-risk: its tools never delete anything, never replace an existing signing key, and builds follow your plan's limits like on the website.

    Step 5: Tell the agent the rules (optional, recommended)

    Cursor gives its agent the instructions in an AGENTS.md file at the root of your repo. Adding this keeps the agent on track, and stops it from looping forever on a build it can't fix:

    ## Mobile builds (Corenna)
    
    - Build the app with the Corenna MCP tools, following the order in their instructions.
    - If a build fails: read it with get_build_logs (problems_only first), fix the cause
      in this repo, commit and push to the project's branch, then trigger_build again.
    - Stop after 3 failed builds in a row and tell me what is going wrong.
    - Never ask me to paste signing passwords, keys or Apple files: send me the
      Corenna link instead.
    - When a build succeeds, give me the get_download_link URL straight away.

    Step 6: Ask for your app

    In the Agent chat:

    Use Corenna to build this repo into an Android app for Google Play.
    If the build fails, read the log, fix the code, commit and push, and build again
    until it succeeds. Then give me the download link.

    Swap "for Google Play" for "that I can install on my phone" to get an .apk, or ask for iOS once your Apple files are on Corenna. An Android build takes about 3 to 10 minutes; the agent checks on it until it finishes.

    The steps that stay with you

    A few things are left to you on purpose, so secrets never pass through the chat:

    • GitHub access. The first time, the agent gives you a link to install Corenna's GitHub App on the repo. Install it, then tell the agent it's done.
    • Signing passwords. After creating your Android key, the agent sends you to the project's Signing tab. Click "Show keystore credentials" and save them.
    • Apple files. For iOS, upload your certificate and provisioning profile on the Signing tab yourself.
    • Your plan. If a build needs one, the agent sends you the pricing page. Your first month is $1.

    The builds themselves run inside your own GitHub repo; Corenna never copies your code (zero clone).

    If something doesn't work

    • The agent doesn't use Corenna. Check the server's toggle in Customize, then mention "Corenna" in your message.
    • Sign-in doesn't finish. Open the Output panel, choose "MCP Logs", and look for the error. Removing the server and adding it again usually clears it.
    • It still asks before every step. Check the Run Mode in Settings → Agents → Approvals & Execution, and that permissions.json is saved in ~/.cursor/.
    • The same build keeps failing. Ask the agent to show you the log lines it found. Some problems, like an expired Apple profile, need you on corenna.dev.

    Prefer Claude Code or ChatGPT?

    The same server works in Claude, ChatGPT and Claude Code, including Claude Code running in Cursor's terminal. The step-by-step setup for each is in How to connect your AI assistant.

    Keep reading