GitHub Copilot browser testing with MCP
Connect Monito to GitHub Copilot in VS Code or the cloud agent over MCP, check a deployed URL in a real browser and read the verdict with evidence.
Coding agents · Checked 2026-11-24
Copilot can call Monito over MCP, check a deployed URL in a real browser, and read a pass or fail verdict with evidence. Two setups are on this page: Copilot in VS Code, and Copilot cloud agent from repository settings. Our team has not run this configuration in the VS Code Copilot harness or in Copilot cloud agent.
How it works
- You ask Copilot to check a change on a URL. Copilot calls check with that URL and the behavior you expect.
- Monito runs the check in a browser. If the wait ends before a verdict, Copilot calls wait_for_run with the same runId.
- On failure, Copilot calls get_run and get_screenshot, then can change the code and call check again. save_check keeps that check as a test.
Set it up
Browser checks use credits. OAuth sign-in in VS Code does not require an API key. The cloud-agent example sends an API key, which the pricing page lists on Pro ($79/mo). Team ($199/mo) includes everything in Pro. Plan details
- Add the configuration below to .mcp.json at the workspace root, or to ~/.copilot/mcp-config.json for every workspace. When COPILOT_HOME is set, the personal file is $COPILOT_HOME/mcp-config.json. Both files use a top-level mcpServers object.
- Sign in when Copilot prompts. The hosted server uses OAuth in the browser. Do not commit a populated authentication header. In a VS Code header, use the braced form ${NAME}. A bare $NAME is literal text there.
- Or use guided setup. With Copilot selected, run Chat: Open Customizations, select MCP Servers, then Add Server. Choose HTTP and enter https://www.monito.dev/api/mcp. Use monito as the server id. For a personal file, select Global, then Copilot Global. Workspace-root .mcp.json is offered in that flow when the experimental chat.mcp.workspaceRootConfig.enabled setting is on. You can edit .mcp.json directly either way. Existing .mcp.json files remain available when that setting is off.
- For HTTP localhost, replace the hosted entry with the local server below after monito auth login. The hosted server rejects localhost and private-network URLs.
{
"mcpServers": {
"monito": {
"type": "http",
"url": "https://www.monito.dev/api/mcp",
"tools": ["*"]
}
}
}Workspace file for Copilot in VS Code. Merge the monito entry into an existing mcpServers object. ~/.copilot/mcp-config.json uses the same shape. tools set to * makes the server's tools available, and in VS Code that selection does not bypass tool approval. Our team has not run this file in the VS Code Copilot harness. Checked against the VS Code MCP configuration reference on 2026-11-24.
Check localhost from VS Code
Use the local server when the URL is HTTP localhost. Run npx -y @monitodev/cli auth login once, or monito auth login if the CLI is installed. The server uses that login, or MONITO_TOKEN. The browser still runs in Monito's cloud, and the local process reaches HTTP localhost through a built-in tunnel. Keep the server and the dev server running.
In CLI 4.8.1, the local server's check,core-read default has seven tools and leaves out list_runs, run_project, and get_screenshot. Pass --toolsets check,core to include them; that also adds the rest of the core toolset, including tools that create and change scenarios. The hosted server includes all three by default.
Replace the hosted monito entry with the configuration below. It can live in the same .mcp.json or in ~/.copilot/mcp-config.json. Our team has not run this local server in the VS Code Copilot harness.
{
"mcpServers": {
"monito": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@monitodev/cli", "mcp"],
"tools": ["*"]
}
}
}Local stdio server for HTTP localhost. Our team has not run this entry in the VS Code Copilot harness. On CLI 4.8.1 the default toolset leaves out get_screenshot. The note above explains how to add it.
Set it up in Copilot cloud agent
Repository administrators add MCP servers under Settings, then Copilot, then MCP servers. The JSON uses an mcpServers object. Every server needs type and tools. A remote server takes url and optional headers. Copilot cloud agent does not support remote MCP servers that use OAuth in this repository configuration, so send an API key in the x-api-key header.
Create a Monito API key and store it as an Agents secret named COPILOT_MCP_MONITO_API_KEY. Only Agents secrets and variables whose names start with COPILOT_MCP_ are available here. Reference the secret as $COPILOT_MCP_MONITO_API_KEY or ${COPILOT_MCP_MONITO_API_KEY}. Do not commit the key.
The tools list below is narrower than the hosted server's default. Copilot calls configured tools without asking for approval, and every check spends credits. This list leaves out save_check, list_scenarios, run_scenario, and run_project, which save or launch scenarios. It is an example our team has not run.
The GitHub MCP server and the Playwright MCP server are enabled by default for Copilot cloud agent. Playwright can read a page, interact with it, and take screenshots. By default it reaches only localhost and 127.0.0.1 inside the agent's environment. Monito returns a pass or fail verdict with a report link, screenshots, network and console evidence, and can save the check as a test.
The hosted server cannot reach a dev server inside the agent's environment. Check a deployed preview URL.
{
"mcpServers": {
"monito": {
"type": "http",
"url": "https://www.monito.dev/api/mcp",
"headers": {
"x-api-key": "$COPILOT_MCP_MONITO_API_KEY"
},
"tools": [
"check",
"wait_for_run",
"get_run",
"get_screenshot",
"list_projects",
"list_runs"
]
}
}
}Repository MCP configuration for Copilot cloud agent. Our team has not run this configuration. The header name is x-api-key. The secret value stays in Agents secrets.
Follow the verdict to the evidence
Call check with url and expectation, for example your deployed cart URL and "The total includes shipping". Keep projectId stable for previews whose hostname changes.
When done is false, call wait_for_run with the returned runId. Do not launch another check just to keep waiting. Reuse requestId after an uncertain launch response to avoid another charge.
Call get_run with runId to read the verdict, bug reports, failed requests, console messages and screenshot names. Then call get_screenshot with run.sessionId and a fileName from evidence.screenshots, not a screenshot URL.
After a fix, call check again. Use save_check with checkId and a name to keep a deployed check as a test; add its automation separately.
Using GitHub Actions?
Using GitHub Actions? That page runs saved tests with a project-scoped OIDC binding and does not put a Monito API key in the workflow.
Using another coding agent?
Claude Code, Cursor, and Codex each have a setup page. The MCP server page covers the hosted endpoint, toolsets, and credits for any client.
GitHub Copilot and VS Code sources
GitHub Copilot and VS Code behavior on this page was checked against the following docs on 2026-11-24. Pricing was checked the same day against the live pricing page: API keys are listed on Pro, Team includes everything in Pro, Free lists 50 test credits a month, and one credit is one test run. The benchmark reports below do not validate these configurations. Our team has not run them in the VS Code Copilot harness or in Copilot cloud agent. This page is part of the growth and SEO plan in issue 273.
Example result
Example result: field names from the CLI, values illustrative
These verdict fields come from CLI 4.8.1 check --json. This illustrative failure describes a cart total that omits shipping. Timing and billing values are left null in this example. Use the returned reportUrl for the actual evidence.
{
"checkId": "check_example",
"projectId": "project_example",
"runId": "run_example",
"done": true,
"status": "failed",
"cause": "product_defect",
"causeLabel": "App bug",
"durationMs": null,
"creditsCharged": null,
"reportUrl": "https://www.monito.dev/session/session_example",
"firstFailure": "The cart total does not include shipping."
}Limits to account for
The hosted server at https://www.monito.dev/api/mcp tests deployed URLs. It rejects localhost and private-network URLs. The local server, npx -y @monitodev/cli mcp, reaches HTTP localhost through a tunnel; the browser still runs in the cloud.
Local checks have no saved logins or request headers. They cannot be scheduled or added to suites, automations or status pages, even after saving.
A failed run reports a bug. An error is not a verdict about your app. Read the evidence before asking your agent to change code.
Copilot cloud agent and Copilot code review do not support remote MCP servers that use OAuth when the server is configured in repository settings or a custom agent profile. The cloud example uses the x-api-key header. Our team has not run that header in Copilot cloud agent.
After the server is configured, Copilot cloud agent uses its MCP tools without asking for approval. Each check spends credits. The example tools list leaves out save_check, list_scenarios, run_scenario, and run_project. Our team has not run that list.
VS Code's .vscode/mcp.json file, with a top-level servers object, and the code --add-mcp command, target the editor-managed format of the deprecated Local harness. VS Code plans to remove that harness in February 2027. The Copilot harness does not read those files directly. Eligible existing definitions can be forwarded. New Copilot setups belong in .mcp.json or ~/.copilot/mcp-config.json.
The agent firewall applies to processes started through the Bash tool and, in cloud sandboxes, to the built-in Playwright MCP server and its browser. It does not apply directly to other MCP servers. Our team has not checked whether www.monito.dev must be on the allowlist.
Copilot code review shares the repository MCP configuration and only receives tools whose annotations.readOnlyHint is true. Monito sets that annotation from each tool. get_run, get_screenshot, wait_for_run, list_projects, list_scenarios, and list_runs are marked read-only. check, save_check, run_scenario, and run_project are not, so code review does not receive them. Our team has not run Copilot code review with this server.
Comparable benchmark runs
Our team published these runs in the reliability benchmark. They show comparable browser journeys, not executions of the configuration or illustrative result above. Run your own scenario before relying on this integration.
Questions
Copilot already has Playwright MCP. Why add Monito?
Copilot cloud agent starts with the Playwright MCP server enabled, alongside the GitHub MCP server. Playwright can read a page, interact with it, and take screenshots, and by default it reaches only localhost and 127.0.0.1 in the agent's environment. Monito adds a pass or fail verdict, a report link, screenshots, network and console evidence, and a way to save the check as a test. Our team has not run the two servers together.
Which plan do I need?
OAuth sign-in for Copilot in VS Code does not require an API key. Browser checks use credits. The pricing page lists 50 free test credits every month, and a test run costs 1 credit. The cloud-agent example sends an API key. The pricing page lists API keys on Pro ($79/mo). Team ($199/mo) includes everything in Pro.
Can Copilot test localhost?
In VS Code, the local server can reach HTTP localhost through its tunnel after monito auth login. The browser still runs in Monito's cloud. The hosted server rejects localhost and private-network URLs, so the cloud agent should check a deployed preview URL. Local checks cannot be scheduled or added to suites, automations or status pages, even after saving.