
HackerEarth MCP
io.github.pratham-jain33由 GitHub 帳號 pratham-jain33 發布v0.2.1更新於 Oct 24, 2026
Give any AI assistant a code run button via HackerEarth. 24 languages, zero setup.
概覽
在 HackerEarth 沙箱雲端伺服器上執行 24 種語言的程式碼並回傳真實輸出,讓助理能實際測試程式片段而非憑空猜測。
- 可以做什麼
- 執行程式碼:把程式碼與語言送到 HackerEarth,取回列印輸出與錯誤訊息。
- 列出語言:查看所有支援的語言識別碼,並支援 python 等友善別名對應到正確識別碼。
- 核對結果:助理可驗證函式是否正確並說明實際輸出。
- 適用情境
- 適合希望助理真正執行小程式、檢查程式片段是否正確,或在不安裝本機工具鏈的情況下比較不同語言輸出的情境。
- 執行需求
- 本機 Python 套件(Python 3.10 以上),透過 uvx 或 pip 安裝,在桌面助理中執行。需要 HackerEarth 用戶端密鑰,透過環境變數 HACKEREARTH_KEY 提供,可於 HackerEarth 開發者面板免費取得。需要連線至 HackerEarth 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 HackerEarth MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
hackerearth-mcp
mcp-name: io.github.pratham-jain33/hackerearth-mcp
[License: MIT] [Python 3.10+] [MCP Compatible] [Version] [PyPI] [Stars] [Tests]
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.
Why
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.
Tools
Installation
Features
- Exposes two MCP tools:
run_codeandlist_languages. - Executes code in 24 programming languages via HackerEarth's sandboxed cloud servers.
- Provides friendly language aliases (e.g.,
python→PYTHON3). - Returns real program output and error messages.
- Gracefully handles missing
HACKEREARTH_KEYand unknown languages without making network calls. - Lists all supported language identifiers.
- Simple installation via
uvxorpip. - Compatible with any MCP‑compatible AI assistant (Claude Desktop, Cursor, etc.).
Tech/framework used
- Language: Python (>=3.10)
- Core libraries: FastMCP (provides MCP server framework), requests (HTTP client)
Quickstart
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:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
From source, point at your checkout instead:
Restart Claude Desktop, then try: "run this Python program and tell me what it prints: print(6 * 7)"
Configuration
How it works
(This section is written by the project's author.)
- You ask the assistant to run some code.
- The assistant calls
run_codewith the code and the language. - The server sends it to HackerEarth with your key and gets back a tracking token.
- The server polls HackerEarth until the run finishes.
- HackerEarth runs the code in a sealed sandbox on their machines.
- The server hands the output back to the assistant, which explains it to you.
Screenshots
Code style
No explicit linting or formatting tools are configured. The code follows standard PEP 8 conventions as observed in the source files.
Build status
Example session
Roadmap
- v0.1 — code submission, status polling, output download, compile/runtime error reporting, 24-language list
- v0.2 — PyPI packaging, install and run with a single
uvx hackerearth-mcpcommand,server.jsonfor the official MCP registry - Published to the official MCP registry and Glama; submitted to awesome-mcp
Contributing
Issues 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.
License
MIT © Pratham Jain. See LICENSE.
Acknowledgments
Built on HackerEarth's code execution API and the Model Context Protocol. Thanks to HackerEarth for a genuinely developer-friendly free tier.
Tests
The repository includes a local test script test_local.py. To run the tests:
The GitHub Actions workflow test.yml executes the same commands on each push/pull request.
API reference
run_code(code: str, language: str) -> strExecutes the suppliedcodein the specifiedlanguageon HackerEarth and returns the program's printed output or error messages.list_languages() -> strReturns a newline‑separated list of all supported language identifiers (e.g.,PYTHON3,JAVASCRIPT_NODE)._normalize_language(lang: str) -> str(internal) Normalizes user‑provided language names or aliases to the exact HackerEarth identifiers.- MCP registration is performed via
FastMCP("hackerearth-mcp")which automatically registers the two tools above.
Created with repo-doctor
來源:README.md,提交 b639e2d
工具
0版本歷史
1- v0.2.1最新Sep 27, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分