Guides7 min read

Best MCP Servers for Debugging: Fix Bugs Faster with AI Context

The top MCP servers for debugging workflows. Connect your AI assistant to error tracking, logs, browser DevTools, and databases so it debugs with real context instead of guesses.

By MyMCPTools Team·

Debugging is where AI assistants most frequently fail: they see the error message you paste but none of the context that explains it. MCP servers change this. By connecting your AI to live error tracking, logs, database state, and browser diagnostics, you can debug with the same context an experienced engineer would have — not just a stripped stack trace.

Here are the MCP servers that make the biggest difference for debugging workflows.

Why Context Makes or Breaks AI Debugging

When you paste an error message into an AI chat without MCP, you get generic suggestions: "check your environment variables," "make sure you're using the right version," "verify your imports." These answers are useless when you've already checked all of them.

With MCP servers, your AI can:

  • Read the actual stack trace from Sentry, not a copy-pasted excerpt
  • Query the database state at the time the error occurred
  • Inspect the browser DOM and console errors directly
  • Cross-reference the error with recent commits to find regressions
  • Search logs for related errors across your entire application

The result is debugging suggestions that are specific to your actual codebase and runtime state — not generic patterns.

1. Sentry MCP Server — Production Error Intelligence

Sentry is where production bugs live. The Sentry MCP server gives your AI direct access to your error tracking without requiring you to navigate the Sentry UI and copy data manually.

Debugging workflows enabled:

  • "What are the top errors introduced in the last release?" — Copilot queries Sentry, returns ranked list
  • Full stack trace access including breadcrumbs, user context, and release information
  • Error frequency trends to distinguish regressions from pre-existing issues
  • Issue assignment and resolution without leaving your editor
  • Cross-reference errors with specific deployments or commits

Best prompt pattern: "Pull the details on Sentry issue PROJ-1234 and suggest a fix." Your AI gets the full event context — stack trace, breadcrumbs, environment, affected users — and proposes a solution against your actual code.

2. Filesystem MCP Server — Read Everything Around the Error

Stack traces point to file paths. The Filesystem server lets your AI read those files directly — along with configuration files, logs, and any other files in your project.

For debugging specifically:

  • Read the full function containing the error, not just the line number
  • Inspect configuration files (database configs, environment setups) that might cause the issue
  • Access log files written to disk during the error
  • Read test files to understand intended behavior vs. actual behavior
  • Check package.json and lockfiles to identify dependency version mismatches

3. GitHub MCP Server — Blame and History

Many bugs are regressions: something that worked before, broken by a recent change. The GitHub server lets your AI trace the history of a piece of code to find when and why it changed.

Regression debugging workflow:

  • Search commits touching the file where the error occurs
  • Read the PR description and review comments for context on recent changes
  • Compare the current implementation against a working historical version
  • Find related issues or PRs that might describe the same bug

Example: "Look at the git history for src/api/payments.ts and find what changed in the last 2 weeks that could cause the error in Sentry issue #847."

4. PostgreSQL / SQLite MCP Server — Database State Debugging

Many bugs manifest in the data layer: unexpected nulls, violated constraints, missing records, bad joins. With a database MCP server, your AI can inspect the actual data state — not a description of it.

Data debugging scenarios:

  • Run queries to reproduce the data state that triggered the error
  • Inspect schema constraints to understand why an insert failed
  • Check for missing indexes causing unexpected query timeouts
  • Verify foreign key relationships when associations aren't loading correctly
  • Compare expected vs. actual data for a specific user or record

Safety: Always use read-only database credentials for MCP connections to production databases.

5. Playwright / Puppeteer MCP Server — Browser Debugging

Frontend bugs are notoriously hard to debug from descriptions alone. Playwright and Puppeteer MCP servers let your AI control a browser to reproduce issues directly.

Frontend debugging workflows:

  • Navigate to a specific URL and take a screenshot to see the current rendering state
  • Interact with UI elements to reproduce click-path bugs
  • Execute JavaScript in the page context to inspect component state
  • Monitor network requests to catch failed API calls
  • Capture console errors that don't appear in your stack trace

Best for: Visual regressions, interaction bugs, and timing-dependent UI issues that are impossible to explain by description alone.

6. Chrome DevTools MCP Server — Runtime Inspection

The Chrome DevTools MCP server provides programmatic access to Chrome's debugging protocol. Instead of explaining what you see in DevTools, your AI can inspect it directly.

Capabilities:

  • Read the DOM structure of a live page
  • Inspect network requests and response bodies
  • Access the JavaScript console log
  • Profile performance to find bottlenecks
  • Inspect Web Storage (localStorage, sessionStorage, cookies)

7. Logfire MCP Server — Structured Log Analysis

Application logs contain the full story of a bug, but searching through them manually is slow. The Logfire MCP server makes your structured logs queryable by your AI assistant.

Log debugging workflows:

  • Search logs by error message, user ID, request ID, or time range
  • Trace a specific request through your distributed system
  • Find log patterns that precede the error to understand its cause chain
  • Compare log behavior before and after a deployment

8. Fetch MCP Server — Documentation Lookup

Sometimes a bug is caused by using a library incorrectly. The Fetch server lets your AI check the current documentation for the library version you're actually using — catching API mismatches, deprecated methods, and version-specific behavior changes.

Debugging MCP Stack Recommendations

Backend bugs: Sentry + Filesystem + GitHub + PostgreSQL

Frontend bugs: Filesystem + GitHub + Playwright + Chrome DevTools

Data layer bugs: PostgreSQL + Filesystem + Fetch

Production incidents: Sentry + Logfire + GitHub + Filesystem

Full-stack debugging: Sentry + Filesystem + GitHub + PostgreSQL + Playwright

The Debugging Multiplier Effect

The real power of MCP for debugging isn't any single server — it's the combination. When your AI can simultaneously read the error from Sentry, inspect the database state that triggered it, read the full file context from the filesystem, and trace the recent commits that changed the code, it can generate a root cause analysis that would take an engineer 30-60 minutes of manual investigation.

Start with Sentry + Filesystem as your debugging baseline. Add database access once you've seen how much faster schema-aware debugging is. Then add browser tooling if you work on frontends.

Browse all MCP servers at MyMCPTools. See also Best MCP Servers for Developers and Best MCP Servers for QA Engineers.

Recommended Tools

Better Stack

Free Plan

Get alerted when your APIs, browser tests, payment pipelines, or MCP server dependencies go down. Used by 100K+ developers.

Start monitoring free →

1Password

14-day Free Trial

Store and inject API keys, payment credentials, tokens, and file access secrets into your MCP server configs. Trusted by 150K+ developers.

Try 1Password free →

🔧 MCP Servers Mentioned in This Article

🔧

Sentry MCP Server

The Sentry MCP Server is Sentry's official Model Context Protocol integration, purpose-built for human-in-the-loop coding agents like Claude Code, Cursor, and Windsurf. Rather than exposing every Sentry API endpoint, it focuses tightly on developer debugging workflows: searching and triaging issues, pulling stack traces and event details, inspecting performance traces, and querying project/team/org metadata in natural language. The primary deployment is a hosted remote MCP server at mcp.sentry.dev, built on Cloudflare's remote-MCP infrastructure, so most users connect with zero local setup — just add the remote URL to their client. For self-hosted Sentry instances or local development, a stdio transport is also available via npx @sentry/mcp-server, authenticated with a Sentry User Auth Token scoped to org:read, project:read, project:write, team:read, team:write, and event:write. AI-powered search tools (search_events, search_issues) translate natural-language queries into Sentry's query syntax, but require a configured LLM provider (OpenAI, Azure OpenAI, Anthropic, or OpenRouter) — all other tools work without one. Claude Code users can also install it as a plugin (claude plugin install sentry-mcp@sentry-mcp) for automatic subagent delegation whenever a conversation touches Sentry errors, issues, or traces. This turns "why did this deploy break in production" into a direct conversational debugging session instead of tab-switching into the Sentry dashboard.

Auth required📘
📁

Filesystem MCP Server

sandboxed read, write, edit, move and search access to an explicit whitelist of local directories, and it is the reference implementation most other filesystem MCP servers are modelled on. Shipped by Anthropic in the official modelcontextprotocol/servers monorepo (89,000+ stars, actively maintained), it is a Node.js server published to npm as @modelcontextprotocol/server-filesystem. The part worth understanding before you install is the access-control model, because there are now two ways to grant directories and they do not compose. Method one is command-line arguments: `npx -y @modelcontextprotocol/server-filesystem /path/one /path/two`. Method two, and the one the maintainers recommend, is MCP Roots — a client that supports the roots protocol sends its roots at initialization, and those roots COMPLETELY REPLACE any directories passed on the command line, then get replaced again on every `notifications/roots/list_changed`. That means allowed directories can change at runtime without restarting the server, but it also means a roots-capable client silently overrides your CLI arguments. If the server starts with no arguments and the client either does not support roots or sends an empty list, initialization throws an error. The tool surface is broad: `read_text_file` (with mutually exclusive `head`/`tail` line windows), `read_media_file` returning base64 image/audio content blocks, `read_multiple_files` which keeps going when individual reads fail, `write_file`, `edit_file`, `create_directory`, `list_directory`, `list_directory_with_sizes`, `move_file`, `search_files`, `directory_tree`, `get_file_info` and `list_allowed_directories`. `edit_file` is the one to learn — it does line-based and multi-line pattern matching with indentation detection and preservation, returns a git-style diff with context, and supports `dryRun: true` so you can preview a change before applying it; the maintainers recommend always running a dry run first. Every operation is refused outside the allowed set, and `list_allowed_directories` is the fastest way to confirm what the server actually believes it can touch.

Local
💻

GitHub MCP Server

authenticated access to the whole GitHub platform — repositories, files, branches, issues, pull requests, Actions runs, security alerts, discussions and notifications — from Claude, Cursor, VS Code, Copilot CLI and any other MCP host. There is no npm package for this server, and that trips up most people who try to install it: `@github/mcp-server` is not published to the npm registry, so any `npx` line you find for it will fail. GitHub ships it three other ways. The easiest is the hosted remote server at https://api.githubcopilot.com/mcp/, which needs no install at all — point an HTTP-transport MCP client at that URL and log in with OAuth (VS Code 1.101+, Claude Desktop, Claude Code, Cursor and Windsurf all support this). The second is the official Docker image ghcr.io/github/github-mcp-server, which is what the copy-paste command on this page runs; on github.com it now performs a browser-based OAuth login on first use and keeps the token in memory only, which is why the published Docker configs map a fixed loopback callback port (-p 127.0.0.1:8085:8085 with GITHUB_OAUTH_CALLBACK_PORT=8085) so the container can receive the callback. Prefer a token? Set GITHUB_PERSONAL_ACCESS_TOKEN instead — it takes precedence over OAuth, and the minimum useful scopes are repo, read:org and read:packages. The third is the native Go binary from the repository's releases, which needs no fixed port for the OAuth flow. GitHub Enterprise Server has no hosted option: use the local server with --gh-host or GITHUB_HOST set to your instance (include the https:// scheme — it defaults to http://, which GHES rejects). Toolsets can be narrowed with GITHUB_TOOLSETS, and an insiders channel is available at /mcp/insiders or via the X-MCP-Insiders header.

Auth required📘
🗄️

PostgreSQL MCP Server

The PostgreSQL MCP server was the Model Context Protocol reference server for Postgres, and it is retired: the source now sits in modelcontextprotocol/servers-archived — a repository GitHub reports as archived, described as "Reference MCP servers that are no longer maintained" — and the npm package @modelcontextprotocol/server-postgres carries a deprecation notice reading "Package no longer supported." It still installs and still runs, which is why most third-party setup articles have not caught up. What it provides is deliberately small: a single tool, query, which executes read-only SQL inside a READ ONLY transaction, plus per-table schema information exposed as MCP resources at postgres://<host>/<table>/schema, with column names and data types discovered from database metadata. There is no index advice, no health check, no separate schema-listing tool, and no write mode. Install is npx @modelcontextprotocol/server-postgres with a postgres:// connection string as the argument. For active work against Postgres, the maintained alternative is Postgres MCP Pro (crystaldba/postgres-mcp), which exposes nine tools including index tuning against hypothetical indexes and a database health check, and has an explicit restricted access mode; if your database is hosted on Supabase or Neon, their platform servers add branching and logs that a raw Postgres connection cannot see. Reach for this archived server only when you want the smallest possible surface — one process, one read-only query tool, nothing else.

Local📘
🌍

Playwright MCP Server (ExecuteAutomation)

ExecuteAutomation's Playwright MCP Server is a community-maintained browser automation server (5,500+ GitHub stars) distinct from Microsoft's official microsoft/playwright-mcp — it leans further into test generation and visual workflows rather than pure accessibility-tree navigation. Beyond standard navigate/click/fill/screenshot tools, it can generate Playwright test code from a live browsing session, scrape full page content and structured data, execute arbitrary JavaScript in the page context, and drive API testing (GET/POST/PUT/PATCH/DELETE requests) alongside the browser tools. A standout feature is 143 real device presets for responsive testing — a single call like playwright_resize({ device: "iPhone 13" }) swaps in the correct viewport, user-agent, touch support, and device pixel ratio, and natural-language prompts like "test on iPad landscape" work directly through Claude. Install via `npm install -g @executeautomation/playwright-mcp-server`, Smithery, mcp-get, or the one-line `claude mcp add --transport stdio playwright npx @executeautomation/playwright-mcp-server` for Claude Code; VS Code one-click installers are also published. No API keys are required — it launches and drives a local Chromium/Firefox/WebKit browser directly. Choose this over Microsoft's official server when you specifically need auto-generated Playwright test scripts, JS execution, or device-emulation testing; choose Microsoft's for pure lightweight accessibility-tree page navigation. One maintenance fact the listings omit, checked against GitHub and npm on 2026-08-15: this repository has not been pushed since 2025-12-13 and npm 1.0.12 was published 2025-12-12, with 32 issues open. It is neither archived nor deprecated, so nothing warns you at install time — it installs, connects and works while its Playwright dependency drifts, whereas Microsoft's server ships continuously. Weigh the codegen, 143-preset device emulation and HTTP request tools against running an eight-month-old build. Note also that headless defaults to false on playwright_navigate, so it opens a visible browser window unless told otherwise, and that stdio-mode logging goes only to ~/playwright-mcp-server.log to keep the JSON-RPC stream clean.

Local📘
🌍

Chrome DevTools MCP Server

Google's own MCP server for driving and inspecting a live Chrome instance — the one case where "browser automation" undersells what a server does, because automation is only one of eleven tool categories. It is built on Puppeteer for the clicking and typing (with automatic waiting for action results), and on the Chrome DevTools frontend for the part nothing else offers: `performance_start_trace` / `performance_stop_trace` record a real trace and `performance_analyze_insight` returns the same actionable insights the Performance panel shows, optionally alongside CrUX field data for the same URL. There is also `lighthouse_audit`. Roughly 56 tools ship across Input automation (10), Navigation (6), Emulation (2), Performance (3), Network (2), Debugging (8, including `take_snapshot` of the accessibility tree and source-mapped console messages), Memory heap-snapshot analysis (12), Extensions (5), third-party developer tools, WebMCP and Progressive Web Apps — but several of those categories are off by default and gated behind flags: `--categoryExtensions`, `--categoryPwa`, `--memoryDebugging`, `--experimentalScreencast` (needs ffmpeg), `--experimentalVision` for coordinate-based `click_at`. Run `--slim` for a smaller set if you only want basic browsing. By default the server launches its own Chrome against a dedicated profile at `$HOME/.cache/chrome-devtools-mcp/chrome-profile`, so it starts logged in to nothing; `--autoConnect` (Chrome 144+, with remote debugging enabled at `chrome://inspect/#remote-debugging`) or `--browserUrl=http://127.0.0.1:9222` instead attach it to a browser you are already using, which is how you test signed-in flows and also how an agent inherits your real session. Network access can be fenced with `--blockedUrlPattern` / `--allowedUrlPattern` (URLPattern syntax; the allow form needs Chrome 149+). Only Google Chrome and Chrome for Testing are officially supported. Note that usage statistics are collected by default and CrUX lookups are on by default — opt out with `--no-usage-statistics` and `--no-performance-crux`.

Local📘
📊

Logfire

Provides access to OpenTelemetry traces and metrics through Logfire.

Local
🌐

Fetch

Web content fetching and conversion for efficient LLM usage. Extract readable content from any URL.

Local

📚 More from the Blog