# Cursor browser automation with a browser MCP

> Add the Dejo browser MCP server to Cursor with one mcp.json entry, then let Cursor's agent use websites.

Canonical: https://dejo.run/docs/cursor

> For AI agents: the index of this site is https://dejo.run/llms.txt, and every page is also served as markdown (add .md to its address, or send Accept: text/markdown).

Give Cursor's agent a browser that remembers websites. The first time it does a task on a site, it explores and Dejo learns the route. After that, the same task is one tool call.

You need **Python 3.11 or newer** and Cursor.

## 1. Install Dejo

```bash
pip install dejo-mcp
playwright install chromium
```

## 2. Add it to Cursor

Open `~/.cursor/mcp.json` (make it if it does not exist) and add Dejo under `mcpServers`:

```json
{
  "mcpServers": {
    "dejo": {
      "type": "stdio",
      "command": "dejo-mcp"
    }
  }
}
```

This makes Dejo available in every project. Save the file and restart Cursor.

If `dejo-mcp` is not found, put its full path in `command`. `dejo doctor` working in a terminal means the command is on your `PATH`.

## 3. Check it is on

Open **Customize > MCPs** in the sidebar. Dejo should be listed with its tools, and switched on. If something is wrong, the **Output** panel has an **MCP Logs** view with the server's messages.

## 4. Ask for something

In a new chat, ask in your own words:

> Go to github.com/microsoft/playwright and tell me how many open issues it has.

The first time, the agent learns the site: `dejo_run` shows the page, and the agent sends the steps in its next call. Ask again in a new chat and `dejo_run` answers in one call.

## Settings

Dejo's settings are environment variables. In `mcp.json` they go in `env`:

```json
{
  "mcpServers": {
    "dejo": {
      "type": "stdio",
      "command": "dejo-mcp",
      "env": { "DEJO_PROFILE": "/home/you/.dejo/profile-b" }
    }
  }
}
```

Sites that need a sign-in: see [Signing in](https://dejo.run/docs/sign-in).


## FAQ

## FAQ

### Should I add Dejo for one project or for all of them?

Usually all of them: put it in ~/.cursor/mcp.json. Use .cursor/mcp.json inside a project only if you want Dejo in that project alone. If both files name the same server, the project one wins.

### Why does Cursor ask before every Dejo call?

Cursor asks for approval before using MCP tools by default. That is a Cursor setting, not something Dejo controls.

## Related

- [Dejo MCP server setup: install in a minute](https://dejo.run/docs)
- [Browser automation in Claude Code: add a browser MCP](https://dejo.run/docs/claude-code)
- [Browser automation in Codex: the config.toml setup](https://dejo.run/docs/codex)
- [Keep your AI agent signed in to websites](https://dejo.run/docs/sign-in)
- [When a website changes: how Dejo replays safely](https://dejo.run/docs/when-the-site-changes)
- [Dejo MCP tools reference](https://dejo.run/docs/tools)
- [Troubleshooting Dejo](https://dejo.run/docs/troubleshooting)
