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)
-
Build the extension:
npm install npm run compile npx vsce package -
In Cursor, open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
-
Run "Extensions: Install from VSIX..."
-
Select the generated
.vsixfile
From Cursor Marketplace
Search for "Plasmate" in the Cursor extensions marketplace.
Commands
Access via Command Palette (Cmd+Shift+P / Ctrl+Shift+P):
| Command | Description |
|---|---|
Plasmate: Fetch Page | Fetch a URL and display as SOM, text, or markdown |
Plasmate: Extract Text | Extract readable text from a URL |
Plasmate: Extract Links | Extract all links from a URL |
Configuration
Open Settings (Cmd+, / Ctrl+,) and search for "Plasmate":
| Setting | Default | Description |
|---|---|---|
plasmate.path | plasmate | Path to the plasmate executable |
plasmate.defaultFormat | som | Default output format (som, text, markdown) |
plasmate.timeout | 30000 | Timeout 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
- Open Command Palette
- Run "Plasmate: Fetch Page"
- Enter URL:
https://docs.example.com/api - Select format: SOM
- Result opens in new editor tab
Extract Links for Navigation
- Run "Plasmate: Extract Links"
- Enter URL of page with links
- Get JSON array of all links with text and href
Token Compression
Plasmate provides 10-100x token compression compared to raw HTML:
| Page Type | Raw HTML | SOM | Compression |
|---|---|---|---|
| Blog post | 50K tokens | 2K tokens | 25x |
| Documentation | 100K tokens | 5K tokens | 20x |
| Landing page | 200K tokens | 3K tokens | 66x |
Troubleshooting
"Plasmate CLI not found"
- Ensure plasmate is installed and in your PATH
- 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