Comet
Comet MCP is an MCP server that connects Claude Code to Perplexity’s Comet AI browser.
This MCP server implements a multi-agent delegation pattern where Claude Code focuses on development tasks while Comet handles all web research, navigation, and interaction.
The architecture separates concerns: your coding agent maintains context for software development while a dedicated browsing agent manages web operations through a Chrome DevTools Protocol bridge.
Features
- 🔗 Automatic Browser Management: Launches and connects to Perplexity Comet with remote debugging without manual configuration
- 🌐 Full Web Interaction: Handles dynamic content, login flows, form submissions, and complex navigation that static APIs cannot process
- 📊 Real-Time Progress Monitoring: Polls active browser tasks to track long-running research operations and return results when complete
- 🖼️ Visual Context Capture: Takes screenshots of current browser state for debugging and verification
- 🔄 Multiple Operation Modes: Switches between search, research, labs, and learn modes for different task types
- ⚙️ Cross-Platform Support: Runs on macOS, Windows, and WSL2 with automatic platform detection and configuration
Use Cases
Deep Technical Research: Developers need to research complex topics that require reading multiple documentation sources, comparing framework capabilities, or understanding API patterns. Comet MCP delegates this multi-source research to Perplexity Comet while Claude Code maintains focus on implementing the findings into actual code. The browsing agent can navigate through nested documentation hierarchies and synthesize information across dozens of pages.
Authenticated Development Workflows: Teams working with private repositories, internal dashboards, or authenticated APIs need to check deployment status, review pull requests, or monitor service health. Comet MCP allows Claude Code to request these checks without implementing OAuth flows or session management. The browser agent handles login walls and cookie persistence while returning structured data back to the coding context.
Framework and Library Evaluation: Choosing between competing libraries requires hands-on exploration of documentation quality, community activity, and real-world usage patterns. Comet MCP can explore GitHub repositories, read issue discussions, check npm download trends, and review Stack Overflow solutions.
Real-Time API and Service Monitoring: Production debugging often requires checking external service status pages, API health endpoints, or third-party service dashboards. Comet MCP provides on-demand access to these resources without context switching. The browser agent can monitor status pages during development and alert Claude Code to relevant changes that might affect implementation decisions.
How to Use It
Table Of Contents
Installation and Configuration
Add the Comet MCP server to your Claude Code configuration. The configuration file lives at ~/.claude.json or .mcp.json in your project directory. Open this file and add the following server definition to the mcpServers object:
{
"mcpServers": {
"comet-bridge": {
"command": "npx",
"args": ["-y", "comet-mcp"]
}
}
}The npx -y flags tell Node Package Execute to automatically install and run the latest version of comet-mcp without prompting for confirmation. This setup requires no global installation and automatically stays current with package updates.
Perplexity Comet Installation
Download and install Perplexity Comet from the official website at https://www.perplexity.ai/comet. The browser application must be installed before the MCP server can establish a connection. The MCP server automatically detects your platform and locates the Comet installation in standard directories.
macOS: Comet installs to /Applications/Comet.app by default
Windows: Comet installs to %LOCALAPPDATA%\Perplexity\Comet\Application\ by default
The MCP server launches Comet with remote debugging enabled on port 9222 when no existing connection is found. This automatic launch happens during the first comet_connect tool call in your session.
WSL2 Configuration Requirements
Windows Subsystem for Linux version 2 requires mirrored networking mode to communicate with Windows applications. This configuration allows WSL2 to access the Comet browser running on the Windows host system.
Create or edit the file %USERPROFILE%\.wslconfig on your Windows system. Add these lines to enable mirrored networking:
[wsl2]
networkingMode=mirroredRestart WSL2 to apply the networking changes. Run this command from Windows PowerShell:
wsl --shutdownOpen a new WSL terminal after shutdown completes. The MCP server automatically detects the WSL2 environment and uses PowerShell.exe to communicate with the Windows-side Comet installation through the mirrored network interface.
If mirrored networking is unavailable on your WSL2 version, the MCP server displays a detailed error message with alternative configuration steps. You can also run Claude Code directly from Windows PowerShell to avoid WSL networking complexity.
Custom Installation Paths
Set the COMET_PATH environment variable if Comet is installed in a non-standard location. Add this to your MCP server configuration:
{
"mcpServers": {
"comet-bridge": {
"command": "npx",
"args": ["-y", "comet-mcp"],
"env": {
"COMET_PATH": "/custom/path/to/Comet"
}
}
}
}macOS paths: Provide the full .app bundle path like /custom/path/Comet.app
Windows paths: Provide the executable directory like C:\Custom\Path\Comet\Application\
Basic Usage Patterns
Restart Claude Code after making configuration changes. The tools become available once the MCP server initializes successfully. Use natural language requests that describe high-level goals rather than step-by-step browser instructions:
You: "Use Comet to research the top JavaScript frameworks in 2025"
Claude: [calls comet_connect, then comet_ask with your research query]The comet_ask tool sends your task to Perplexity Comet and waits for completion. Comet handles all navigation decisions, search queries, and content synthesis. Results return to Claude Code as structured data.
For authenticated operations:
You: "Log into my GitHub account and check notification status"
Claude: [delegates login flow and navigation to Comet]Comet persists session cookies and handles multi-factor authentication prompts. The browser agent completes the authentication flow without exposing credentials to the MCP server or Claude Code.
Available MCP Tools
comet_connect: Establishes connection to Comet browser. The MCP server automatically launches Comet with remote debugging if no connection exists. This tool initializes the Chrome DevTools Protocol session and verifies browser responsiveness. Parameters: none.
comet_ask: Sends a task request to Comet and waits for completion. The task parameter accepts natural language instructions. Comet determines the necessary navigation steps, search queries, and content extraction. This tool blocks until Comet returns results or reaches timeout. Parameters: task (string, required) – the research or browsing goal.
comet_poll: Checks progress on long-running tasks. Use this tool to monitor research operations that take more than a few seconds. Returns current status and partial results if available. The tool does not block and returns immediately with state information. Parameters: none.
comet_stop: Cancels the current browser task. Interrupts navigation, closes active tabs, and resets Comet to idle state. Use this when tasks take too long or produce irrelevant results. Parameters: none.
comet_screenshot: Captures the current browser viewport as an image. Returns base64-encoded PNG data that Claude Code can analyze or save. Use this for debugging navigation issues or verifying page state. Parameters: none.
comet_mode: Switches Comet operation modes. Available modes control how Comet processes tasks and presents results. Parameters: mode (string, required) – one of “search”, “research”, “labs”, or “learn”. Each mode optimizes for different task types and result formats.
Mode Selection
search: Quick lookups and single-page results. Returns concise answers from the first relevant source. Use this for API documentation lookups, error message resolution, or command syntax checks.
research: Multi-source synthesis and comprehensive analysis. Explores multiple sites, compares information, and generates detailed reports. Use this for technology evaluation, best practices research, or problem investigation.
labs: Experimental features and interactive exploration. Provides access to beta capabilities and advanced browsing modes. Use this for cutting-edge features or specialized workflows.
learn: Educational content and tutorial discovery. Optimizes for learning resources, video content, and step-by-step guides. Use this for onboarding to new technologies or skill development.
Switch modes based on task complexity and required depth. Simple lookups need search mode. Framework comparisons need research mode.
Communication Pattern
The MCP server acts as a bridge between Claude Code and Comet. The flow follows this pattern:
Claude Code → MCP Server → Chrome DevTools Protocol → Comet Browser → Perplexity AIClaude sends high-level goals through MCP tools. The MCP server translates these to CDP commands. Comet receives browser automation instructions and delegates actual browsing to Perplexity AI. Results flow back through the same chain.
This architecture keeps context separation clean. Claude Code maintains your development context and code state. Comet maintains browser state and navigation history. Neither agent sees the full context of the other, preventing context window pollution.
Port Configuration
The MCP server connects to Comet on port 9222 by default. This port matches Chrome DevTools Protocol conventions. If port 9222 is occupied, you must either terminate the conflicting process or configure Comet to use an alternative port.
Check port availability on Unix systems:
lsof -i :9222Check port availability on Windows:
netstat -ano | findstr :9222If another application uses port 9222, kill the process or modify your Comet launch arguments to specify a different debugging port.
Error Recovery
The MCP server implements automatic reconnection for transient failures. If Comet crashes or disconnects, the next tool call attempts to relaunch and reconnect. This recovery happens transparently without manual intervention.
If connection failures persist, verify these conditions:
Port availability: Another application may bind port 9222. Check with netstat or lsof.
Installation path: Comet must exist at the expected location. Verify the executable exists at the default path or your custom COMET_PATH.
Process permissions: The MCP server needs permission to launch child processes. Some security software blocks process creation.
Network configuration: WSL2 requires mirrored networking. Verify your .wslconfig settings if running from WSL.
FAQs
Q: Can I use Comet MCP with other MCP clients besides Claude Code?
A: Yes. Any MCP client that implements the Model Context Protocol can use this server.
Q: Does Comet MCP expose my browser history or personal data to Claude?
A: No. The server only passes task results back to Claude. Comet manages its own browsing session and cookie storage. The MCP bridge never sends navigation history, credentials, or session tokens to the Claude context.
Q: What happens if Comet encounters a CAPTCHA or bot detection?
A: Perplexity Comet handles anti-bot measures through its own systems. The MCP server cannot bypass CAPTCHAs directly. If Comet fails to solve a challenge, the task returns an error. You can manually complete the CAPTCHA in the Comet window and retry the task.
Q: Can I run multiple Comet tasks in parallel?
A: No. Comet processes one task at a time. The comet_ask tool blocks until the current task completes. Use comet_stop to cancel a running task before starting a new one. Parallel browsing requires multiple Comet instances on different ports, which this server does not support.
Q: How do I debug failed tasks or unexpected results?
A: Use comet_screenshot to capture the current page state. The image shows where navigation stopped or what content Comet sees. Check if the page loaded correctly or if you need to adjust your task description. You can also manually open Comet to inspect the active tabs and console output.
Latest MCP Servers
Terminal
Cloudflare
Comet
Featured MCP Servers
Microsoft Work IQ
Better Icons
Apify
FAQs
Q: What exactly is the Model Context Protocol (MCP)?
A: MCP is an open standard, like a common language, that lets AI applications (clients) and external data sources or tools (servers) talk to each other. It helps AI models get the context (data, instructions, tools) they need from outside systems to give more accurate and relevant responses. Think of it as a universal adapter for AI connections.
Q: How is MCP different from OpenAI's function calling or plugins?
A: While OpenAI's tools allow models to use specific external functions, MCP is a broader, open standard. It covers not just tool use, but also providing structured data (Resources) and instruction templates (Prompts) as context. Being an open standard means it's not tied to one company's models or platform. OpenAI has even started adopting MCP in its Agents SDK.
Q: Can I use MCP with frameworks like LangChain?
A: Yes, MCP is designed to complement frameworks like LangChain or LlamaIndex. Instead of relying solely on custom connectors within these frameworks, you can use MCP as a standardized bridge to connect to various tools and data sources. There's potential for interoperability, like converting MCP tools into LangChain tools.
Q: Why was MCP created? What problem does it solve?
A: It was created because large language models often lack real-time information and connecting them to external data/tools required custom, complex integrations for each pair. MCP solves this by providing a standard way to connect, reducing development time, complexity, and cost, and enabling better interoperability between different AI models and tools.
Q: Is MCP secure? What are the main risks?
A: Security is a major consideration. While MCP includes principles like user consent and control, risks exist. These include potential server compromises leading to token theft, indirect prompt injection attacks, excessive permissions, context data leakage, session hijacking, and vulnerabilities in server implementations. Implementing robust security measures like OAuth 2.1, TLS, strict permissions, and monitoring is crucial.
Q: Who is behind MCP?
A: MCP was initially developed and open-sourced by Anthropic. However, it's an open standard with active contributions from the community, including companies like Microsoft and VMware Tanzu who maintain official SDKs.



