Video Tutorial
What Is This?
Right now, Claude can read your files and run commands on your computer. But it cannot open a web browser. That means it cannot visit a website, click a button, fill out a form, or check what a page looks like.
In this lesson, you will give Claude its own browser using a free tool called Playwright. Once you set it up, Claude can visit websites, take screenshots, and click around pages just like you would.
What You Need
- Claude Code installed and working on your computer.
That is it. If anything else is missing, Claude will help you install it in the steps below.
Step 1: Make Sure You Have the Right Tools
Open your terminal and type:
claude
Once Claude is running, ask it to run this command:
npx --version
If Claude shows you a number like 10.8.2, you are all set. Skip to Step 2.
If Claude says something like "command not found", no worries. That just means your computer is missing a small piece of software that the browser tool needs. Paste this:
I need npx installed on my Mac. Walk me through it step by step. If anything else is needed first, install that too.
Claude will take care of it. It may ask you to approve a few things along the way. Say yes to each one. When it is done, run the version check above one more time to make sure it worked.
Step 2: Give Claude a Browser
Ask Claude to run this command:
claude mcp add playwright npx @playwright/mcp@latest
This connects a browser tool to Claude. You only need to do this once.
Step 3: Restart Claude Code
Claude needs to restart before it can use its new browser. Type:
/exit
Then open your terminal again and type:
claude
Step 4: Make Sure It Worked
With Claude running inside your terminal, type:
/mcp
A list of servers will pop up. Use the ↓ arrow key to move down the list until you see playwright. It should have a green checkmark next to it. If it is not turned on, press Enter to toggle it on.
If you see this, you are ready to go.
If you do not see it, paste this and let Claude help you figure out what happened:
I just ran "claude mcp add playwright npx @playwright/mcp@latest" but playwright is not showing up in /mcp. Can you help me fix it?
Try It Out
Now for the fun part. Ask Claude to visit a website:
Go to lightschool.com and take a screenshot
A real browser window will pop up on your screen. You can watch Claude open the page, look around, and take a picture of what it sees. It will show you the screenshot right in the chat.
What Else Can Claude Do with a Browser?
- Visit any website and read what is on the page.
- Click buttons and links to move through a site.
- Fill out forms with text, dropdowns, and checkboxes.
- Take screenshots so you can see exactly what the page looks like.
- Test your own websites by checking if buttons work, pages load, and things look right.
What You Learned
You gave Claude its own web browser. Now it can visit websites, click around, fill out forms, and take screenshots for you. It is like having a helper who can browse the internet while you focus on what matters.