This document describes how to use @matware/e2e-runner with OpenCode.
-
Install the package (if not already installed):
npm install -g @matware/e2e-runner
-
Copy configuration to your project:
# Copy opencode.json to your project root cp node_modules/@matware/e2e-runner/opencode.json ./opencode.json # Or merge with existing opencode.json
-
Copy skills and commands (optional, for skill/command support):
mkdir -p .opencode cp -r node_modules/@matware/e2e-runner/.opencode/* .opencode/
The MCP server is configured as a local type:
{
"mcp": {
"e2e-runner": {
"type": "local",
"command": "node",
"args": ["node_modules/@matware/e2e-runner/bin/mcp-server.js"],
"cwd": "${workspaceFolder}"
}
}
}If installed globally, use the binary name directly:
{
"mcp": {
"e2e-runner": {
"type": "local",
"command": "e2e-runner-mcp"
}
}
}All tools are prefixed with e2e_:
| Tool | Description |
|---|---|
e2e_pool_status |
Check Chrome pool availability |
e2e_list |
List test suites and modules |
e2e_run |
Execute tests (all, suite, or file) |
e2e_create_test |
Create a new test JSON file |
e2e_create_module |
Create a reusable module |
e2e_screenshot |
Retrieve screenshot by hash |
e2e_capture |
Capture screenshot of any URL |
e2e_network_logs |
Inspect network requests from a run |
e2e_learnings |
Query the learning system |
e2e_issue |
Fetch GitHub/GitLab issue details |
e2e_variables |
Manage test variables |
e2e_dashboard_start |
Start the web dashboard |
e2e_dashboard_stop |
Stop the web dashboard |
| Feature | Claude Code | OpenCode |
|---|---|---|
| MCP Config | .mcp.json with mcpServers |
opencode.json with mcp |
| MCP Type | stdio |
local or remote |
| Skills Location | skills/<name>/SKILL.md |
.opencode/skills/<name>/SKILL.md |
| Commands Location | commands/*.md |
.opencode/commands/*.md |
| Frontmatter | allowed_tools array |
No allowed_tools (tools are auto-detected) |
| Skill Triggers | Implicit from description | Explicit triggers array in frontmatter |
| Variable Substitution | ${CLAUDE_PLUGIN_ROOT} |
${workspaceFolder} |
-
MCP Server Configuration
- Claude Code: Uses
mcpServerskey withtype: "stdio" - OpenCode: Uses
mcpkey withtype: "local"ortype: "remote"
- Claude Code: Uses
-
Skills
- Both use
SKILL.mdfiles with YAML frontmatter - OpenCode supports an explicit
triggersarray to activate the skill - Location differs:
.opencode/skills/vsskills/
- Both use
-
Commands
- Claude Code: Supports
allowed_toolsto restrict tool access - OpenCode: Tools are auto-detected from the MCP server
- Location differs:
.opencode/commands/vscommands/
- Claude Code: Supports
-
Variable Expansion
- Claude Code:
${CLAUDE_PLUGIN_ROOT}points to the package root - OpenCode:
${workspaceFolder}points to the current workspace
- Claude Code:
your-project/
├── opencode.json # OpenCode configuration
├── .opencode/
│ ├── skills/
│ │ └── e2e-testing/
│ │ ├── SKILL.md
│ │ └── references/
│ │ ├── action-types.md
│ │ ├── auth-strategies.md
│ │ └── ...
│ └── commands/
│ ├── run.md
│ ├── create-test.md
│ └── verify-issue.md
└── e2e/
├── e2e.config.json # Test configuration
├── tests/ # Test JSON files
└── modules/ # Reusable modules
To make the skill and commands available to all projects:
# Copy to global OpenCode config
mkdir -p ~/.config/opencode/skills
mkdir -p ~/.config/opencode/commands
cp -r node_modules/@matware/e2e-runner/.opencode/skills/* ~/.config/opencode/skills/
cp -r node_modules/@matware/e2e-runner/.opencode/commands/* ~/.config/opencode/commands/- Check that Node.js >= 20 is installed
- Verify the path in
opencode.jsonis correct - Try running the server manually:
node node_modules/@matware/e2e-runner/bin/mcp-server.js
- Restart OpenCode after changing
opencode.json - Check the MCP server logs for errors
- Verify the Chrome pool is running:
npx e2e-runner pool status
- Ensure the skill is in
.opencode/skills/e2e-testing/SKILL.md - Check the frontmatter has
nameanddescription - Try using a trigger word from the
triggersarray