Claude Code
Prerequisites
- Claude Code installed
- A DojoCode account
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
- After adding the configuration, start or restart Claude Code
- You can type
/mcpto view the status of your MCP servers and trigger a connection - When Claude Code connects for the first time, it will open your browser to the DojoCode authorization page
- Log in to DojoCode if you are not already logged in (you can use email/password, Google, or GitHub)
- Click Approve to grant access
- You will see a confirmation page — you can close the browser tab and return to Claude Code
- 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 algorithmsGet challenge details:
Show me the details of challenge [challenge-id]Create a challenge:
Create a new JavaScript challenge called "Reverse a String" with beginner difficultyRun tests:
Run the tests for my current challenge variationJoin a contest:
Show me upcoming contests and join the next oneTroubleshooting
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
/mcpto 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