Plasmate for Cursor

April 12, 2026 ยท View on GitHub

Browser engine for AI agents - Convert HTML to Semantic Object Model (SOM) with 10-100x token compression.

Features

  • Fetch Page: Fetch any URL and convert to SOM, text, or markdown
  • Extract Text: Extract readable text content from web pages
  • Extract Links: Extract all links from a page in structured JSON

Requirements

Install the Plasmate CLI:

# From source
git clone https://github.com/nickarino/plasmate
cd plasmate
cargo build --release
cp target/release/plasmate /usr/local/bin/

# Or add to PATH
export PATH="$PATH:/path/to/plasmate/target/release"

Installation in Cursor

From VSIX (Local Install)

  1. Build the extension:

    npm install
    npm run compile
    npx vsce package
    
  2. In Cursor, open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)

  3. Run "Extensions: Install from VSIX..."

  4. Select the generated .vsix file

From Cursor Marketplace

Search for "Plasmate" in the Cursor extensions marketplace.

Commands

Access via Command Palette (Cmd+Shift+P / Ctrl+Shift+P):

CommandDescription
Plasmate: Fetch PageFetch a URL and display as SOM, text, or markdown
Plasmate: Extract TextExtract readable text from a URL
Plasmate: Extract LinksExtract all links from a URL

Configuration

Open Settings (Cmd+, / Ctrl+,) and search for "Plasmate":

SettingDefaultDescription
plasmate.pathplasmatePath to the plasmate executable
plasmate.defaultFormatsomDefault output format (som, text, markdown)
plasmate.timeout30000Timeout in milliseconds

Output Formats

SOM (Semantic Object Model)

Structured JSON representation of web page content, optimized for AI consumption:

{
  "tag": "main",
  "children": [
    {
      "tag": "h1",
      "text": "Welcome"
    },
    {
      "tag": "p",
      "text": "Page content..."
    }
  ]
}

Text

Plain text extraction of readable content.

Markdown

Formatted markdown output preserving document structure.

Usage Examples

Fetch Documentation

  1. Open Command Palette
  2. Run "Plasmate: Fetch Page"
  3. Enter URL: https://docs.example.com/api
  4. Select format: SOM
  5. Result opens in new editor tab
  1. Run "Plasmate: Extract Links"
  2. Enter URL of page with links
  3. Get JSON array of all links with text and href

Token Compression

Plasmate provides 10-100x token compression compared to raw HTML:

Page TypeRaw HTMLSOMCompression
Blog post50K tokens2K tokens25x
Documentation100K tokens5K tokens20x
Landing page200K tokens3K tokens66x

Troubleshooting

"Plasmate CLI not found"

  1. Ensure plasmate is installed and in your PATH
  2. Or configure the full path in settings:
    {
      "plasmate.path": "/path/to/plasmate"
    }
    

Timeout errors

Increase the timeout in settings:

{
  "plasmate.timeout": 60000
}

View logs

Open Output panel (View > Output) and select "Plasmate" from the dropdown.

Development

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch mode
npm run watch

# Package extension
npx vsce package

License

MIT

  • Plasmate - The browser engine for AI agents
  • Cursor - AI-first code editor