CodeCraftinghub logoCodeCraftingHub
HomeWorkArticlesCoursesAppsAbout
Get in Touch
HomeWorkArticlesCoursesAppsAbout
Digital Architect

Building the next generation of resilient digital infrastructure with technical integrity.

Connect
GitHubLinkedInYouTube
Resources
NewsletterCase StudiesManifesto

Status

AVAILABLE FOR PARTNERSHIPS
© 2024 Digital Architect. All rights reserved.
CodeCraftinghub logoCodeCraftingHub
HomeWorkArticlesCoursesAppsAbout
Get in Touch
HomeWorkArticlesCoursesAppsAbout
Digital Architect

Building the next generation of resilient digital infrastructure with technical integrity.

Connect
GitHubLinkedInYouTube
Resources
NewsletterCase StudiesManifesto

Status

AVAILABLE FOR PARTNERSHIPS
© 2024 Digital Architect. All rights reserved.
CodeCraftinghub logoCodeCraftingHub
HomeWorkArticlesCoursesAppsAbout
Get in Touch
How to Use Chrome DevTools MCP Server with Cursor IDE
Back to Articles

CodeCraftinghub

Front End

How to Use Chrome DevTools MCP Server with Cursor IDE

By Usman AliApril 3, 20263 min read

If you’ve tried to connect the Chrome DevTools MCP server to Cursor IDE, you might have run into a frustrating wall

How to Use Chrome DevTools MCP Server with Cursor IDE (Without Breaking Your Regular Chrome)

If you’ve tried to connect the Chrome DevTools MCP server to Cursor IDE, you might have run into a frustrating wall: Chrome doesn’t automatically open a debugging port, and even if you force it, your existing Chrome session gets tangled up. After wrestling with this myself, I found a clean, simple solution. Let me share it with you.

What’s the problem?

The Chrome DevTools MCP server needs to talk to a Chrome instance that’s listening for debugging connections on a port (like 9222). But the Chrome you use daily isn’t started in debug mode. You could close Chrome and relaunch it with the right flags, but that kills your tabs and settings not ideal.

Even if you try to add the flags while Chrome is running, it won’t work. And using your regular profile for debugging can cause conflicts with extensions, bookmarks, and logged in sessions.

The solution: a separate Chrome instance just for MCP

We’ll launch a second Chrome window that:

  • Runs completely isolated from your everyday Chrome (separate user data directory)
  • Opens a remote debugging port (9222) that the MCP server can connect to
  • Stays alive while you work in Cursor

No extensions, no cookies, no interference. Perfect for automated testing or just inspecting your code’s runtime.

Step-by-step guide (Windows)

Note: I’m using Windows here. For macOS/Linux, see the alternative commands at the end.

1. Launch a debug‑ready Chrome window

Open a Command Prompt (or PowerShell) and run this single command:

bash
"C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="C:\Temp\chrome-debug-profile"

What it does:

  • --remote-debugging-port=9222 opens the debug port for MCP to connect
  • --user-data-dir="C:\Temp\chrome-debug-profile" creates a fresh, temporary profile that won’t touch your normal Chrome data

A new Chrome window will pop up. It’ll look bare – no extensions, no bookmarks, no history. Keep this window open while you use Cursor.

2. Configure Cursor to use the running Chrome

In Cursor, open your MCP configuration. You can find it under File > Preferences > MCP Servers (or by editing ~/.cursor/mcp.json directly).

Add (or replace) the Chrome DevTools entry:

json
{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "chrome-devtools-mcp@latest",
        "--browser-url=http://127.0.0.1:9222"
      ]
    }
  }
}

The key part is --browser-url=http://127.0.0.1:9222 – this tells the MCP server to connect to the Chrome instance we just launched, instead of trying to launch its own.

3. Restart Cursor (or reload MCP)

After saving the config, restart Cursor or manually reload the MCP servers from the command palette (Reload MCP Servers). You should now be able to use tools like take screenshot, navigate page, evaluate script, etc.

For macOS users

Launch a separate Chrome instance from Terminal:

bash
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --remote-debugging-port=9222 --user-data-dir="$HOME/temp-chrome-debug"

For Linux users

bash
google-chrome --remote-debugging-port=9222 --user-data-dir="/tmp/chrome-debug-profile"

The Cursor config stays exactly the same across all OSes.

Why this approach rocks

  • No interference Your main Chrome profile (bookmarks, passwords, extensions) stays untouched.
  • Works alongside Cursor You can run the debug Chrome window in the background and close it when you’re done.
  • No admin rights required Uses standard Chrome flags and a local temp folder.
  • You control the lifecycle Launch the debug window only when you need it.

One small gotcha

If you close the debug Chrome window, the MCP server will lose its connection. Just re run the command to start a fresh one. And if you ever see “port already in use”, it means you have another Chrome instance occupying 9222 either close it or change the port number in both the launch command and the Cursor config.

Wrapping up

Getting Chrome DevTools MCP to work with Cursor IDE doesn’t have to be a headache. With a separate debug instance and a simple config tweak, you can inspect, automate, and debug your web apps right from Cursor – while keeping your personal Chrome session safe and sound.

I hope this saves you the hours I lost figuring it out. If you found it helpful, give it a like or share it with someone who’s wrestling with MCP and Chrome.

Have you tried other MCP servers with Cursor? Let me know in the comments I’m always looking for cool integrations.

Comments

No approved comments yet.

Related Articles

Coding
Front End

React vs. Next.js: Navigating the Architectural Shift in Modern Front-End Development

The Architect’s Dilemma: Is Next.js Consuming React, or Saving It? Let’s be real for a second: the "React vs. Next.js" debate is exhausting. If you spend five minutes on tech social media, you’ll see developers acting like choosing one over the other is a moral failing. But here’s the truth I’ve learned after breaking a few dozen production apps: It’s not about. which tool is better. It’s about how much "magic" you’re willing to trade for control. In 2026, as AI starts handling the "simple" code generation, our value as engineers isn't just in writing syntax—it’s in technical judgment. It’s knowing where your code should live and how it should reach the user. 1. The "Pure React" Purist: Power in Control When you opt for a library like React (likely paired with a lightning-fast bundler like Vite), you are choosing transparency. There is no "magic" file-based routing. There is no hidden middleware. It is just you, your components, and the browser’s DOM. For those of us who grew up debugging complex re-renders and mastering the useMemo hook, this level of control is addictive. Where it shines Complex Client-Side Tools: Think dashboards with 10k+ data points where rendering performance is more important than SEO. Internal Applications: When you don't need to be indexed by Google and want to keep your bundle size strictly under your own thumb. Total Architectural Freedom: React is the ultimate Lego set. It doesn't try to be your boss. It’s perfect for engineers who want to build their own systems from the ground up. 2. The Next.js Paradigm: Performance by Default Then we have Next.js. It’s no longer just a "React wrapper"; it is a comprehensive web framework that has fundamentally changed the "vibe" of the frontend. With the advent of the App Router and Server Components, Next.js addresses the biggest headache of modern SPAs: The Hydration Gap. Instead of making the user wait for a massive JavaScript bundle to download before they see anything, Next.js sends pre-rendered HTML. It’s that instant gratification—that "snap"—that makes a site feel premium. It handles the "boring" stuff (Image optimization, Font loading, SEO) so you can focus on building features. The "Cage" of Convenience: The trade-off? You have to do things the "Next way." If you want to use their Middleware or caching strategies, you have to play by their rules. For some, this is a relief. For others, it feels like a cage. 3. The Technical Breakdown How do they actually stack up when the pressure is on? 4. The Human Verdict: Which One Should You Pick? I’ve seen plenty of projects fail because they chose a stack based on a trend rather than a requirement. Choose Next.js if: You are building anything that needs to be "discovered." If your business depends on a search engine—like an e-commerce platform, a public SaaS, or a content site—Next.js is the only logical choice. The SEO and performance wins out of the box are too valuable to ignore. Choose Pure React if: You are building an internal tool, a heavy-duty editor (like a Figma-style canvas), or a localized app where SEO is irrelevant. Go this route if you want to sharpen your architectural skills and have 100% control over the execution pipeline. Final Thoughts: Don't Get Analysis Paralysis At the end of the day, your users don't care if you used a Server Component or a useEffect hook. They care if the app works, if it's fast, and if it solves their problem. Pick the tool that makes you feel productive, not just the one that’s trending. Both React and Next.js are incredible feats of engineering. Your job is to be the architect who knows which tool to pull from the belt. What’s your go-to for your next project? Let’s talk about it in the comments.

Want More Engineering Deep Dives?

Join the newsletter for practical insights on architecture, code quality, and developer workflow.

HomeWorkArticlesCoursesAppsAbout
Digital Architect

Building the next generation of resilient digital infrastructure with technical integrity.

Connect
GitHubLinkedInYouTube
Resources
NewsletterCase StudiesManifesto

Status

AVAILABLE FOR PARTNERSHIPS
© 2024 Digital Architect. All rights reserved.