VS Code’s agent mode runs local processes and can also connect to a remote server directly, so it supports every Moodle and Ed Discussion Model Context Protocol (MCP) surface described in MCP servers. Official reference: Use MCP servers in VS Code, fetched 2026-09-21.

Prerequisites

  • moodle-cli and edstem-cli installed and signed in. See Install and Install.
  • VS Code with GitHub Copilot Chat’s agent mode.
VS Code reads MCP servers from a workspace file, .vscode/mcp.json, or from a user-profile file opened with the MCP: Open User Configuration command. Both use a servers key, not mcpServers.

Preferred: moodle mcp connect

This writes a bridge entry to your user-profile mcp.json:

Manual: remote, header auth

Get <your-token> with moodle mcp connect vscode --mode remote --show-token. Avoid hardcoding it in a workspace .vscode/mcp.json you commit — use the user-profile file, or an input variable, instead.
You can also add either server through the command palette: run MCP: Add Server, choose Workspace or Global scope, and follow the prompts instead of editing JSON by hand.

Verify the connection

Run MCP: List Servers from the command palette to see each server’s status and its tools. Use MCP: Reset Trust if VS Code is refusing to start a server you’ve already configured correctly.