BuildWithMatija
Get In Touch
Build with Matija logo

Build with Matija

Modern websites, content systems, and AI workflows built for long-term growth.

Services

  • Headless CMS Websites
  • Next.js & Headless CMS Advisory
  • AI Systems & Automation
  • Website & Content Audit

Resources

  • Case Studies
  • How I Work
  • Blog
  • CMS Hub
  • E-commerce Hub
  • Dashboard

Headless CMS

  • Payload CMS Developer
  • CMS Migration
  • Payload vs Sanity
  • Payload vs WordPress
  • Payload vs Contentful

Get in Touch

Ready to modernize your stack? Let's talk about what you're building.

Book a discovery callContact me →
© 2026Build with Matija•All rights reserved•Privacy Policy•Terms of Service
  1. Commands
  2. Codex: add Chrome DevTools MCP via config.toml

Codex: add Chrome DevTools MCP via config.toml

Register the Chrome DevTools MCP server in Codex by adding the TOML block to ~/.codex/config.toml and restarting Codex.

[mcp_servers."chrome-devtools"]
command = "npx"
args = ["chrome-devtools-mcp@latest"]
Categories
Tools
Operating Systems
cross-platform
Prerequisites
Codex CLI or IDE extension installedNode.js/npm available for npxAccess to ~/.codex/config.toml
Last Tested

1/10/2025

Tags
mcpchrome-devtoolstomlcodexautomation
Details

What this does

Codex looks for Model Context Protocol servers in ~/.codex/config.toml. Adding the Chrome DevTools block lets Codex launch a dedicated Chrome instance with the correct debugging flags whenever a DevTools task runs.

Steps

  1. Ensure ~/.codex/config.toml exists (create the directory/file if needed).
  2. Append the Chrome DevTools MCP block shown above.
  3. Restart Codex so the new server definition is loaded.

Verification

After Codex restarts, ask it to run a browser task such as:

Check the LCP of https://web.dev

Codex should spawn a Chrome window controlled through MCP and return a response. You can also target a local project:

Open http://localhost:3000 and report console errors

Variations

  • To add more MCP servers, repeat the pattern with another [mcp_servers."name"] block.
  • If the Chrome window fails to launch automatically, manually start Chrome with --remote-debugging-port=9222 and rerun the command.
Safety Notes
  • Non-destructive: only edits your Codex configuration file.
  • Expect a separate Chrome profile window when the MCP server starts.
Related Commands
Other useful commands you might find helpful

Homebrew: fix codex stuck on old version (formula overrides cask)

Removes the outdated codex Homebrew formula (0.46.x) so the newly installed cask (0.47.x) becomes the active binary.

brew uninstall codex --formula

Temporarily Override DNS for a Domain (macOS)

Force your Mac to resolve a domain to a specific IP by modifying the /etc/hosts file

sudo nano /etc/hosts

ripgrep: search TypeScript files excluding common dirs

Search recursively for <Button in TS/TSX files while excluding node_modules, src/components/contact, and src/components/ui.

rg "<Button" -g "*.ts*" -g '!*./node_modules/**' -g '!src/components/contact/**' -g '!src/components/ui/**'
Related Articles
Blog posts that might provide additional context

Neon Postgres Architecture: Copy Connection Model First

5/9/2026•Tools

PgBouncer Transaction Mode: Fix Postgres Connection Error

5/7/2026•Tools

DBLab: Save €55/mo with PostgreSQL Instant Clones Now

4/24/2026•Tools