Failed to connect to MCP server (connection timed out)" when configuring Playwright MCP on Continue for VSCode
Before submitting your bug report
- [x] I've tried using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- [ ] I believe this is a bug. I'll try to join the Continue Discord for questions
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: 26.0.1
- Continue version: 1.2.10
- IDE version: 1.105.1
- Model:
- config:
name: Playwright mcpServer
version: 0.0.1
schema: v1
mcpServers:
- name: Browser search
command: npx
args:
- '@playwright/mcp@latest'
Description
I’m unable to configure a custom MCP server in Continue for VSCode. Every time I add a new MCP server (in this case @playwright/mcp@latest), Continue shows the error:
Failed to connect to "Browser search" Error: Connection timed out
This happens even on a clean installation of the Continue VSCode extension. The MCP command itself works perfectly when executed directly from the terminal:
npx @playwright/mcp@latest --help
I followed the official documentation here: 👉 https://docs.continue.dev/customize/deep-dives/mcp
🧩 Environment
OS: macOS 26.0.1
VSCode version: 1.105.1
Continue extension version: 1.2.10
Ollama setup: autodetect (local)
MCP tested: @playwright/mcp@latest
⚙️ Configurations
config.yaml
name: Local Config version: 1.0.0 schema: v1 models:
- name: Autodetect provider: ollama model: AUTODETECT
.continue/mcpServers/playwright-mcp.yaml
name: Playwright mcpServer version: 0.0.1 schema: v1 mcpServers:
- name: Browser search
command: npx
args:
- '@playwright/mcp@latest'
🧠 Steps to Reproduce
Install Continue extension on VSCode (clean setup)
Configure Ollama with autodetect local model
Create .continue/mcpServers/playwright-mcp.yaml as shown above
Reload Continue → Tools → MCP Servers
Observe error:
Failed to connect to "Browser search" Error: Connection timed out
💥 Expected Behavior
The MCP server should start successfully and appear as connected under Tools → MCP Servers.
❌ Actual Behavior
Continue displays:
Failed to connect to "Browser search" Error: Connection timed out
🧠 What I’ve Tried
Verified clean Continue configuration (removed .continue folder)
Confirmed MCP command works via CLI (npx @playwright/mcp@latest --help)
Restarted VSCode and system
Tested both local and global Node installations
Confirmed MCP YAML syntax and schema match the official docs
To reproduce
No response
Log output
Just tried the playwright mcp now and seems to be working fine to me.
Can you try increasing the timeout for the mcp connection and see if it works? (https://docs.continue.dev/reference#mcpservers)
Hello, thx for your help. Yes I tried to increase the connection timeout but the issue is still there. is there any super simple dummy mcp to test (something like an echo mcp)? I have the same behavior with all mcp so it sounds of some "general" issue probably from my side.
you can use the context7 mcp
Same results also trying with a custom echo declared in this way:
name: EchoMCP mcpServer
version: 0.0.1
schema: v1
mcpServers:
- name: EchoMCP
command: node
args:
- dist/server.js
cwd: ../packages/mcp-servers/echo-mcp
env:
NODE_ENV: development
Running the echo from the console it works:
bash-3.2$ echo '{"jsonrpc":"2.0","id":1,"method":"tools/echo","params":{"text":"hi ${env.USER}"}}' | node dist/server.js
{"jsonrpc":"2.0","id":1,"result":{"output":"hi gianluca.carucci"}}
The same for me ... the only one mcp server that works is
name: Continue Docs MCP
version: 0.0.2
schema: v1
mcpServers:
- name: Continue Docs MCP
url: https://docs.continue.dev/mcp
For all the others ... Failed to connect to "<name_mcp_server>" Error: MCP error -32000: Connection closed
Any suggestion will be appreciated. Thanks in advance!
@cesaregerbino can you list an example mcp server that you are trying to use?
Following the Continue documentation here https://docs.continue.dev/customize/deep-dives/mcp I've tried the Playwright MCP Server ....
name: Playwright mcpServer
version: 0.0.1
schema: v1
mcpServers:
- name: Browser search
command: npx
args:
- "@playwright/mcp@latest"
I've obtained the error Failed to connect to "<name_mcp_server>" Error: MCP error -32000: Connection closed
I've noticed that the documentation says
so I've also tried this mcp.json that works with other copilots (GitHub Copilot and Roocode) ....
{
"mcpServers": {
"gitlab": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@zereight/mcp-gitlab"
],
"env": {
"GITLAB_PERSONAL_ACCESS_TOKEN": "glpat-xxxxxxxxxxxxxxxxxxxxxxxxxx",
"GITLAB_API_URL": "https://gitlab.mycompany.it/",
"GITLAB_READ_ONLY_MODE": "true"
}
},
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://postgres:mypass@localhost:5432/Sakila"
]
},
"sonarqube": {
"command": "npx",
"args": ["-y", "sonarqube-mcp-server@latest"],
"env": {
"SONARQUBE_URL": "http://dv-sonarqube-mycompany.it/",
"SONARQUBE_TOKEN": "squ_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}
but the error is always the same.
I'd like to use these mcp server:
- postgresql
- sonarqube
- gitlab
- playwright
I've tried to use the configurations in https://hub.continue.dev/hub?q=mcp, but the error is always the same
Thank you in advance !!!