You are configuring a GitHub Copilot agent and need to add a custom MCP server that exposes a database query tool. Your agent definition file currently has no tools section. Which configuration block correctly adds the MCP server so the agent can discover and call the database tool?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Think of an MCP server like a power strip — the agent definition is the wall outlet, and you need the right adapter (the tools block with mcp entry) to plug the server in. The tools section is where agents declare every MCP server they want to use, specifying transport (stdio for local process, sse for remote HTTP) and how to reach the server. The other options describe fictional mechanisms that don't exist in the GitHub Copilot agent spec.
Full explanation below image
Full Explanation
GitHub Copilot agents use a structured definition file (typically copilot-agent.yml or equivalent) to declare the tools they can access. When adding an MCP (Model Context Protocol) server, the correct approach is to include a tools section with an mcp array entry. Each entry requires at minimum: a name (how the agent refers to the server), a transport specifier (stdio for a locally spawned process or sse for a server-sent events HTTP endpoint), and either a command/args array (for stdio) or a url (for sse) so the runtime knows how to start or connect to the server.
Option A is incorrect because there is no plugins or external_tools key in the Copilot agent definition spec. This terminology belongs to other plugin ecosystems (e.g., VS Code extensions), not MCP configuration.
Option B is correct. The tools block with an mcp entry is the canonical way to register an MCP server. The runtime reads this at startup, spawns or connects to the server, introspects the available tools via the MCP handshake, and makes them callable by the model.
Option C is incorrect. While MCP servers can be distributed as npm packages, the agent does not auto-install packages from an extensions key. The operator must install the server separately and then configure it in the tools section.
Option D is incorrect. CODEOWNERS is a GitHub repository feature for code review ownership; it has no role in agent tool configuration or permissions.
Understanding this syntax is foundational because every other MCP-related configuration task — allow lists, remote endpoints, registries — builds on top of having a correctly declared MCP server entry in the tools block.