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": "streamableHttp",
      "url": "https://api.dojocode.io/api/v1/mcp/stream"
    }
  }
}

Global

  1. Open Cursor Settings (Ctrl+Shift+J or Cmd+Shift+J on Mac)
  2. Navigate to MCP in the sidebar
  3. Click Add new MCP Server
  4. Fill in the details:
    • Name: dojocode
    • Type: streamableHttp
    • URL: https://api.dojocode.io/api/v1/mcp/stream

Authentication

  1. After adding the server, Cursor will attempt to connect
  2. You can type /mcp in the chat to view server status and trigger a connection
  3. A browser window opens to the DojoCode authorization page
  4. Log in to DojoCode if needed (email/password, Google, or GitHub are all supported)
  5. Click Approve to grant Cursor access
  6. The browser shows a confirmation — close the tab and return to Cursor
  7. 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 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/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 /mcp to 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