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": "streamableHttp",
"url": "https://api.dojocode.io/api/v1/mcp/stream"
}
}
}User settings
- Open VS Code Settings (
Ctrl+,orCmd+,on Mac) - Search for MCP
- Click Edit in settings.json
- Add the DojoCode server:
json
{
"mcp": {
"servers": {
"dojocode": {
"type": "streamableHttp",
"url": "https://api.dojocode.io/api/v1/mcp/stream"
}
}
}
}Authentication
- After adding the configuration, reload VS Code (
Ctrl+Shift+P> Developer: Reload Window) - Open Copilot Chat in Agent mode (click the agent icon or select it from the chat mode dropdown)
- You can type
/mcpin the Copilot chat to view server status and manage connections - Copilot will detect the MCP server and open your browser for authorization
- 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
- Back in 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
- Type
/mcpin Copilot chat 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