MCP (Model Context Protocol) servers extend Claude Code with new tools. Without them, Claude Code can read and write files, run shell commands, and use git. With them, it can navigate a real browser, query your database, read GitHub issues, file Linear tickets, and reach any system you connect. For QA engineers whose work spans browsers, databases, CI pipelines, and bug trackers, this is where Claude Code gets genuinely powerful.
The Playwright MCP course covers the protocol architecture in depth. This lesson focuses on the practical setup and QA-relevant servers.
Adding MCP servers
The mcp subcommand handles configuration:
claude mcp add playwright npx @playwright/mcp@latest
claude mcp add github npx @modelcontextprotocol/server-github
claude mcp listmcp list shows connected servers and their status. Once a server shows connected, its tools are available in every subsequent Claude Code session.
The MCP servers QA engineers reach for most
Playwright MCP — browser automation. Claude Code navigates real pages, inspects the DOM, generates accurate locators, and can reproduce bugs by actually executing the steps. This is the server worth installing first.
> Visit https://staging.myapp.com/checkout and tell me the data-testid values
for the card number input and the submit button.Claude navigates the page, reads the DOM snapshot, and gives you real values — not guesses.
GitHub MCP — issues, pull requests, CI runs. Claude can check recent failed workflow runs, read issue descriptions, and create issues without leaving the terminal:
> Check the last three failed runs of our test workflow on GitHub.
For each failure, identify which test file failed and why.PostgreSQL / SQLite MCPs — direct database access. Useful for generating test data from real records and for verifying database state after a test run:
> Query the test database for the last 10 created orders that have status 'pending'.
Return their IDs — I'll use them as fixtures.Linear / Jira MCPs — bug tracker access. Claude can read ticket descriptions, check for related issues, and file new bugs from a test failure:
> Create a Linear bug report for this failure: [paste error].
Title it appropriately, assign it to the QA backlog, and link to the failing test file.Chaining MCPs for compound workflows
The value compounds when MCPs work together. A single prompt can span multiple systems:
> Check Linear for open bugs tagged 'regression' in the current sprint.
For each one:
1. Read the bug description
2. Check whether we have a test in tests/regression/ that covers the scenario
3. If we don't, generate a Playwright test that reproduces the bug
4. Save the new tests to tests/regression/Claude uses the Linear MCP to read tickets, the filesystem to check for existing tests, and Playwright MCP to generate accurate tests — all in one session.
Permissions per MCP tool
Each MCP tool can be individually allowed or denied in .claude/settings.json:
{
"permissions": {
"allow": [
"mcp__playwright__browser_navigate",
"mcp__playwright__browser_snapshot",
"mcp__github__list_issues"
],
"deny": [
"mcp__github__create_pull_request",
"mcp__linear__delete_issue"
]
}
}This gives you the same granular control over MCP tools as over shell commands. Allow the read and inspection operations automatically; require approval for mutations.
Security considerations
MCP servers inherit your shell's network access and run code on your machine. Before installing a server:
- Use servers from trusted publishers (Microsoft, Anthropic, established vendors)
- Check what permissions the server requests
- Use a non-production Anthropic account with test credentials when exercising MCP against live systems
- – Navigate and inspect live pages
- – Generate accurate locators from DOM
- – Read issues and CI run logs
- – Create issues from test failures
- – Query test data from real records
- – Verify database state post-test
- Read and triage bug reports –
- File new bugs from failures –
⚠️ Common Mistakes
- Installing every available MCP server immediately. Start with Playwright MCP. Add others when you have a specific workflow that needs them. Too many connected servers add cognitive noise and increase the surface area for permission issues.
- Running MCP tools against production with real credentials. Always use a test environment and disposable credentials when Claude Code is navigating pages or querying databases via MCP. Claude Code acts on what you give it access to.
- Forgetting to verify MCP server status. If a server shows
disconnectedinclaude mcp list, its tools silently fail in sessions. Check status before starting a session that depends on a specific server.
🎯 Practice Task
Set up Playwright MCP and use it for test generation. 20 minutes.
- Run
claude mcp add playwright npx @playwright/mcp@latest. - Confirm it shows as connected with
claude mcp list. - Start a Claude Code session and ask: "Visit [a page in your project] and tell me the accessible names of the three most important interactive elements."
- Confirm Claude navigates the real page and returns actual values — not guesses.
- Use those values to generate a Page Object for the page, referencing the live DOM analysis.
The next lesson covers the most powerful Claude Code capability for QA: agentic workflows that plan and execute multi-step tasks autonomously.