{"slug": "publish-a-static-site-from-cursor-claude-code-or-vs-code-with-an-mcp-server", "title": "Publish a static site from Cursor, Claude Code or VS Code with an MCP server", "summary": "The SoFast team built a remote MCP server that lets coding assistants in Cursor, Claude Code and VS Code publish static sites directly, using OAuth sign-in instead of API keys. The server exposes tools such as upload_files, create_site, publish_site and delete_site, so an assistant can chain them to deploy a generated site to a *.sofast.website address with SSL and republish updates without changing the URL. The team notes the setup works with any remote MCP server that uses OAuth.", "body_md": "You ask Cursor or Claude Code for a landing page. Two minutes later you have an `index.html`, a stylesheet and a couple of images. Then the boring part starts: pick a host, create a project, drag files somewhere, wait for a deploy, copy the URL.\n\nI wanted the assistant that wrote the site to also put it online. So we built a remote MCP server for SoFast, the static hosting I work on. This post shows how to wire it up in Cursor, Claude Code and VS Code, and what actually happens when you ask the assistant to publish.\n\n*Disclosure: I'm on the SoFast team. The setup below works the same way with any remote MCP server that uses OAuth, so it's useful even if you host elsewhere.*\n\nThe server URL is:\n\n```\nhttps://mcp.sofast.host/mcp\n```\n\nThere's no API key. The first time the client connects, it opens a browser window, you sign in to SoFast and approve access. The assistant never sees your password, and you can revoke access from the SoFast dashboard at any time.\n\nOne command:\n\n```\nclaude mcp add --transport http sofast https://mcp.sofast.host/mcp\n```\n\nThen, inside Claude Code:\n\n```\n/mcp\n```\n\nPick `sofast` and sign in when the browser opens.\n\nAdd the server to `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` to make it available everywhere):\n\n```\n{\n  \"mcpServers\": {\n    \"sofast\": { \"url\": \"https://mcp.sofast.host/mcp\" }\n  }\n}\n```\n\nCursor asks you to sign in the first time a tool is used.\n\nIn the Chat view: **Customizations → Add MCP Server → HTTP**, then paste the URL. Or commit it with the project in `.mcp.json`:\n\n```\n{\n  \"mcpServers\": {\n    \"sofast\": {\n      \"type\": \"http\",\n      \"url\": \"https://mcp.sofast.host/mcp\",\n      \"tools\": [\"*\"]\n    }\n  }\n}\n```\n\nAsk:\n\nList my SoFast sites.\n\nIf you get a list (or \"no sites yet\"), you're connected.\n\nTry a prompt like this one:\n\nBuild a one-page portfolio for a freelance illustrator: hero, three project cards, contact section. Plain HTML and CSS. Then publish it on SoFast at a new address.\n\nBehind the scenes, the assistant chains a few tools:\n\n`upload_files`` upload_id`. Big sites can be sent in several calls with the same `create_site``<name>.sofast.website` with that `get_site_status`` index.html` at the root is the classic one).\nYou get back a live HTTPS URL.\n\nIf your client can run shell commands (Claude Code, Cursor's agent), there's a faster path for sites with lots of binary files. **`get_upload_link`** returns a one-time command that zips the folder and uploads it directly. It's valid for 15 minutes and a single upload. The assistant runs it, and the site is published as a new version.\n\nChange the headline to \"Available for new projects\" and republish my portfolio.\n\nThe assistant edits the file, calls `upload_files`, then **` publish_site`** on the existing site. The address doesn't change, and the previous version stays restorable from the dashboard. Small copy fixes happen without opening anything.\n\n| Tool | What it does | \n|---|---|\n| `list_sites` | Lists your sites with their address, status and last publish | \n| `get_site_status` | One site's status, file count and latest publish result | \n| `rename_site` | Changes the name shown in your dashboard (not the URL) | \n| `change_site_address` | Moves the site to a new `*.sofast.website` subdomain (once a day; old links break) | \n| `pause_site` /`unpause_site` | Takes a site offline or puts it back online | \n| `delete_site` | Doesn't delete anything: returns a link so *you* confirm it in the dashboard | \n\nTwo design choices worth copying if you build your own MCP server:\n\n`list_sites`, `readOnlyHint`, the rest are marked as writes or destructive, so clients can ask for confirmation before the risky ones.`delete_site` hands you a link instead.\nSites get a `*.sofast.website` address with SSL out of the box. On paid plans you can connect your own domain to each site from the dashboard, and the certificate is issued and renewed for you. Domains are managed in the dashboard, not through MCP.\n\nThe nice thing about remote MCP servers with OAuth is that setup is just a URL. Once it's added, \"publish this\" becomes part of the same conversation that built the site.\n\nFull setup for every client (including Claude and ChatGPT on the web): [sofast.host/mcp](https://www.sofast.host/mcp/).\n\nIf you've built an MCP server yourself, I'm curious how you handled destructive actions. Let me know in the comments.", "url": "https://wpnews.pro/news/publish-a-static-site-from-cursor-claude-code-or-vs-code-with-an-mcp-server", "canonical_source": "https://dev.to/pascal_couturier/publish-a-static-site-from-cursor-claude-code-or-vs-code-with-an-mcp-server-761", "published_at": "2026-11-30 18:39:19+00:00", "updated_at": "2026-11-30 18:45:19.034828+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "developer-tools"], "entities": ["SoFast", "Cursor", "Claude Code", "VS Code", "Anthropic"], "also_reported_by": [], "takeaway": "A remote MCP server using OAuth and readOnlyHint/destructive tool annotations lets coding assistants publish static sites via chained tools like upload_files, create_site and publish_site, with delete_site returning a confirmation link instead of deleting.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/publish-a-static-site-from-cursor-claude-code-or-vs-code-with-an-mcp-server", "markdown": "https://wpnews.pro/news/publish-a-static-site-from-cursor-claude-code-or-vs-code-with-an-mcp-server.md", "text": "https://wpnews.pro/news/publish-a-static-site-from-cursor-claude-code-or-vs-code-with-an-mcp-server.txt", "jsonld": "https://wpnews.pro/news/publish-a-static-site-from-cursor-claude-code-or-vs-code-with-an-mcp-server.jsonld"}}