Let AI coding agents deploy previews as a native tool
Configure PreviewShip as an MCP server so AI coding agents can deploy previews and manage fixed PreviewShip projects as native tool calls without copy-pasting commands.
Answer First
PreviewShip MCP server is the cleanest option when you want an agent to finish the preview workflow inside the coding conversation. Instead of asking the model to print commands for a human to run, the agent can call PreviewShip directly to deploy browser-ready output, return the fixed preview URL, list projects, set public or password access, inspect versions, rollback, redeploy latest, or delete a confirmed unused project.
Deploy build artifacts, not source-code zips.
If you upload a zip, build the project first and zip the static output folder such as dist, build, out, or public with index.html and assets. Do not zip raw React/Vue/Next source folders with package.json and node_modules. Single .html, .md/.markdown, and .pdf files are supported directly by console upload, CLI, MCP, and the VS Code/Cursor extension.
Key takeaways
Recommended workflow
Create an API key in PreviewShip.
Add the PreviewShip MCP server definition to your client configuration.
Expose `PREVIEWSHIP_API_KEY` in the MCP server environment.
Ask your agent to build first, then deploy the static output folder or a single .html/.md/.markdown/.pdf file and return the preview URL.
Ask the agent to use `list_projects`, `set_project_access`, `list_project_versions`, `rollback_project_version`, or `delete_project` only after it has the correct project ID and any required confirmation name.
Comparison snapshot
Why MCP is different from command suggestions
Many agents can suggest a deploy command, but that still leaves the human to switch context and run it. MCP changes that by turning deployment into an actual tool invocation.
For teams exploring agentic development, that difference matters. It shortens the loop from “build this UI” to “share a live preview.”
Where MCP fits in a delivery workflow
Use MCP for the handoff between code generation and stakeholder review. After the agent writes or edits the frontend, the same conversation can produce a live URL for review.
That makes PreviewShip particularly useful for design QA, prototype sharing, and rapid iteration cycles where speed is more important than full Git-based hosting automation.
For framework projects, instruct the agent to run the build step and deploy dist, build, out, or export. A single self-contained HTML, Markdown, or PDF document can be deployed directly.
Project tools agents can call
PreviewShip MCP includes deployment tools and project-management tools. That means an agent can reason about the whole preview lifecycle instead of only creating new links.
Destructive or state-changing actions still need clear intent. Deleting a project and rolling back a fixed URL require exact project-name confirmation so an agent does not change the wrong project.
Operational recommendation
Keep the CLI available even if MCP is your primary workflow. CLI remains useful for CI, fallback deploys, and environments where an MCP client is not available.
FAQ
Do I need MCP if the CLI already exists?
Not always. Use CLI when a human or script drives the deploy. Use MCP when you want the agent itself to complete the deploy step as a native tool action.
Which clients can use PreviewShip MCP?
Any MCP-compatible client can use it. Common examples include Claude Code, Cursor, and Windsurf.
Is MCP only useful for AI demos?
No. It becomes practical whenever your workflow includes an agent creating frontend changes and you want to review them immediately as a live site.
Should the agent deploy source code or build output?
Build output. Ask the agent to run the framework build first and deploy the generated static folder, or deploy a single .html, .md/.markdown, or .pdf file directly.
Can an MCP agent switch a password project back to public?
Yes. Use `set_project_access` with `visibility: "PUBLIC"`. PreviewShip clears the existing password and makes the fixed preview URL public again.
Can an MCP agent delete unused projects when Free is full?
Yes, if the user explicitly intends it and provides the exact project name confirmation. `delete_project` permanently removes the fixed preview URL, hosted project, deployment association, and Showcase item.