Deploy Strapi and its PostgreSQL database with your AI, over MCP (2026)
Your Strapi runs locally. Connected to while over MCP, your AI deploys it in France without a Dockerfile, with its PostgreSQL database backed up every day and your media kept safe in a bucket.
By Aloïs Oddon, co-founder of Nextmap. Facts checked on November 19, 2026.
The short version. Over MCP, your AI deploys your Strapi with while, in France, with its PostgreSQL database backed up every day and its media in an S3 bucket. What matters, like deleting a database, waits for a person’s approval.
Prerequisites
- A Strapi project, with its package.json.
- An AI that works in a terminal: Claude Code, Codex, Cursor or Gemini CLI.
Step 1: Give your AI this message
Open your AI in your app’s folder, and paste this message into it:
Connect to while with my account (while.sh/agents), then put my app on while.
Your AI adds while’s MCP server itself. If it asks you to, restart it. On the first call to while, a page opens in your browser. In Claude Code, if it doesn’t open, type /mcp, choose while, then Authenticate. On that page, choose “A new app”, then click Authorize.
Step 2: Open your app
Your AI gives you your app’s address, for example https://mon-cms.while.cloud, over HTTPS.
What your AI does
It writes while.yaml at the root of your project:
apiVersion: while/v1
project: mon-cms
services:
- name: web
port: 1337
health:
path: /_health
resources:
memory: 1Gi
env:
DATABASE_CLIENT: postgres
databases:
- name: main
buckets:
- name: medias
Strapi is detected as a Node.js app: it is built with npm run build, then started with npm start. It reads its database from DATABASE_URL, with DATABASE_CLIENT=postgres and the pg package, which your AI adds1. Your media files go into the bucket, through Strapi’s S3 provider2. Your AI generates Strapi’s keys, APP_KEYS, ADMIN_JWT_SECRET and the others, and stores them in while’s vault3.

Move to your own domain
You, to your AI: Put the app on cms.acme.com.
Your AI declares the domain, you add the DNS records it gives you, and the HTTPS certificate follows.
See a new version before you deploy it
You, to your AI: Show me the new version before you deploy it.
Your AI opens a preview, at its own address, with its own data. You look at it, and then your AI puts it into production.
Read your content from your AI
You, to your AI: How many articles were published this month?
Your AI reads Strapi’s database in SQL over MCP, with your permissions, and it can’t write to it.
Fix a vulnerability in your dependencies
You, to your AI: Fix the vulnerabilities in our dependencies.
Your app’s dependencies are checked against known vulnerabilities at every deployment, then every day. Your AI is warned of a serious vulnerability, and it updates the package involved.
Go back to the previous version
You, to your AI: Go back to the previous version.
In the 30 minutes after a production release, the previous version comes back in a second. After that, it takes a few seconds. Once the previous version is back, your AI reads what broke in while’s logs, fixes it and deploys again.
In the docs: PostgreSQL databases, Object storage (S3), Custom domain, Previews, Versions and rollback and Dependency vulnerabilities.
Next steps
Sources
- Strapi, database configuration, accessed November 2, 2026
- Strapi, the Amazon S3 provider for media, accessed November 2, 2026
- Strapi, environment variables, accessed November 2, 2026