Commit 96d72ad
authored
Fix filesystem and playwright MCP server configurations in stress test (#844)
Nightly stress test detected configuration errors in two MCP servers:
filesystem expected directories as CLI arguments but received
environment variables, and playwright had redundant host list entries.
## Changes
**filesystem server**
- Changed from `env.ALLOWED_PATHS` to `entrypointArgs: ["/workspace"]`
- Server requires directory paths as positional arguments after
container name
**playwright server**
- Simplified allowed-hosts/origins from
`localhost;localhost:*;127.0.0.1;127.0.0.1:*` to
`localhost:*;127.0.0.1:*`
- Removed redundant non-wildcard entries
## Configuration structure
Gateway converts workflow YAML to Docker commands following this
pattern:
```bash
docker run [args...] <container> [entrypointArgs...]
```
- `args`: Docker runtime flags (e.g., `--init`, `--network host`) -
before container
- `entrypointArgs`: Application arguments - after container
## Testing
Added `TestLoadFromStdin_FilesystemServerConfig` and
`TestLoadFromStdin_PlaywrightServerConfig` to validate argument
placement and prevent similar configuration errors.
> [!WARNING]
>
> <details>
> <summary>Firewall rules blocked me from connecting to one or more
addresses (expand for details)</summary>
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `example.com`
> - Triggering command: `/tmp/go-build1254119737/b275/launcher.test
/tmp/go-build1254119737/b275/launcher.test
-test.testlogfile=/tmp/go-build1254119737/b275/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true
/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/cgo 6765506/b184/
ache/Python/3.12.12/x64/bin/as --gdwarf-5 --64 -o as 6765�� d -n 10 -I
docker-buildx --gdwarf-5 --64 -o docker-buildx` (dns block)
> - `invalid-host-that-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build3908585129/b001/config.test
/tmp/go-build3908585129/b001/config.test
-test.testlogfile=/tmp/go-build3908585129/b001/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true go1.25.6 -c=4
-nolocalimports -importcfg /tmp/go-build2196765506/b210/importcfg -pack
/opt/hostedtoolcache/go/1.25.6/x64/src/net/http/httptest/httptest.go
conf�� go k/gh-aw-mcpg/gh-aw-mcpg/tools.go--gdwarf2
ache/Python/3.12.12/x64/bin/bash--64
k/gh-aw-mcpg/gh-/opt/hostedtoolcache/go/1.25.6/x64/pkg/tool/linux_amd64/compile
k/gh-aw-mcpg/gh--o k/gh-aw-mcpg/gh-/tmp/go-build2196765506/b125/_pkg_.a
.o` (dns block)
> - `nonexistent.local`
> - Triggering command: `/tmp/go-build1254119737/b275/launcher.test
/tmp/go-build1254119737/b275/launcher.test
-test.testlogfile=/tmp/go-build1254119737/b275/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true
/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/cgo 6765506/b184/
ache/Python/3.12.12/x64/bin/as --gdwarf-5 --64 -o as 6765�� d -n 10 -I
docker-buildx --gdwarf-5 --64 -o docker-buildx` (dns block)
> - `slow.example.com`
> - Triggering command: `/tmp/go-build1254119737/b275/launcher.test
/tmp/go-build1254119737/b275/launcher.test
-test.testlogfile=/tmp/go-build1254119737/b275/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true
/opt/hostedtoolcache/go/1.25.6/x64/src/runtime/cgo 6765506/b184/
ache/Python/3.12.12/x64/bin/as --gdwarf-5 --64 -o as 6765�� d -n 10 -I
docker-buildx --gdwarf-5 --64 -o docker-buildx` (dns block)
> - `this-host-does-not-exist-12345.com`
> - Triggering command: `/tmp/go-build1254119737/b284/mcp.test
/tmp/go-build1254119737/b284/mcp.test
-test.testlogfile=/tmp/go-build1254119737/b284/testlog.txt
-test.paniconexit0 -test.timeout=10m0s -test.v=true
/tmp/go-build2196765506/b218/_pkg_.a 6765506/b184/ p/bin/as -p
github.com/githu-unsafeptr=false -lang=go1.25 as 6765�� d -n 10
--debug-prefix-map ache/go/1.25.6/x64/pkg/tool/linux_amd64/vet -I
/opt/hostedtoolcmod -I ache/go/1.25.6/x64/pkg/tool/linuf() { test
"$1" = get && echo "******"; }; f sto-w` (dns
block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/github/gh-aw-mcpg/settings/copilot/coding_agent)
(admins only)
>
> </details>
<!-- START COPILOT ORIGINAL PROMPT -->
<details>
<summary>Original prompt</summary>
----
*This section details on the original issue you should resolve*
<issue_title>[mcp-stress-test] Server Configuration Failures Detected -
filesystem & playwright</issue_title>
<issue_description>The nightly stress test detected 2 servers with
configuration errors (not authentication issues).
## Test Summary
- **Test Session:** stress-test-20260208-034257
- **Test Date:** 2026-02-08T03:42:57Z
- **Total Configuration Failures:** 2
## Failed Servers
### 1. filesystem - Command Arguments Error
**Container:** mcp/filesystem
**Issue Type:** Configuration Error
**Error:**
``````
Usage: mcp-server-filesystem (allowed-directory) [additional-directories...]
``````
**Analysis:**
The filesystem server expects allowed directories as positional
command-line arguments, but the configuration is passing them as
environment variables (`ALLOWED_PATHS`). The docker command structure
needs to be updated.
**Current Configuration Issue:**
The server is launched with environment variable but expects positional
args.
**Suggested Fix:**
Update configuration to pass directories as positional arguments:
``````json
{
"filesystem": {
"type": "stdio",
"container": "mcp/filesystem",
"args": ["/workspace", "/additional/path"]
}
}
``````
Or update the docker args to include the directory paths:
```````json
{
"filesystem": {
"type": "stdio",
"command": "docker",
"args": ["run", "--rm", "-i", "-v", "/tmp/mcp-test-fs:/workspace:rw", "mcp/filesystem", "/workspace"]
}
}
``````
**Suggested Investigation:**
- [ ] Review filesystem server documentation for correct argument format
- [ ] Update gateway configuration to pass directories correctly
- [ ] Test with simple single directory first
- [ ] Consider if server should be updated to support env vars
---
### 2. playwright - Duplicate Flag Error
**Container:** mcr.microsoft.com/playwright/mcp
**Issue Type:** Configuration Error
**Error:**
``````
error: unknown option '--init'
``````
**Analysis:**
The docker command includes the `--init` flag twice - once as a docker
option (correct) and once passed to the playwright binary (incorrect).
The playwright binary doesn't recognize the `--init` flag and fails.
**Current Configuration Issue:**
``````
docker run --rm -i --init --network host mcr.microsoft.com/playwright/mcp --output-dir ... --init --network host
```````
Notice `--init` and `--network host` appear twice.
**Suggested Fix:**
Remove the duplicate flags from the playwright server arguments:
``````json
{
"playwright": {
"type": "stdio",
"command": "docker",
"args": [
"run", "--rm", "-i",
"--init",
"--network", "host",
"-v", "/tmp/gh-aw/mcp-logs:/tmp/gh-aw/mcp-logs:rw",
"mcr.microsoft.com/playwright/mcp",
"--output-dir", "/tmp/gh-aw/mcp-logs/playwright",
"--allowed-hosts", "localhost,localhost:*,127.0.0.1,127.0.0.1:*",
"--allowed-origins", "localhost;localhost:*;127.0.0.1;127.0.0.1:*"
]
}
}
``````
**Suggested Investigation:**
- [ ] Review playwright MCP server documentation
- [ ] Remove duplicate `--init` and `--network host` from args array
- [ ] Verify correct flag order for playwright binary
- [ ] Test with corrected configuration
---
## Gateway Logs
From the gateway logs, both issues are clearly configuration-related,
not authentication or protocol issues:
**filesystem:**
- Server expects CLI args but receives env vars
- Quick fix: restructure docker command args
**playwright:**
- Duplicate flags passed to both docker and playwright binary
- Quick fix: remove duplicate flags from args array
## Test Configuration Used
The test used the following configuration:
- Startup Timeout: 60s
- Tool Timeout: 30s
- Test Method: Sequential server testing
- Gateway: Successfully handled all requests
## Impact
These configuration issues prevent 2 MCP servers from launching:
1. **filesystem** - Would provide file system access if configured
correctly
2. **playwright** - Would provide browser automation if configured
correctly
Both are fixable with configuration changes and don't require code
modifications.
## Next Steps
1. **Priority: High** - Fix filesystem configuration
- Update docker args to pass directories as positional arguments
- Test with `/workspace` mount
2. **Priority: High** - Fix playwright configuration
- Remove duplicate `--init` and `--network host` flags
- Verify flag order matches playwright binary expectations
3. Re-run stress test to verify fixes
4. Update documentation with correct configuration examples
---
*Generated by Nightly MCP Stress Test*
*Test Session: stress-test-20260208-034257*
**Full Test Results:** See workflow run artifacts at
`/tmp/mcp-stress-results/`
> AI generated by [Nightly MCP Server Stress
Test](https://github.com/github/gh-aw-mcpg/actions/runs/21791681391)
<!-- gh-aw-agentic-workflow: Nightly MCP Server Stress Test, engine:
copilot, run:
https://github.com/github/gh-aw-mcpg/actions/runs/2179168139...
</details>
> **Custom agent used: agentic-workflows**
> GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade
AI-powered workflows with intelligent prompt routing
<!-- START COPILOT CODING AGENT SUFFIX -->
- Fixes #843
<!-- START COPILOT CODING AGENT TIPS -->
---
✨ Let Copilot coding agent [set things up for
you](https://github.com/github/gh-aw-mcpg/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.2 files changed
Lines changed: 154 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
95 | 94 | | |
96 | 95 | | |
97 | 96 | | |
98 | | - | |
| 97 | + | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1243 | 1243 | | |
1244 | 1244 | | |
1245 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
| 1356 | + | |
| 1357 | + | |
| 1358 | + | |
| 1359 | + | |
| 1360 | + | |
| 1361 | + | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
| 1396 | + | |
| 1397 | + | |
0 commit comments