The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the HackerEarth MCP listing page.
mcp-name: io.github.pratham-jain33/hackerearth-mcp
Also listed on Glama with one-click deploy.
Give any AI assistant a code run button.
Unofficial community project. Not made by, endorsed by, or affiliated with HackerEarth. You bring your own free HackerEarth API key.
AI assistants are great at writing code and terrible at knowing whether it works. They guess. This server plugs into any MCP-compatible assistant (Claude Desktop, Claude Code, Cursor, and more) and lets it actually run code in 24 programming languages on HackerEarth's sandboxed servers, then read the real output. No local toolchains to install. Nothing untrusted ever touches your machine.
| Tool | Description |
|---|---|
run_code | Sends code plus a language to HackerEarth, waits for it to run, and returns the printed output and any error messages. |
list_languages | Lists every language HackerEarth can run, with the exact identifiers to pass to run_code. Takes no inputs. |
1. Get a free HackerEarth API key
Register a client in the HackerEarth developer dashboard to receive a client-secret. The free tier includes a generous request quota.
2. Install
No cloning needed:
or with pip:
From source instead:
3. Connect your assistant
Claude Desktop config file:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonFrom source, point at your checkout instead:
Restart Claude Desktop, then try: "run this Python program and tell me what it prints: print(6 * 7)"
| Variable | Required | Description |
|---|---|---|
HACKEREARTH_KEY | Yes | Your HackerEarth client-secret. Read from the environment, never hardcoded, never sent to the assistant in chat. |
(This section is written by the project's author.)
run_code with the code and the language.uvx hackerearth-mcp command, server.json for the official MCP registryIssues and pull requests are welcome. If you add a tool, write its description the way you'd explain it to a smart friend who has never seen it — the assistant reads that text to decide when to use it.
MIT © Pratham Jain. See LICENSE.
Built on HackerEarth's code execution API and the Model Context Protocol. Thanks to HackerEarth for a genuinely developer-friendly free tier.