Learn Claude Code by Building DevPulse · Chapter 10

Claude sees the app

Claude can read every line of DevPulse, but has it ever seen the page on a phone? By the end of this chapter, Claude opens the app in a real browser at 390 px, fixes what looks wrong, and answers questions from the official docs.

One sitting~7 min read, ~15 min to build along
You start fromchapter 9's DevPulse
You builda phone layout, checked in a real browser
Chapter 10 of 15Claude gets eyes

Prefer to watch? This chapter goes with Episode 10 (5:41). Open it on YouTube.

Subscribe on YouTube

Goes with Episode 10"How does Claude Code see my app?". Watch it just above, or read this page at your own pace. It teaches the same steps.
In a hurry?Jump to the quick reference: every command and key in this chapter, what it does, and when to use it.
Every prompt, ready to copyThis chapter's prompts and commands, each with a Copy button. Type them yourself first; copy if you are stuck or behind.
Where you areDevPulse from chapters 1 to 9, with the server running in your second tab.
Before you startNode.js must be installed on your computer: Playwright's server runs with it. To check, run node --version in PowerShell or Terminal. If it is missing, download Node.js from its official site.

Claude has never seen your page

Most people will open a page like DevPulse on a phone. Does it look right there?

Claude wrote most of that page. But it only ever read the code. It has never opened the page, and it has never seen it 390 px wide.

Think of a tailor who stitches a shirt exactly to your measurements. Every number is right on paper, but only when you try it on do you see that one sleeve hangs too long. Claude has only had our measurements: the code. It has never had a fitting.

A hand-drawn shirt on a hanger with a measuring tape over its collar. One sleeve hangs far below the other, circled in mustard with the note: too long?
Right on paper is not the same as right on you. Only the fitting shows it.
The question for this chapter

How does Claude Code see your app, the way you see it on a phone?

Give Claude a browser

Playwright is a free tool that drives a real web browser the way a person would: it opens a page, clicks, resizes the window and takes screenshots. Developers use it to test their web apps.

Claude Code reaches tools like this through MCP servers. MCP is an open standard: one server, many tools. Playwright's server gives Claude that browser.

Nothing else to install beyond Node.js: Playwright's server downloads itself the first time it starts, and it opens the Chrome you already have.

Add it from your terminal, not inside Claude.

Type this into the terminal, in projects\devpulse, one line at a timeclaude mcp add playwright -- npx -y @playwright/mcp@latest claude mcp list

The same two lines work in PowerShell and in the Mac Terminal. On Windows we did not need cmd /c in front.

claude mcp add playwright prints: Added stdio MCP server playwright with command npx -y @playwright/mcp@latest to local config. Then claude mcp list shows playwright: Connected.
Everything after -- is the command that starts the server. list starts it once to check: Connected.

Now start claude and type /mcp.

The /mcp panel: Manage MCP servers. Local MCPs: playwright, 25 tools, with a tick.
Playwright brings 25 tools: open a page, click, resize, take a screenshot and more. (We cropped the panel to this server.)

Let Claude look at the page

Type this into Claude Code, as one lineUse the playwright tools to open http://127.0.0.1:8000, resize the window to 390 px wide, take a screenshot and tell me what looks wrong on a phone.
A Chrome window opened by Playwright on 127.0.0.1:8000/#today, the page narrowed to 390 px, with a grey bar: You are using an unsupported command-line flag.
A new Chrome window opens by itself, the page narrowed to phone width. In our recording it opened partly off the left edge of the screen, so only the right side of the page shows. The grey warning bar about a command-line flag comes from Playwright. You can close it.
The end of Claude's list: 4, edit and delete icons under 44 px and close together; 5, the Standup panel is a dense block; 6, a 40 px gap above the Standup card. Also a favicon 404. I haven't changed any code.
The last three of Claude's 6 problems, found in 19 seconds: the edit and delete icons, the dense Standup panel and the gap. It changed nothing yet.

That was the fitting. These are things you notice by looking at the page, not by reading its code.

Fix it, then look again

Ask Claude to fix them with a media query: CSS rules that apply only on narrow screens. Then it should look again at 390 px.

Type this into Claude Code, as one lineFix those in index.html with a narrow-screen media query, then check again at 390 px with the playwright tools.
The diff in index.html: rules inside the media query, edit and delete at min-width and min-height 44px. Below it: Calling playwright 2 times.
The new CSS goes in, then Claude calls Playwright again to check its own work.
Claude's summary: the tag field has its own row; titles get a full-width line; edit and delete are 44 by 44 px; the gap is gone; the Standup font is smaller. It has not tested the edit row, the error message or dark mode.
Done in 32 seconds. Read the last part: it says what it did not test.

Now see it yourself. Narrow your own browser window.

Wide, then narrow. Everything now fits one column. Commit it with /commit-commands:commit.
/commit-commands:commit: Committed as 951eb4f, Add mobile layout for narrow screens. It contains only index.html.
One commit, one file.

A second server: the docs

Some servers are not programs on your computer. They live on the web. Anthropic runs one for the Claude Code docs. Exit Claude with /exit first.

Type this into the terminalclaude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp
Added HTTP MCP server claude-code-docs with URL https://code.claude.com/docs/mcp to local config.
An HTTP server: just a web address. Note the last words: to local config.

Start claude again and ask it about that.

Type this into Claude CodeUse the claude-code-docs tools: what is an MCP scope, and which scope did I just use?
The end of the answer: a scope table with the User row; which scope you just used: local, private to you in this project; use --scope user for all your projects or --scope project for a shared .mcp.json; source link.
The answer comes from the docs, with the link. Local: only you, only this project.
ScopeWho gets the serverHow to add it
LocalYou, in this project onlyThe default
ProjectEveryone who clones the repo, through .mcp.json--scope project
UserYou, in all your projects--scope user
Careful here

An MCP server runs with your permissions. Add only servers you trust, the same way you would install a program.

What a server costs

Every connected server adds its tool list to Claude's context. Playwright alone has 25 tools. Keep the servers you use, and remove the rest with claude mcp remove name.

These servers were built by others. But logging a task still means leaving the terminal and opening the app. In chapter 11, DevPulse gets tools of its own, so Claude can log our work for us.

Quick reference

The prompts from this chapter, ready to copy: every prompt, chapter 10.

Command or keyWhat it doesUse it when
claude mcp add name -- commandAdds a server that runs on your computer (stdio)The tool is a program you can start, like Playwright
claude mcp add --transport http name urlAdds a server that lives on the webThe tool has a web address, like the docs server
claude mcp listLists your servers and whether they connectYou want to check a server works
/mcpShows the servers inside Claude Code, with their toolsYou want to see what Claude can use right now
Use the playwright tools to …Claude opens a real browser and looksYou want Claude to see the page, not just the code
--scope user / --scope projectMakes a server yours everywhere, or shared with the repoLocal scope is too narrow

References

Where each command on this page comes from. Every screenshot is from our own recording on 29 Oct 2026, Claude Code 2.1.312.

  1. Anthropic · Connect Claude Code to tools via MCP claude mcp add, list and get; stdio and HTTP servers; the local, project and user scopes; /mcp. https://code.claude.com/docs/en/mcp
  2. Microsoft · Playwright MCP The browser server we added: open a page, resize it, take a screenshot. https://github.com/microsoft/playwright-mcp
  3. Model Context Protocol · Introduction What MCP is: one open way for an AI app to talk to tools and data. https://modelcontextprotocol.io/introduction
  4. My own recording · 29 Oct 2026, Windows 11 Claude found 6 phone problems in 19 seconds, fixed them in 32, and the docs server named the scope we used.