Skip to content

Claude Code

Prerequisites

Configuration

Add the DojoCode MCP server to your Claude Code configuration file.

Global configuration (~/.claude/claude_desktop_config.json):

json
{
  "mcpServers": {
    "dojocode": {
      "type": "streamableHttp",
      "url": "https://api.dojocode.io/api/v1/mcp/stream"
    }
  }
}

Project-level configuration (.mcp.json in your project root):

json
{
  "mcpServers": {
    "dojocode": {
      "type": "streamableHttp",
      "url": "https://api.dojocode.io/api/v1/mcp/stream"
    }
  }
}

Authentication

  1. After adding the configuration, start or restart Claude Code
  2. You can type /mcp to view the status of your MCP servers and trigger a connection
  3. When Claude Code connects for the first time, it will open your browser to the DojoCode authorization page
  4. Log in to DojoCode if you are not already logged in (you can use email/password, Google, or GitHub)
  5. Click Approve to grant access
  6. You will see a confirmation page — you can close the browser tab and return to Claude Code
  7. Claude Code is now connected and ready to use DojoCode tools

Usage Examples

Once connected, you can ask Claude to interact with DojoCode naturally:

Browse challenges:

Find me beginner Python challenges about algorithms

Get challenge details:

Show me the details of challenge [challenge-id]

Create a challenge:

Create a new JavaScript challenge called "Reverse a String" with beginner difficulty

Run tests:

Run the tests for my current challenge variation

Join a contest:

Show me upcoming contests and join the next one

Troubleshooting

Connection fails

  • Ensure you have a stable internet connection
  • Verify the MCP server URL is correct: https://api.dojocode.io/api/v1/mcp/stream
  • Restart Claude Code after editing the configuration file

Authorization expired

  • The access token is valid for 90 days
  • If you see authentication errors, type /mcp to check the server status and trigger re-authorization
  • Simply approve the connection again in your browser

Tools not appearing

  • Check that the configuration JSON is valid (no trailing commas, correct syntax)
  • Restart Claude Code after adding the configuration