HackerEarth MCP

v0.2.1
io.github.pratham-jain33/hackerearth-mcp Checked 12 hours ago Published 2 months ago

Give any AI assistant a code run button via HackerEarth.

Values you need

VariableWhat it is
HACKEREARTH_KEYrequired secret Your HackerEarth client-secret (free from hackerearth.com). Code runs against your HackerEarth account quota.

PyPI (uvx) discovery passed

Requires uv (https://docs.astral.sh/uv/)

Run in a terminal
claude mcp add hackerearth-mcp -e 'HACKEREARTH_KEY=<HACKEREARTH_KEY>' -- uvx hackerearth-mcp==0.2.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "hackerearth-mcp": {
      "args": [
        "hackerearth-mcp==0.2.1"
      ],
      "command": "uvx",
      "env": {
        "HACKEREARTH_KEY": "<HACKEREARTH_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "hackerearth-mcp": {
      "args": [
        "hackerearth-mcp==0.2.1"
      ],
      "command": "uvx",
      "env": {
        "HACKEREARTH_KEY": "<HACKEREARTH_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "HACKEREARTH_KEY",
      "id": "hackerearth-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "hackerearth-mcp": {
      "args": [
        "hackerearth-mcp==0.2.1"
      ],
      "command": "uvx",
      "env": {
        "HACKEREARTH_KEY": "${input:hackerearth-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.hackerearth-mcp]
command = "uvx"
args = ["hackerearth-mcp==0.2.1"]
env = { "HACKEREARTH_KEY" = "<HACKEREARTH_KEY>" }

For AI agents

  1. Ask the user for: HACKEREARTH_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: run_code, list_languages.
  5. If it fails, check that the required runtime is installed (uv (https://docs.astral.sh/uv/)) and that the values above are set.

Machine-readable: install.md · manifest.json