VS Code (GitHub Copilot)
Prerequisites
- VS Code installed
- GitHub Copilot extension installed and active
- A DojoCode account
Configuration
VS Code supports MCP servers through GitHub Copilot's agent mode. You can configure DojoCode at the project level or in your user settings.
Project-level (recommended)
Create a .vscode/mcp.json file in your project root:
json
{
"servers": {
"dojocode": {
"type": "http",
"url": "https://api.dojocode.io/api/v1/mcp/stream"
}
}
}Authentication
- Open the Copilot Chat panel (
Ctrl+Alt+IorCmd+Alt+Ion Mac) - Click Configure Tools — the DojoCode server will already be listed, detected from the
.vscode/mcp.jsonfile - Click the Connect button next to the DojoCode server
- A browser window opens to the DojoCode authorization page
- Log in to DojoCode if needed (email/password, Google, or GitHub)
- Click Approve to authorize
- The browser shows a confirmation page — close the tab and return to VS Code
- The DojoCode tools are now available in Copilot Agent mode
Usage Examples
In Copilot Chat (Agent mode), you can ask:
Browse challenges:
Find beginner challenges on DojoCode about arraysGet challenge info:
Show me details for DojoCode challenge [challenge-id]Create a challenge:
Create a new Ruby challenge on DojoCode called "Palindrome Check"Run tests:
Run the sample tests for this challenge on DojoCodeJoin a contest:
Show me upcoming DojoCode contestsTroubleshooting
Tools not appearing in Copilot
- Make sure you are in Agent mode (not regular chat mode)
- Verify the MCP configuration file is saved and valid JSON
- Reload VS Code after adding the configuration
- Ensure GitHub Copilot extension is up to date
Authorization errors
- The access token is valid for 90 days
- Open Copilot Chat and click Configure Tools to check the server status and trigger re-authorization
- Approve the connection again in your browser
Server not detected
- Check the file path:
.vscode/mcp.jsonmust be in the workspace root - Verify the URL:
https://api.dojocode.io/api/v1/mcp/stream - Try adding the configuration to user settings instead