require-github-copilot-target-for-mcp-servers
Require Copilot custom agents that declare mcp-servers to set target: github-copilot.
Rule catalog ID: R010
Targeted pattern scopeâ
.github/agents/**/*.agent.md
What this rule reportsâ
- custom agent files that declare
mcp-serverswithout anytarget - custom agent files that declare
mcp-serverswith an emptytarget - custom agent files that declare
mcp-serverswith a non-github-copilottarget
Why this rule existsâ
The mcp-servers frontmatter is specific to GitHub Copilot-targeted custom agents. If a custom agent opts into mcp-servers but omits target: github-copilot, the file drifts away from the current VS Code contract and can miscommunicate how that agent is meant to run.
â Incorrectâ
---
description: Coordinate release automation through MCP servers
target: vscode
mcp-servers: [release-coordinator.json]
---
Coordinate release automation tasks.
â Correctâ
---
description: Coordinate release automation through MCP servers
target: github-copilot
mcp-servers: [release-coordinator.json]
---
Coordinate release automation tasks.