# HackerEarth MCP [Health: Active]

**Category:** 👨‍💻 Code Execution  
**Repository:** https://github.com/pratham-jain33/hackerearth-mcp  
**GitHub Stars:** 0  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/hackerearth-mcp

## Description
Give any AI assistant a code run button via HackerEarth. 24 languages, zero setup.

## Tools
Capabilities this server exposes over MCP:

- **run_code** — Executes a snippet of code on HackerEarth's cloud servers in any of 24 languages. Use when the user wants to test code, see real output instead of predicted output, or check whether a program works. Needs the code and the language identifier, call list_languages if unsure of the exact name. Requires HACKEREARTH_KEY to be set; every run consumes the key owner's HackerEarth API quota. Returns the program's printed output and any error messages.
- **list_languages** — Returns the list of programming languages HackerEarth can execute, with the exact identifiers to pass to run_code. Use this when you are unsure which language name to use, or when the user asks what languages are available. Takes no inputs.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "hackerearth-mcp": {
    "command": "uvx",
    "args": ["hackerearth-mcp"],
    "env": {
      "HACKEREARTH_KEY": ""
    }
  }
}
```

**Requires environment variables:** `HACKEREARTH_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What HackerEarth MCP MCP server does

HackerEarth MCP MCP server connects an MCP-compatible AI assistant to HackerEarth’s code execution API. It gives the assistant a way to submit source code with a selected language, wait for execution to complete, and receive printed output together with compilation or runtime error messages.

The server supports the 24 programming languages available through HackerEarth. Since language identifiers must match HackerEarth’s API values, the server also provides a lookup tool that returns the supported languages and their exact identifiers.

This is an unofficial community project and is not made by, endorsed by, or affiliated with HackerEarth. A HackerEarth client secret is required.

## How it works

An assistant first calls `run_code` with the code and language. The server sends the submission to HackerEarth using the configured client secret and receives a tracking token. It then polls HackerEarth until the execution finishes, after which it returns the program’s output and any reported errors to the assistant.

Execution takes place on HackerEarth’s sandboxed infrastructure rather than on the machine running the MCP server. This makes the server suitable for checking generated code when local compilers, interpreters, or language-specific toolchains are not installed.

## Setup and configuration

Install the package with either of these approaches:

- Run it directly with `uvx hackerearth-mcp`.
- Install it with `pip install hackerearth-mcp`.
- Clone the repository, create a Python virtual environment, and install the project in editable mode.

The runtime requires Python 3.10 or newer. Set `HACKEREARTH_KEY` to the `client-secret` obtained by registering a client in the HackerEarth developer dashboard. The server reads this value from the environment; the key is not hardcoded or sent to the assistant in chat.

For a stdio MCP configuration, set the server command to `uvx`, pass `hackerearth-mcp` as its argument, and provide `HACKEREARTH_KEY` in the server’s environment. When running from source, use the virtual environment’s Python executable and the repository’s `server.py` path instead. Restart the MCP client after changing its configuration.

## Tools and capabilities

The HackerEarth MCP MCP server exposes two tools:

- `run_code`: Sends source code and a language identifier to HackerEarth, waits for the result, and returns printed output plus error messages.
- `list_languages`: Returns every language HackerEarth can execute and the exact identifiers accepted by `run_code`. It requires no inputs.

These tools allow an assistant to check whether a program runs, inspect its output, and surface compile or runtime failures. The server does not provide local execution tools or additional editor features.

## Limitations and notes

The HackerEarth MCP MCP server depends on HackerEarth’s API and requires a valid client secret. Its available languages are limited to the 24 languages exposed by HackerEarth, and callers must use the identifiers returned by `list_languages`.

The project uses HackerEarth’s free tier, which has a request quota. Execution is remote and asynchronous, so the server waits for HackerEarth to complete each submitted run before returning its result. As an unofficial integration, it should be evaluated separately from HackerEarth’s official products and support channels.

_Full upstream README: https://allmcps.com/mcp/hackerearth-mcp/readme_

