Skip to main content
Build browser extensions where Claude can read pages, extract data, fill forms, and manipulate the DOM - all through natural language.

What You’ll Build

A browser extension that:
  • Lets users interact with Claude via popup or sidebar
  • Gives Claude access to the current page’s content
  • Executes DOM manipulations based on Claude’s decisions
  • Works across any website

Architecture

Quick Start

1. Extension Structure

2. Manifest (Chrome MV3)

3. Popup (User Interface)

4. Browser Tools

5. Content Script

Use Cases

Data Extraction

Form Automation

Page Analysis

Interactive Assistance

Advanced Features

Screenshot Tool

Storage Tool

Best Practices

1. Token Security

Never hardcode tokens in the extension. Fetch from your server:

2. Page Content Limits

Don’t send the entire page to Claude - it’s expensive and often unnecessary:

3. User Confirmation

Ask before destructive actions:

4. Error Handling

Handle tool failures gracefully:

Firefox Compatibility

For Firefox, update the manifest:
And use browser.* APIs instead of chrome.*:

Next Steps

Tools

Learn more about defining tools

Streaming

Real-time response streaming

Error Handling

Handle errors gracefully

Budget Management

Control costs per user