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": "streamableHttp",
      "url": "https://api.dojocode.io/api/v1/mcp/stream"
    }
  }
}

User settings

  1. Open VS Code Settings (Ctrl+, or Cmd+, on Mac)
  2. Search for MCP
  3. Click Edit in settings.json
  4. Add the DojoCode server:
json
{
  "mcp": {
    "servers": {
      "dojocode": {
        "type": "streamableHttp",
        "url": "https://api.dojocode.io/api/v1/mcp/stream"
      }
    }
  }
}

Authentication

  1. After adding the configuration, reload VS Code (Ctrl+Shift+P > Developer: Reload Window)
  2. Open Copilot Chat in Agent mode (click the agent icon or select it from the chat mode dropdown)
  3. You can type /mcp in the Copilot chat to view server status and manage connections
  4. Copilot will detect the MCP server and open your browser for authorization
  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. 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 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
  • Type /mcp in 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.json must be in the workspace root
  • Verify the URL: https://api.dojocode.io/api/v1/mcp/stream
  • Try adding the configuration to user settings instead