Skip to content

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.

Create a .cursor/mcp.json file in your project root:

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

Global ​

  1. Open Cursor Settings (Ctrl+Shift+J or Cmd+Shift+J on Mac)
  2. Navigate to MCP in the sidebar

Authentication ​

  1. Click the Connect button next to the DojoCode server
  2. A browser window opens to the DojoCode authorization page
  3. Log in to DojoCode if needed (email/password, Google, or GitHub are all supported)
  4. Click Approve to grant Cursor access
  5. The browser shows a confirmation — close the tab and return to Cursor
  6. 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 structures

Get 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 DojoCode

Troubleshooting ​

Server shows as disconnected ​

  • Verify the URL: https://api.dojocode.io/api/v1/mcp
  • 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