Deploy from Claude Code to Your Own Server
Short answer: Connect Claude Code to NameOcean's MCP server with one command, then ask it in plain words to put your app on a new server. It creates the server, adds your SSH key, writes the nginx and process settings, pushes your code and checks the live URL. In our test a small Flask app was live on its own HTTPS address 2 minutes 27 seconds after we pressed Enter, and the next change took about a minute. The server is a real Linux machine you can SSH into, from $5 a month and billed by the hour.
What you need
- Claude Code and git on your computer, and an SSH key (
~/.ssh/id_ed25519.puborid_rsa.pub). - A NameOcean account with two-step login turned on (app connections need it), and a card or credit for the server.
- An app in a git repository. We used the smallest Flask app there is:
# app.py
from flask import Flask
app = Flask(__name__)
@app.get("/")
def home():
return "Hello from my own server!\n"
with flask in requirements.txt. Django, FastAPI, Node.js, Next.js and Go work the same way; only the start command differs.
Let your AI deploy it
Connect Claude Code to NameOcean and ask it to create a server, deploy your app and point your domain. App servers from $5/month, billed by the hour.
claude mcp add --transport http nameocean https://nameocean.net/mcp
Cursor, VS Code and other clients →
1. Connect Claude Code to NameOcean
claude mcp add --transport http nameocean https://nameocean.net/mcp
Start Claude Code, type /mcp, choose nameocean and Authenticate. A NameOcean page opens in your browser: sign in, enter your two-step code and choose what Claude may do. Tick Billing if it should create the server for you; it is off by default, so a connected app can't spend money unless you allow it. Back in the terminal, /mcp shows nameocean as connected. Nothing is installed on your computer: the server runs at nameocean.net.
2. Ask for the deploy
In your project folder, ask:
Deploy this Flask app to a new NameOcean app server on the Starter plan.
Use my SSH public key ~/.ssh/id_rsa.pub for git push. When it is live, give me the URL.
Creating a server costs money, so it happens in two steps: Claude first gets the price and shows it to you (Starter: 3 CPU, 3 GB memory, 30 GB disk, $5/month), and creates the server only after your yes.
What happened, step by step
This is the log from our run, with the NameOcean tools Claude called:
| Step | Tool |
|---|---|
| Read the project and the SSH key | (local) |
| Listed the plans and their prices | list_server_plans |
| Got the price, then created the server after the yes | create_server ×2 |
| Read how deploys work on this server | get_deploy_guide |
| Waited until the server was running (about a minute) | get_server |
| Added the SSH key for git push | add_ssh_key |
| Wrote the deploy files, committed, pushed to the server's git remote | git push |
| Checked the commit arrived, restarted the app, recorded the deploy | finish_deploy |
| Read the app log and opened the URL: HTTP 200 | read_logs, curl |
The app was live at https://<id>.nameocean.org, a free HTTPS address every server gets.
The files it wrote
Every NameOcean app server has a git remote. On each git push the server checks out your code and runs .nameocean/deploy.sh if your project has one. Claude used that and kept the whole server setup in the repository:
.nameocean/deploy.sh: installsrequirements.txt, copies the two files below into place and reloads them..nameocean/supervisor.conf: runs the app with gunicorn on127.0.0.1:8000and restarts it if it crashes. (It also addedgunicorntorequirements.txt.).nameocean/nginx.conf: forwards web traffic to the app and refuses dotfiles such as.gitand.env. HTTPS ends at NameOcean's load balancer, so there are no certificates to manage.
#!/bin/bash
# .nameocean/deploy.sh: runs on the server after every git push (cwd: /root/app)
set -e
/root/.pyenv/versions/app/bin/pip install -q -r requirements.txt
cp .nameocean/nginx.conf /root/conf/nginx.conf
cp .nameocean/supervisor.conf /root/conf/supervisor.conf
nginx -t
supervisorctl reread
supervisorctl update
Because nothing was edited by hand on the server, you can rebuild it from the repository at any time, and you can read every line before it runs.
The next change takes a minute
We then asked: "Add a /health route that returns ok, deploy it to my hello-flask server, and check it works." Claude edited app.py, committed, pushed, called finish_deploy and fetched /health: 65 seconds in total. From here on a deploy is just a git push, with or without the AI.
Put it on your own domain
Ask "Serve this app on app.example.com". Claude calls bind_domain, and NameOcean writes the DNS records and gets the certificate itself. The domain's DNS has to be on NameOcean for this; hosting DNS on NameOcean is free, and Claude can create the zone for you (create_dns_zone) before you switch the nameservers. The git push guide has the same steps without an AI.
When something breaks
Ask "My app returns 502, find out why". Claude reads the app's own log, nginx's log and the deploy history (read_logs, list_apps, list_deploys), fixes the code or the config in your repository and deploys again. Secrets go in with set_env: every app gets them, and the AI only ever sees their names, never the values.
What it costs and what the AI can't do
- The Starter server is $5/month, billed by the hour. Our test server ran for four minutes before we deleted it, so it cost well under a cent.
- Claude can't buy or renew a domain or add credit. It puts a domain in your cart and gives you the checkout link.
- It can't delete a server: you do that in the dashboard. Tools that stop, restore or delete something else are marked destructive, so Claude Code asks you first.
- Everything it changes is in Dashboard → Activity, and you can disconnect it in Connected apps.
FAQ
Does it work with Cursor or VS Code?
Yes. The same server URL works in Cursor, VS Code, Claude Desktop, claude.ai and OpenCode; the MCP page has the settings for each. nameocean mcp install from the CLI adds it to every client it finds.
Is it a container platform like Heroku?
No. You get a whole Linux server (Rocky Linux, AlmaLinux, Debian or Ubuntu) with root SSH, nightly backups and its own IPv6 address. Nothing hides it from you, and anything you can install on Linux runs on it.
Can I use it without an AI?
Yes. Create the server in the dashboard or with nameocean servers create, then git push to its remote. The AI does the same steps through the same API.
Can I use an API key instead of the browser sign-in?
Yes, for CI or a headless machine: send Authorization: Bearer no_live_… with the requests. The key's scopes decide what the tools may do. That is how we ran the test in this article.
Ready to try it? Run claude mcp add --transport http nameocean https://nameocean.net/mcp and ask Claude to deploy your app.
Let your AI deploy it
Connect Claude Code to NameOcean and ask it to create a server, deploy your app and point your domain. App servers from $5/month, billed by the hour.
claude mcp add --transport http nameocean https://nameocean.net/mcp
Cursor, VS Code and other clients →