@metaharness/host-copilot
v0.1.2
Published
GitHub Copilot (VSCode) host adapter for agent-harness-generator. Emits .vscode/mcp.json for the Copilot MCP client (ADR-032).
Maintainers
Readme
@metaharness/host-copilot
GitHub Copilot (VSCode) host adapter for agent-harness-generator. The 7th host adapter, per ADR-032.
What it does
Generates the config files a harness needs to run inside GitHub Copilot Chat on VSCode 1.99+. The adapter emits:
.vscode/mcp.json— the MCP server registration table Copilot reads to discover the harness's toolsinstall.md— the runbook that walks the user through the one-time workspace-trust gate VSCode requires before.vscode/mcp.jsonloads
Schema
VSCode 1.99 reads two keys: the newer servers (top-level) and the
Claude-Code-compatible mcpServers. This adapter emits both for
forward + backward compatibility.
{
"servers": {
"codeindex": {
"command": "node",
"args": ["./dist/mcp-server.js"],
"env": { "LOG_LEVEL": "info" }
},
"remote": {
"url": "https://example.com/mcp"
}
},
"mcpServers": { "...": "(same map, for older runtimes)" }
}Each server entry must have either command (stdio) OR url (HTTP
streamable). The package's test contract enforces this.
Constraints
- VSCode 1.99+ — earlier versions don't have first-class MCP support
- Active Copilot subscription required
- Workspace trust gate — VSCode refuses to load
.vscode/mcp.jsonuntil the user trusts the workspace once. The adapter shipsinstall.mdwalking through this.
Install + run
This adapter is normally consumed via npx metaharness <name> --host copilot,
which picks it up from the canonical HOSTS catalog. Direct programmatic use:
import { adapter } from '@metaharness/host-copilot';
const files = adapter.generateConfig!(harnessSpec);
// files === { '.vscode/mcp.json': '...', 'install.md': '...' }License
MIT — see LICENSE.
