Skip to content

VS Code (GitHub Copilot) ​

Prerequisites ​

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.

Create a .vscode/mcp.json file in your project root:

json
{
  "servers": {
    "dojocode": {
      "type": "http",
      "url": "https://api.dojocode.io/api/v1/mcp"
    }
  }
}

Authentication ​

  1. Open the Copilot Chat panel (Ctrl+Alt+I or Cmd+Alt+I on Mac)
  2. Click Configure Tools — the DojoCode server will already be listed, detected from the .vscode/mcp.json file
  3. Click the Connect button next to the DojoCode server
  4. A browser window opens to the DojoCode authorization page
  5. Log in to DojoCode if needed (email/password, Google, or GitHub)
  6. Click Approve to authorize
  7. The browser shows a confirmation page — close the tab and return to VS Code
  8. 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 arrays

Get 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 DojoCode

Join a contest:

Show me upcoming DojoCode contests

Troubleshooting ​

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.json must be in the workspace root
  • Verify the URL: https://api.dojocode.io/api/v1/mcp
  • Try adding the configuration to user settings instead