Skip to content

OneStepAt4time/asteria

Repository files navigation

Asteria Banner

version license CI node MCP platform

Give any AI agent direct control over Perplexity Comet via the Model Context Protocol.


What is Asteria?

Asteria is an MCP server that bridges your AI assistant (Claude Code, OpenClaw, Cursor, or any MCP client) with Perplexity Comet — the agentic browser that researches, browses, and answers questions autonomously.

Unlike simple search APIs, Comet can navigate pages, follow links, and reason over live web content. Asteria exposes all of that through 12 clean MCP tools via Chrome DevTools Protocol (CDP) — no Puppeteer, no Playwright.

graph LR
  A["AI Agent\n(Claude / GPT / Gemini)"] -->|"MCP stdio"| B["Asteria\nMCP Server"]
  B -->|"CDP WebSocket"| C["Perplexity\nComet Browser"]
  C -->|"HTTP requests"| D["Web Pages\n& Sources"]
  D -->|"Response + Sources"| C
  C -->|"Research results"| B
  B -->|"Formatted response"| A
Loading

Demo

Asteria Demo
Claude Code calls comet_ask → Comet researches the web → sources and answer flow back to the agent

GIF coming soon. Star the repo to get notified on release.


Features

Feature Description
🔌 12 MCP tools Connect, ask, poll, stop, screenshot, mode switch, tab management, source extraction, conversation history
Non-blocking polling Submit a prompt and poll for completion — agent keeps working while Comet researches
🔍 Auto-detect Comet Finds Comet on Windows and macOS, launches it with the correct debug port
🔄 Auto-reconnect Exponential backoff with health checks — survives Comet restarts without dropping the session
🧠 Version-aware selectors Auto-detects Comet's Chrome version and routes to the right CSS selectors
📑 Tab categorization Tracks main, sidecar, agent-browsing, and overlay tabs separately
🚫 Zero browser dependencies No Puppeteer or Playwright — uses CDP directly via chrome-remote-interface
🛠️ CLI included asteria detect to check installation, asteria snapshot to capture DOM structure

Requirements

  • Node.js >= 18
  • Perplexity Comet installed and running
  • Windows or macOS (Linux: manual COMET_PATH required)

Installation

npm install -g @onestepat4time/asteria

Note: The package is currently in active development. Until published to npm, install from source:

git clone https://github.com/OneStepAt4time/asteria.git
cd asteria && npm install && npm run build && npm link

Quick Start

1. Add to your MCP client config

Claude Code (~/.claude/claude_desktop_config.json):

{
  "mcpServers": {
    "asteria": {
      "type": "stdio",
      "command": "asteria",
      "args": ["start"]
    }
  }
}

Cursor (~/.cursor/mcp.json) — same format.

2. Make sure Comet is running

Open Perplexity Comet on your machine. Asteria auto-detects it.

3. Use in your agent

> Ask Perplexity what the latest AI research papers are this week

Asteria launches (or connects to) Comet, sends the query, waits for the full research response, and returns it — with cited sources — to your assistant.


Tools

Tool Description Example Use Case
comet_connect Connect to or launch Perplexity Comet Start a session before other tools
comet_ask Send a prompt and start an agentic search "Summarize the latest news about quantum computing"
comet_poll Check current agent status Monitor long research queries non-blocking
comet_stop Stop the running agent Cancel a query that's taking too long
comet_screenshot Capture a screenshot of the active tab Visually verify what Comet is showing
comet_mode Get or switch search mode Switch to Deep Research for thorough analysis
comet_list_tabs List all open tabs by category See what pages Comet opened during research
comet_switch_tab Switch focus to a specific tab Read content from an agent-browsed page
comet_get_sources Extract cited sources from the last response Get the URLs Comet cited in its answer
comet_list_conversations List recent Comet conversations Find a previous search to reference
comet_open_conversation Open a conversation by URL Resume a past research session
comet_get_page_content Extract full text from the active page Read what Comet found on a browsed page

CLI

asteria start      # Start MCP stdio server
asteria detect     # Detect Comet installation path and debug port
asteria --version  # Print version
asteria --help     # Print help

Configuration

All settings can be overridden via environment variables:

Variable Default Description
ASTERIA_PORT 9222 CDP debug port
COMET_PATH auto-detect Path to Comet executable
ASTERIA_LOG_LEVEL info Log level: debug / info / warn / error
ASTERIA_TIMEOUT 30000 Comet launch timeout (ms)
ASTERIA_RESPONSE_TIMEOUT 120000 Max wait for response (ms)
ASTERIA_POLL_INTERVAL 1000 Status poll interval (ms)
ASTERIA_SCREENSHOT_FORMAT png Screenshot format: png / jpeg
ASTERIA_MAX_RECONNECT 5 Max reconnection attempts
ASTERIA_RECONNECT_DELAY 5000 Max reconnection backoff delay (ms)

How It Works

Connection Flow

  1. comet_connect — checks if Comet is running on port 9222, launches it if not, closes extra tabs
  2. comet_ask — types the prompt into Comet's input field, submits it, begins polling
  3. Status detection — monitors stop buttons, spinners, and body text to detect working / idle / completed
  4. Response extraction — reads prose elements, filters UI chrome, returns clean text + sources

Architecture

graph TD
  subgraph MCP["MCP Protocol Layer"]
    T1[comet_connect] & T2[comet_ask] & T3[comet_poll]
    T4[comet_stop] & T5[comet_screenshot] & T6[comet_mode]
    T7[comet_list_tabs] & T8[comet_switch_tab]
    T9[comet_get_sources] & T10[comet_list_conversations]
    T11[comet_open_conversation] & T12[comet_get_page_content]
  end

  subgraph UI["UI Automation"]
    S[Selector Strategies]
    I[Prompt Input]
    ST[Status Detection]
    EX[Content Extraction]
  end

  subgraph CDP["CDP Transport"]
    BR[Browser Launcher]
    CO[WebSocket Connection]
    TA[Tab Management]
    RC[Auto-Reconnect]
  end

  T2 --> I
  T3 --> ST
  T9 --> EX
  T5 & T7 --> TA
  I & ST & EX --> S
  CO --> BR
  TA & RC --> CO
  CO --> Comet[Perplexity Comet]
Loading

Roadmap

  • npm publish — release @onestepat4time/asteria to the public registry
  • Streaming responses — stream Comet responses token-by-token instead of polling
  • MCP Resources — expose Perplexity pages as MCP resources for direct reading
  • Multi-Comet sessions — control multiple Comet instances simultaneously
  • HTTP/SSE transport — support N8N and REST clients in addition to stdio
  • Browser extension — package as a browser extension for tighter integration

Contributing

Contributions are welcome! Please open an issue before submitting large PRs.

git clone https://github.com/OneStepAt4time/asteria.git
cd asteria
npm install
npm run build
npm test

See contributing.md for code style, adding Comet versions, and commit conventions.


Support the Project

If Asteria saves you time, consider:

GitHub Sponsors   Ko-fi


License

MIT © 2026 OneStepAt4time

About

MCP server for Perplexity Comet browser management via Chrome DevTools Protocol

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors