Connect your agent
The DeviceMock MCP server lets your coding agent make mockups. It puts screenshots or pages of your app into 3D devices and writes the images into your project. It runs on your computer and needs Node.js.
Add the MCP server
Run this in a terminal, in your project's folder:
claude mcp add devicemock -- npx -y devicemock mcp
Run this in a terminal:
codex mcp add devicemock -- npx -y devicemock mcp
Add this to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for all projects:
{
"mcpServers": {
"devicemock": {
"command": "npx",
"args": ["-y", "devicemock", "mcp"]
}
}
}Add this to .vscode/mcp.json in your project:
{
"servers": {
"devicemock": {
"type": "stdio",
"command": "npx",
"args": ["-y", "devicemock", "mcp"]
}
}
}Add a local (stdio) MCP server with this command:
npx -y devicemock mcp
Sign in
The MCP server requires access to an active Individual or Team plan. Both plans offer a 7-day free trial, which you can use once for your own plan. The first time your agent uses DeviceMock, it shows you a link and a code. Open the link, sign in, and select Allow if the code matches the one in your agent. Or sign in ahead of time in a terminal:
npx devicemock login
Each signed-in computer shows up in Settings, under Computers, where you can sign it out.
Ask your agent
For example:
Make a hero image of the home page at http://localhost:3000 in an iPhone, at an angle, on a soft gradient. Export it to public/hero.png.
DeviceMock renders in a browser on your computer. If Chrome or Edge isn't installed, the MCP server downloads a browser the first time it starts. It uses about 200 MB of disk space. Run npx devicemock setup to do that step on its own and test it.
Keep the images current Optional
Ask your agent to save the mockup. It's saved in your repo, in .devicemock/.
npx devicemock render makes the images again from fresh screenshots of your app. Run it manually, or in CI after each deploy. Set the DEVICEMOCK_API_KEY environment variable to your MCP key.
To find your MCP key, run npx devicemock status on a computer where the MCP server is signed in. Open the file shown after Credentials: and copy the key value for https://devicemock.app.
Your agent can also save mockups to your projects, and open the ones you made in the editor.