DevTools MCP Server
Captures browser console logs (log, warn, error) from localhost development servers via a Chrome extension, providing tools to retrieve, filter, and clear logs for debugging.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@DevTools MCP Serverstart dev server for my-app in background on port 3000"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DevTools MCP Server
A specialized Model Context Protocol (MCP) server focused on process management, development server control, and browser console log collection. Solves common development challenges including npm run dev blocking and browser debugging visibility.
Features
Process Management
kill_process- Kill process by name or PID with signal controldetailed_process_list- Get detailed process info with CPU/memory usage and sortingfind_process_url- Find URLs/ports for a process by name (development servers)
Development Server Management
start_dev_server- Start development server in background (solves npm run dev blocking)stop_dev_server- Stop running development servercheck_dev_server- Check server status and port availabilitylist_running_servers- List all running serversget_server_logs- Get server logs for debuggingrestart_dev_server- Restart a development server
Browser Log Collection
get_browser_logs- Retrieve browser console logs with filteringget_browser_log_stats- Get statistics about collected logsclear_browser_logs- Clear stored browser logs
Installation
npm installDevelopment
npm run devBuild
npm run buildMCP Server Configuration
Claude Code (claude.ai/code) Configuration
Add the following configuration to your ~/.claude/mcp_servers.json:
{
"devtools": {
"command": "node",
"args": ["/path/to/devtools-mcp/dist/index.js"],
"cwd": "/path/to/devtools-mcp"
}
}Claude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"devtools": {
"command": "node",
"args": ["/path/to/devtools-mcp/dist/index.js"],
"cwd": "/path/to/devtools-mcp"
}
}
}General MCP Client Configuration
For other MCP-compatible clients, configure the server with:
Command:
nodeArgs:
["/path/to/devtools-mcp/dist/index.js"]Working Directory:
/path/to/devtools-mcpTransport: stdio
Make sure to build the project first:
npm run buildUsage
The server runs on stdio and can be integrated with MCP-compatible clients.
Development Server Management Examples
// Start a development server in background
{
"tool": "start_dev_server",
"arguments": {
"command": "npm run dev",
"name": "my-app",
"port": 3000,
"cwd": "/path/to/project"
}
}
// Check server status
{
"tool": "check_dev_server",
"arguments": {
"name": "my-app",
"port": 3000
}
}
// Get server logs for debugging
{
"tool": "get_server_logs",
"arguments": {
"name": "my-app",
"lines": 50
}
}
// Stop server when done
{
"tool": "stop_dev_server",
"arguments": {
"name": "my-app"
}
}This solves the common issue where npm run dev blocks Claude Code execution. The server starts in the background and returns immediately, allowing Claude Code to continue with other tasks while monitoring the development server status.
Process Management Examples
// Kill process by name
{
"tool": "kill_process",
"arguments": {
"name": "node",
"signal": "TERM",
"force": false
}
}
// Get detailed process list sorted by CPU usage
{
"tool": "detailed_process_list",
"arguments": {
"filter": "node",
"sortBy": "cpu",
"limit": 10
}
}
// Find development server URL by process name
{
"tool": "find_process_url",
"arguments": {
"processName": "node"
}
}
// Returns: "Development server likely running at: http://localhost:3000"Browser Log Collection
The browser log collection feature requires installing a Chrome extension to capture console logs from localhost development servers.
Chrome Extension Installation
The browser log collection requires a Chrome extension to capture console logs from localhost development servers.
Prerequisites:
Google Chrome or Chromium-based browser
DevTools MCP Server running (the extension sends logs to
http://localhost:3456)
Installation Steps:
Open Chrome Extensions Management
Navigate to
chrome://extensions/Or click Chrome menu → More Tools → Extensions
Enable Developer Mode
Toggle "Developer mode" switch in the top right corner
Load the Extension
Click "Load unpacked" button
Navigate to and select the
extensiondirectory from this projectThe extension should appear in your extensions list
Verify Installation
You should see "DevTools Browser Log Collector" in your extensions
The extension icon may appear in your browser toolbar
Start your MCP server (
npm run dev) to begin collecting logs
Automatic Log Collection:
The extension automatically detects localhost URLs (ports 3000-9999)
Captures all console.log, console.warn, console.error messages
Sends logs to the MCP server running on port 3456
No additional configuration required
Troubleshooting:
If logs aren't appearing, check that your MCP server is running
Verify your development server is running on a supported port (3000-9999)
Check Chrome extension permissions in
chrome://extensions/Refresh localhost tabs after installing the extension
Using Browser Log Tools
// Get recent browser logs
{
"tool": "get_browser_logs",
"arguments": {
"filter": {
"port": "3000",
"level": ["error", "warn"],
"limit": 50
}
}
}
// Get browser log statistics
{
"tool": "get_browser_log_stats",
"arguments": {}
}
// Returns: { totalLogs: 234, portStats: { "3000": 150, "8080": 84 }, activePorts: ["3000", "8080"] }
// Clear logs for specific port
{
"tool": "clear_browser_logs",
"arguments": {
"port": "3000"
}
}The MCP server automatically starts an HTTP server on port 3456 to receive logs from the Chrome extension. Logs are stored in memory and can be filtered by:
Port number (e.g., "3000", "8080")
Log level (log, warn, error, info, debug)
Time range
Project ID (auto-detected from page)
License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/shabaraba/devtools-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server