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": "streamableHttp",
"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
- Click Add new MCP Server
- Fill in the details:
- Name:
dojocode - Type:
streamableHttp - URL:
https://api.dojocode.io/api/v1/mcp/stream
- Name:
Authentication
- After adding the server, Cursor will attempt to connect
- You can type
/mcpin the chat to view server status and trigger a connection - 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
In Cursor's AI chat or inline editing, you can reference DojoCode tools:
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
- Type
/mcpto check the server status and 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