Skip to content

Draftbit MCP Server

Connect Claude Code, ChatGPT, Cursor, or another AI agent to your Draftbit account and work on your apps from there

The Draftbit MCP server lets an AI agent you already use work on your Draftbit apps: find them, prompt the Draftbit agent, read logs and code, save, and publish. It uses the Model Context Protocol (MCP), the same open standard that MCP Integrations use the other way round. There, Draftbit’s agent gets tools for other services. Here, your agent gets tools for Draftbit.

Every signed-in Draftbit user can connect an agent, on every plan. Your agent gets the same access you have in Draftbit, no more: the roles and plan limits that apply to you in the builder apply to it too. See Limits below.

The server is at https://mcp.draftbit.com/mcp. It uses the Streamable HTTP transport and signs you in through your browser with OAuth. There is no API key to create or paste.

  1. Add the server to your client.

    • Claude Code: run claude mcp add --transport http draftbit https://mcp.draftbit.com/mcp, then /mcp inside Claude Code to sign in. See Claude Code’s MCP documentation.

    • ChatGPT: add Draftbit as a custom connected app with the server URL. Where that’s set up depends on your ChatGPT plan; see OpenAI’s help on connected apps.

    • Cursor: add the server in Cursor’s MCP settings, or to its mcp.json:

      {
      "mcpServers": {
      "draftbit": {
      "url": "https://mcp.draftbit.com/mcp"
      }
      }
      }

      See Cursor’s MCP documentation.

    • Other clients: any MCP client that supports remote servers with OAuth sign-in can connect with the same URL.

  2. Sign in to Draftbit when your browser opens. If you don’t have an account yet, you can sign up here.

  3. On the consent screen, your client wants to use your Draftbit account, choose what the agent can do. See Permission levels.

  4. Select Allow. Your browser sends you back to your client, and the agent can start using Draftbit’s tools.

The consent screen offers up to three levels. Each one includes the levels before it.

LevelWhat the agent can do
ReadSee your apps, their status, logs and databases, and their code on paid plans.
BuildEverything in Read, plus change your apps and run the Draftbit agent.
PublishEverything in Build, plus publish to the web and app stores, send live updates, and set up custom domains.

Under the levels, the screen lists the permissions the agent will get. Some clients ask for fewer permissions than Draftbit offers, so you may see fewer levels.

To change the level later, connect the agent again and pick a different one. If you connected with Build and later ask the agent to publish, the publish tool tells it to send you back to Draftbit, where you sign in again and allow Publish.

The agent sees Draftbit’s tools by name. You don’t have to know them to work with it: ask for what you want in plain words, and it picks the tools. The names below help when you want to point it at something specific.

The agent lists your workspaces (list_organizations), the projects you can open (list_projects), and the apps in a project (list_apps). For one app, get_app returns its name, type, description, the prompt it was created from, and a link that opens it in Draftbit. get_app_status says whether the app is running, which agent threads are active, and where to look at it, without starting anything. get_backend_status does the same for an app’s Supabase project or API database.

With the Build level, the agent can:

  • Create a new project with one app from a prompt (create_app), for mobile (Expo) or web (Vite), with a Supabase backend, an API backend, or no backend. This starts the app’s first build, which spends your workspace’s credits unless it builds on your own AI, so the agent is told to confirm the idea with you first. Setting up takes about two minutes before the build starts, and retry_app_creation tries again when a setup fails.
  • Add an app to a project you already have (add_app): a mobile app, web app, website, API backend, or Supabase backend. This doesn’t start a build.
  • Duplicate an app into a new app in the same project (duplicate_app), as Duplicate App does in Draftbit, to try a risky change away from the original. The copy keeps the original’s environment variable values, so a copied frontend still talks to the same backend; point it at a separate backend before testing changes that write data.
  • Rename an app or project, or change its description (update_app).
  • Start and stop an app (start_app, stop_app). Starting an app takes one of your workspace’s open-project slots. When they’re all in use, the agent asks you which project to close.
  • Set an environment variable in one environment (set_env_var), adding it if it isn’t there. list_env_vars shows which variables are set where, but never their values. Removing a variable is done in Draftbit; the agent gives you the link.
  • Upload files to a project’s assets (upload_asset), list them (list_assets), and delete them (delete_asset) after you approve a summary naming what goes.

Your connected agent can hand work to Draftbit’s agent, the one that builds inside your app’s sandbox:

  • send_message prompts the Draftbit agent in a thread, or starts a new thread. get_agent_options lists the agents, models, and billing paths (Draftbit credits, your own subscription, or your own API key) the app can run, so the agent can choose. A message sent while the thread’s agent is busy waits in the thread’s queue.
  • get_thread_events reads the thread as Draftbit’s chat shows it and can wait for new events, so your agent follows the run live and relays what the Draftbit agent says. get_run_status is the cheap check for where a run stands: working, waiting for input, done, failed, or stopped.
  • When the Draftbit agent asks a question, your agent is told to ask you and pass on your answers (answer_agent_question), not to answer for you. When it writes a plan, you approve it or ask for changes (respond_to_plan). When it asks you to approve an action, your agent shows you exactly what it will do, and you approve or deny it (respond_to_approval). An approval covers that one action, exactly as shown.
  • stop_run stops a run and keeps what it changed so far. list_queued_messages, update_queued_message, and resume_queue manage the messages waiting in a thread.
  • list_threads and update_thread list, rename, archive, and restore threads. continue_in_new_thread starts a new thread from a summary of an old one, for example when a thread’s context has expired or you want to move to another agent or billing path.
  • When the Draftbit agent presents mockups, list_mockups and get_mockups show the options, and use_mockup builds the one you choose. list_briefs and get_brief read the plans, research, and reports the agent writes.

Runs spend your workspace’s credits unless the thread runs on your own AI, so the agent is told to check with you before sending work. See Credits.

list_files shows an app’s file tree on every plan. Reading and changing code needs the Standard plan or higher, as the code editor does:

  • read_file, search_files, and get_diff read a file, search the app’s code, and show unsaved changes against the last saved version.
  • write_file, move_file, and delete_file change files in the app’s unsaved work. Each one checks that the file hasn’t changed since the agent read it, so an edit never overwrites newer work, including the Draftbit agent’s. Environment files and the folders Draftbit manages, such as node_modules, .git, and yarn.lock, can’t be changed this way.
  • To add or remove a package, the agent edits package.json and Draftbit reinstalls dependencies. For Expo packages, it’s told to ask the Draftbit agent instead, which installs them with any setup they need.

Changing files needs the Editor role.

get_app_status returns the links for looking at an app:

  • Live preview page (previewPageUrl): a public page that shows the app’s unsaved work in a phone, tablet, or desktop frame, with a QR code. Anyone with the link can open it, with no password and no expiry. It never starts the app; when the app is asleep, it says so. Backends have no preview page.
  • Phone preview (devicePreviewUrl), for Expo apps while they run: the link behind the builder’s QR code, which opens the app in Draftbit’s Live Preview app on your phone. The agent also gets the QR code as an image, if its client can show one.
  • Simulators (simulatorUrl), for editors of Expo apps: opens the app’s iOS and Android simulators in Draftbit.

The live preview page is for quick looks at work in progress, by you or by people you trust: it changes as you build, and it shows work you haven’t saved. To send someone a stable version, use the share page instead (share_app, Publish level). A share link shows your last saved version, can take a password on the Standard plan and up, and expires after 30 days unless you change that in Draftbit.

For logs, get_preview_logs reads the preview’s recent output, bundler errors included, and restart_preview restarts the dev server behind the preview when it’s stuck. get_published_logs reads what a published web app or API logged while running in staging or production, from the last 7 days (Editor role). get_publish_logs reads a finished publish’s build log, with an option that lists only the errors and the lines before each one. See Preview Logs.

run_checks runs the TypeScript and ESLint checks behind Draftbit’s checks shield on the app’s unsaved work and returns each check’s result with the checker’s output. The agent is told to use it after changing files. Checks run for Expo, Vite, Astro, Hono, and CMS apps and need the Editor role.

For a Supabase backend, or an API backend’s D1, Supabase, or Postgres database:

  • get_database_schema lists the tables and columns of the development database.
  • query_database runs one read-only SQL statement and returns up to 200 rows. Only a single read statement runs. Anything that could write is refused before it reaches the database, and Supabase and Postgres databases run the statement read-only as well. D1 has no read-only mode, so there Draftbit relies on checking the statement first.

Queries on the development database run at once. Staging and production hold live user data, so the agent first shows you the query and the database it would read, and runs it only after you say go. Both tools need the Editor role.

  • save_changes saves the unsaved work as a new version in Version History. The agent shows you a summary of the files the version takes, and saves only once you approve. It can pass a message for the version, or let Draftbit write one from the changes. For an app connected to your own GitHub repository, saving also pushes a commit.
  • get_version_history lists saved versions, or the unsaved work’s history, and what each version changed.
  • restore_version puts the app, or one file or folder, back to an earlier saved version, as a new version on top of the history, after you approve the summary. Nothing is lost.
  • undo_change and redo_change undo and redo the latest change in the unsaved work, like Undo and Redo in Draftbit, whoever made it.

Discarding unsaved changes can’t be undone, so the agent can’t do it. get_discard_changes_link gives you the link to discard them in Draftbit.

Publishing needs the Publish level. Every publish uses the app’s saved version, so the agent is told to save first when you want unsaved changes included.

  • get_publishing_setup checks what’s set up for the web, the App Store, and Google Play, and what you still have to add in Draftbit, with Apple’s and Google’s checks of your saved keys. The agent never asks you for store keys; you add them on the Publishing page.
  • publish_web publishes to the app’s staging or production web address. For an API backend, it also runs the database migrations. unpublish_web takes a web publish offline, and set_custom_domain sets up, checks, or removes a custom domain (Standard plan and up).
  • publish_ios builds for iOS and uploads to App Store Connect, where it shows up in TestFlight. publish_android builds for Android and uploads to Google Play as a draft on the internal testing track. publish_ota_update sends an over-the-air update to installed store builds. create_testing_build makes a downloadable test build (Pro plan). Store builds count toward your workspace’s monthly native builds, and the summary says what a build costs before you approve it.
  • deploy_supabase_backend deploys a Supabase backend’s saved migrations, Edge Functions, and settings to staging or production.
  • get_publish_status follows a publish to the end, list_publishes lists a project’s publishes and who started each one, and cancel_publish cancels one that’s queued or running.
  • share_app turns the app’s share page on, rebuilds it with the latest save, or turns it off.

Once an app is in the stores, three Read-level tools need the Standard plan or higher and the store credentials saved in the app’s publishing settings: list_store_reviews reads recent App Store or Google Play reviews and your replies, get_store_release_status shows where your builds are in review and release, and get_store_health compares ratings, and on Google Play the crash rate, with the period before.

list_tasks, create_task, and update_task work the project’s task board: list tasks by column or assignee, add a task, and change its status, priority, assignees, tags, or linked thread. Deleting a task is done in Draftbit; the agent gives you the link. Tasks need the Editor role.

list_mcp_servers shows the MCP Integrations an app’s agents can use, whether each is on for the app, and its last recorded status. Connecting a server, signing in, and turning servers on or off are done in Draftbit, so the agent gives you the link. It never sees header values, tokens, or server URLs.

  • list_backups and create_backup list an app’s backups and start a new one of the saved version or the unsaved work (Pro plan). get_backup_download_link gets a link to download a finished backup. Anyone with the link can download the code until it expires, about 5 minutes later, so keep it to yourself.
  • get_zip_download_link gets a link to download the app’s saved code as a ZIP, which you open in a browser where you’re signed in to Draftbit.
  • export_to_github pushes the saved code to the repository and branch in the app’s GitHub Export settings, as one new commit that replaces everything on that branch or in its folder. The agent is told to ask you first.

Downloads and GitHub export need the Standard plan or higher, and all of these need the Editor role.

get_credit_balance, get_credit_usage, and get_billing_status show a workspace’s balance, what it spent over a period per app and thread, and its plan, usage against each limit, seats, and any failed payment. get_upgrade_link and get_credit_purchase_link return links to the upgrade dialog, to buy credits, or to turn on auto top-up. Nothing is charged through the agent: you review and pay in Draftbit, and if your role can’t buy, the agent tells you who can.

get_earn_credits, get_referral_link, and claim_credit_reward cover the Earn Credits page: your referral link, the challenges you can complete, and claiming an approved reward into a workspace you own.

list_feature_requests and get_feature_request search and read Draftbit’s feature-request board, which all Draftbit users share. request_feature, vote_feature_request, and comment_on_feature_request file a request or bug report about Draftbit, vote, and comment, in your own words and only when you ask.

To tell the Draftbit team something privately, ask your agent to send feedback. send_feedback sends feedback, a bug report, or an idea that only the Draftbit team sees, about Draftbit or about the Draftbit MCP server itself, and it can name the app it’s about. Use the board when you want other users to see a request, vote on it, and follow its progress, and feedback for anything you’d rather keep between you and the Draftbit team. Like the board tools, it needs Build and sends only what you ask it to, in your own words.

Draftbit’s MCP server also offers four prompts, which clients such as Claude Code show as slash commands (/mcp__draftbit__build_feature). A prompt adds nothing the tools can’t do: it gives your agent the steps for a common job, in order, and says where to stop and ask you. Each one takes the app’s ID, or finds the app with you when you leave it out.

CommandWhat it does
build_featurePlans a feature with the Draftbit agent in plan mode, follows the run, relays its questions to you, shows you the plan to approve or revise, gives you the live preview page to try the result, and saves once you’re happy. Needs Build.
check_appChecks whether an app’s preview runs. It asks before starting a stopped app, reads the preview logs and explains any errors, offers to restart the preview or have the Draftbit agent fix the code, and gives you the preview links.
fix_failed_buildFinds a failed publish (the one you name, or the app’s latest), reads its build log, explains the cause, and, when it’s in the code, has the Draftbit agent fix it, saves, and starts the same kind of publish again. When the cause is setup, such as an expired key, it sends you to Draftbit.
publish_iosChecks the app’s iOS setup, asks whether to build for production or staging, shows you the build summary with its cost, builds the saved version, uploads it to TestFlight, and follows the build to the end. Needs Publish.

Every prompt tells the agent to check with you before anything that spends credits, before building a plan, before saving, and before publishing. When the Draftbit agent asks a question, the prompt has your agent ask you rather than answer on your behalf.

Actions that are hard to undo show you a summary first. The agent calls the tool and gets back a summary of what will happen, to which app, and what you’ll see, with the instruction to show it to you and wait for your go-ahead before it calls the tool again. Draftbit can’t check that the agent asked, so this depends on the agent following its instructions. Some actions, such as turning on a share link with share_app, have no summary; the agent is told to check with you first. The summary step covers publishing to the web and the stores (publish_web, publish_ios, publish_android, publish_ota_update, create_testing_build, deploy_supabase_backend), taking a site offline (unpublish_web), saving (save_changes), restoring a version (restore_version), deleting assets (delete_asset), and queries on a staging or production database (query_database).

The summary stands for a few minutes. When the agent confirms, Draftbit checks that what the summary stated still holds, such as a build’s cost and version or the files a save takes. If something differs, the agent gets a new summary to show you.

Some actions stay in Draftbit, because they can’t be undone or need the builder. The agent gets a link and what the action removes, and nothing changes until you do it there: deleting an app, a project, a set of mockups, or a task, discarding unsaved changes, and removing an environment variable.

Tools that remove or overwrite something, such as writing a file or archiving a thread, are marked destructive for the client, and many clients ask you before running those.

  • Roles. Your agent has your role in each workspace. Viewers can read, preview and build logs included; changing anything, starting an app, and reading a published app’s runtime logs, databases, backups, and tasks need the Editor role or higher. When your role can’t do something, the agent tells you who in the workspace can. See Team and seats.
  • Plans. Reading and editing code, downloading code, GitHub export, custom domains, and the store tools need Standard or higher. Backups, test builds, and simulators need Pro. On the Free plan, runs on Draftbit credits use Codex; Claude Code needs a paid plan, or your own Claude subscription or Anthropic API key. The agent returns an upgrade link when a plan stands in the way. See Plans and pricing.
  • Workspace limits. The open-project limit, the number of agents running at once, the weekly agent runs on Free, and monthly native builds apply as they do in the builder. When a run can’t start, the agent tells you why.
  • Sandboxes. Reading an app’s files, logs, or preview needs its sandbox running. Read tools don’t start a stopped app on their own: the agent asks you first, since starting one takes an open-project slot. Build tools start it when they need it.
  • Deleting and discarding. The agent can’t delete an app or project, delete mockups or tasks, or discard unsaved changes. It sends you to Draftbit for those.
  • Secrets. The environment variable, publishing setup, and MCP integration tools never return variable values, store keys, or integration tokens and URLs. Logs are different: preview and published logs hold whatever your app prints, so if your app logs a secret, the agent can read it there.