Cursor
Prerequisites
- Cursor installed
- A DojoCode account
Configuration
Cursor supports MCP servers through its settings. You can configure the DojoCode MCP server at the project level or globally.
Project-level (recommended)
Create a .cursor/mcp.json file in your project root:
json
{
"mcpServers": {
"dojocode": {
"type": "http",
"url": "https://api.dojocode.io/api/v1/mcp/stream"
}
}
}Global
- Open Cursor Settings (
Ctrl+Shift+JorCmd+Shift+Jon Mac) - Navigate to MCP in the sidebar
Authentication
- Click the Connect button next to the DojoCode server
- A browser window opens to the DojoCode authorization page
- Log in to DojoCode if needed (email/password, Google, or GitHub are all supported)
- Click Approve to grant Cursor access
- The browser shows a confirmation — close the tab and return to Cursor
- The MCP server status in Cursor should now show as connected (green indicator)
Usage Examples
Once connected, you can start using DojoCode tools directly in Cursor's AI chat or inline editing:
Search for challenges:
Use DojoCode to find TypeScript challenges about data structuresGet challenge details:
Get the details for DojoCode challenge [challenge-id]Create a challenge:
Create a beginner Python challenge on DojoCode called "FizzBuzz"Run tests:
Run the tests for this challenge on DojoCodeTroubleshooting
Server shows as disconnected
- Verify the URL:
https://api.dojocode.io/api/v1/mcp/stream - Click the refresh icon next to the server in MCP settings
- Restart Cursor if the issue persists
Authorization expired
- The token is valid for 90 days
- Go to Cursor Settings > MCP and click the refresh icon next to the DojoCode server to trigger re-authorization
- Approve the connection again in your browser
Tools not available in chat
- Make sure the MCP server shows a green status in settings
- Try starting a new chat session after connecting