MCP Chef
Allows AI agents to interact with CodeChef contests, including fetching problems, testing solutions in a secure sandbox, managing retry states, submitting answers, and tracking contest progress.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
CodeChef Contest MCP Server
An AI-powered competitive programming assistant implementing the Model Context Protocol (MCP). This server allows AI agents (like Claude Desktop or Cursor) to participate in CodeChef contests: fetching problems, generating/testing solutions in a secure sandbox, managing retry states, submitting answers, and tracking contest progress.
π Features
Contest Management: Open contests, retrieve problem lists, and track solved vs. remaining problems.
Browser Automation: Playwright-based logins, problem-statement scraping, submission uploads, and verdict polling.
Secure Sandbox: Docker-isolated compilation and execution (supports C++, Python, Java, Go, Rust) with no internet access, limited CPU/memory, and execution timeouts.
Validation & Retry: Custom edge-case generator, confidence evaluator, and self-repair engine to analyze verdicts and repair failing solutions iteratively.
Related MCP server: Online Judge MCP Server
π Project Structure
MCP_Chef/
β
βββ app/
β βββ browser/ # Playwright-based browser automation (login, submit, poll)
β βββ models/ # SQLAlchemy database schema (SQLite)
β βββ retry_engine/ # Diagnosis & self-repair pipeline
β βββ sandbox/ # Secure Docker runner configuration & language setup
β βββ solver/ # Sequential contest solver state (Q1 β Q5)
β βββ tools/ # Exposed MCP tool decorators
β βββ utils/ # Structured logger and cache layer
β βββ main.py # Streamable HTTP ASGI app
β βββ mcp_server.py # FastMCP server instantiation
β
βββ tests/ # Automated test suite
βββ Dockerfile # Multi-stage container definition
βββ docker-compose.yml # Compose configuration (App, Redis)
βββ run_server.py # Unified server CLI entrypoint (STDIO & HTTP)
βββ .env # Local configuration file (not tracked in Git)π οΈ Local Setup
Prerequisites
Python 3.10+
Docker (Required for sandbox execution)
Node.js (Optional, for
localtunneltesting)
Step 1: Install Dependencies
Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
playwright install chromiumStep 2: Configure Environment
Copy the example environment file and add your CodeChef credentials:
cp .env.example .envOpen .env and set your CodeChef username and password.
Step 3: Run Tests
Verify your local installation:
python -m pytest tests/ -vπ» Running the Server
1. STDIO Transport (For Claude Desktop)
To run the server locally over Standard Input/Output:
python run_server.pyAdd the configuration to your Claude Desktop config (e.g., ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"codechef": {
"command": "/Users/ayushkumarsingh/Downloads/MCP_Chef/venv/bin/python",
"args": ["/Users/ayushkumarsingh/Downloads/MCP_Chef/run_server.py"]
}
}
}2. HTTP Transport (For Cursor/Web Clients)
To run the server over HTTP/SSE:
python run_server.py --http --port 8000Then configure your client to connect to:
http://localhost:8000/mcp
βοΈ Deployment
We have configured deployment setups for both container and VM platforms:
Render (Free Tier): For a quick deployment that does not require a card, see the Render Deployment Guide.
Fly.io (VM with Sandbox): For running with the secure Docker sandbox enabled, see the Fly.io Deployment Guide.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Train, evaluate, red-team and deploy AI agents: prompt tuning, LLM-judged evals, katas.
Create, manage, and judge coding contests end to end on Hunter.
Run and judge hackathons and developer challenges on Loops House from your AI agent.
Build Apps and run code in 30 languages β sandboxed, with persistent sessions for agent loops.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to execute C++ code, test solutions against multiple test cases, analyze performance, and generate test cases using OnlineGDB's online compiler. Perfect for solving competitive programming problems with iterative self-correction capabilities.2MIT
- AlicenseAqualityDmaintenanceProvides tools for AI agents to interact with the Orange Juice Online Judge API by managing problems and code submissions. Users can list problems, retrieve detailed descriptions, submit source code, and track submission status through natural language.51MIT
- FlicenseAqualityCmaintenanceEnables coding agents to discover unsolved Codeforces practice problems, analyze tag performance, and inspect submissions, profiles, rating history, and upcoming contests through MCP-compatible clients.6-
- AlicenseAqualityBmaintenanceConnects AI assistants to the Repovive competitive-programming platform, enabling them to browse problems and contests, judge and submit code for real verdicts, track ratings, communicate with users, and author verified problems and rounds.102MIT