perplexity-comet-mcp — Claude Code MCP server: agent-driven Comet
Connects Claude to the Perplexity Comet browser so the agent can open pages, click through them and pull data while you keep coding.
claude mcp add --env COMET_PATH=<COMET_PATH> --env COMET_PORT=<COMET_PORT> --transport stdio perplexity-comet-mcp -- npx -y perplexity-comet-mcpWhat perplexity-comet-mcp does
The server exposes a set of tools Claude can call against Comet. comet_connect launches the browser on a debug port, comet_ask sends a prompt and waits for the finished answer, comet_poll reports which step a task is on, and comet_stop halts it when the agent wanders off. There is also comet_screenshot for a PNG of the current view and comet_mode for switching Perplexity between search, research, labs and learn.
Tab control lives in comet_tabs: list, switch, close. Closing the last external tab is blocked, which keeps Comet from crashing, and internal pages such as chrome:// are filtered out of the listing. Dropped connections recover on their own with exponential backoff. Completion is detected by watching page stability instead of waiting out a fixed timeout.
You need Node.js 18 or higher and the Perplexity Comet browser installed. Windows, WSL and macOS all work. Point the server at the browser with COMET_PATH and COMET_PORT; without them it will not find Comet.
What it helps with
- scrape a site that sits behind a login
- pull product prices off a store page
- walk a list of links and return a summary
- jump between several open tabs
- stop the agent when it starts clicking the wrong things
Example prompts for the agent
- Connect to Comet and find out what's new in Python 3.12
- Open github.com/trending and list the top Python repositories
- Show me the open tabs and switch to stackoverflow.com
How to install perplexity-comet-mcp
Platform CLI
claude mcp add --env COMET_PATH=<COMET_PATH> --env COMET_PORT=<COMET_PORT> --transport stdio perplexity-comet-mcp -- npx -y perplexity-comet-mcpReplace <…> with your own values
Platform CLI
codex mcp add perplexity-comet-mcp --env COMET_PATH=<COMET_PATH> --env COMET_PORT=<COMET_PORT> -- npx -y perplexity-comet-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"perplexity-comet-mcp": {
"command": "npx",
"args": [
"-y",
"perplexity-comet-mcp"
],
"env": {
"COMET_PATH": "<COMET_PATH>",
"COMET_PORT": "<COMET_PORT>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"perplexity-comet-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"perplexity-comet-mcp"
],
"env": {
"COMET_PATH": "<COMET_PATH>",
"COMET_PORT": "<COMET_PORT>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e COMET_PATH=<COMET_PATH> -e COMET_PORT=<COMET_PORT> perplexity-comet-mcp npx -y perplexity-comet-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about perplexity-comet-mcp
How do I install perplexity-comet-mcp in Claude Code?
Run claude mcp add perplexity-comet-mcp -- npx -y perplexity-comet-mcp. To pass the browser path and port, use the variant with environment variables: claude mcp add --env COMET_PATH=<COMET_PATH> --env COMET_PORT=<COMET_PORT> --transport stdio perplexity-comet-mcp -- npx -y perplexity-comet-mcp.
What does perplexity-comet-mcp do?
It is an MCP server that links Claude to the Perplexity Comet browser. The agent gets tools for navigating sites, extracting data, managing tabs and switching Perplexity search modes.
What do I need to run it?
Node.js 18 or higher and the Perplexity Comet browser installed. The browser path and port go in through the COMET_PATH and COMET_PORT environment variables.