Onlinecompiler MCP logo

Onlinecompiler MCP

by onlinecompiler-io

Execute, test, and judge code in 46 languages through isolated, network-disabled sandboxes.

Install Onlinecompiler MCP

Pick your client, then add it in one click or paste the config.

Streamable HTTP (Remote)
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "onlinecompiler-io-onlinecompiler-mcp": {
      "command": "uvx",
      "args": [
        "onlinecompiler-mcp"
      ],
      "env": {
        "ONLINECOMPILER_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Hosted endpointLive · 2d agoLive Remote EndpointOur automated health check connected to this remote MCP endpoint successfully.Last checked 2d ago · Nov 29, 2026, 05:15 UTC

Clients with native remote MCP support can connect directly to this URL.

Remote endpoint
https://api.onlinecompiler.io/mcp
We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx onlinecompiler-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

onlinecompiler-io/onlinecompiler-mcp connects MCP clients to OnlineCompiler.io for executing and evaluating code in 46 languages. It provides tools to discover compiler identifiers, run programs with input and files, compare outputs against tests, and submit code to stored problems. Each execution uses a fresh gVisor sandbox with 512 MB of memory, a maximum 30-second runtime, and no network access. Use it when an agent needs reproducible code execution or online-judge-style feedback without a local compiler installation.

Use cases

  • Execute generated code with controlled standard input
  • Validate solutions against up to 10 explicit test cases
  • Judge submissions against stored programming problems
  • Inspect generated charts and data files from Python programs

Key features

  • Supports 46 programming languages
  • Runs each program in a fresh network-disabled gVisor sandbox
  • Accepts source files, input data, and helper files
  • Compares outputs with multiple checker modes
  • Returns runtime, memory, status, and generated-file results

Tools4

What Onlinecompiler MCP lets your agent do. Expand a tool for its parameters.

Self-reported~144 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

4/4 checks healthy over the last 14d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 14d ago via OSV.dev · onlinecompiler-mcp (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
Last commit12d agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed4Callable tools this server registers over MCP.

How Onlinecompiler MCP works

What onlinecompiler-io/onlinecompiler-mcp does

onlinecompiler-io/onlinecompiler-mcp exposes OnlineCompiler.io's code execution and judging features through MCP. It supports 46 languages, including Python, C, C++, Java, Go, Rust, JavaScript, TypeScript, SQL, R, Swift, Kotlin, and others. The list_compilers tool returns the available compiler identifiers and versions, so clients can select a valid compiler before running code.

The server is suitable for agents that need to execute generated programs, inspect runtime results, validate solutions against explicit examples, or evaluate submissions against stored programming problems.

How it works

The hosted MCP endpoint is https://api.onlinecompiler.io/mcp. Clients can authenticate through OnlineCompiler.io OAuth where supported, or send an API key using an Authorization: Bearer header. Runs count against the associated plan, and invalid or disabled credentials produce an HTTP 401 response.

Each run starts in a new gVisor sandbox. The environment has 512 MB of memory, a 30-second maximum runtime, and no network access. Programs can receive standard input and up to 20 supplied files, with a combined decoded size limit of 1,000,000 bytes. Files written to $OUTPUT_DIR can be returned for supported formats, including PNG, SVG, CSV, JSON, and text.

The repository also supports self-hosted operation. Streamable HTTP uses port 8080 by default and accepts each caller's bearer token. The --transport stdio mode is intended for local MCP clients and reads the API key from ONLINECOMPILER_API_KEY.

Setup and configuration

For a hosted connection, add https://api.onlinecompiler.io/mcp as a remote MCP server in the client. OAuth sign-in is available in supported clients, while API-key configurations use the Authorization header. Claude Code and Codex provide command-line setup commands; Gemini CLI can install the repository extension; Cline, VS Code, and Cursor accept the endpoint in their MCP configuration files.

A local stdio setup runs onlinecompiler-mcp --transport stdio with ONLINECOMPILER_API_KEY set. A self-hosted Streamable HTTP process can configure its host and port with MCP_HOST and MCP_PORT.

Tools and capabilities

  • list_compilers lists available compiler identifiers and versions.
  • run_code executes source code with standard input, an optional time limit, and optional helper or data files. It returns output, errors, status, exit code, timing, memory usage, truncation indicators, and generated files.
  • run_tests compares a program with up to 10 test cases per call. It returns an overall verdict, a score from 0 to 100, and an individual result for each test. Output checking supports trimmed, exact, token, floating-point, unordered-row, CSV-table, and ordered-table modes.
  • judge_problem evaluates code against a stored problem by ID or slug. It can run all tests or sample tests and returns verdict, score, per-test results, a summary, submission ID, signed receipt, and problem metadata.

Python 3.14 includes libraries such as NumPy, pandas, SciPy, scikit-learn, matplotlib, SymPy, OpenPyXL, Pillow, DuckDB, Polars, and NLTK.

Limitations and notes

run_tests accepts no more than 10 tests in one call, and each test counts as a run. Its per-test time limit is capped at 30 seconds, with a default of 2 seconds; Java, Groovy, and F# receive additional startup allowance. All tests run unless compilation fails or the request reaches its time limit.

Hidden tests used by judge_problem reveal only their verdict, not their inputs or expected outputs. A nonexistent stored problem or failed execution is reported as an error rather than being replaced with generated test data. Network access is unavailable inside every execution sandbox.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Onlinecompiler MCP

onlinecompiler-io/onlinecompiler-mcp is an MCP server that connects AI clients to OnlineCompiler.io for code execution and judging. Its main tools list available compilers, run programs with input and files, test output against cases, and judge submissions against stored problems in isolated sandboxes across 46 languages.

Use the hosted endpoint `https://api.onlinecompiler.io/mcp` without a local installation, or install the repository extension for Gemini CLI. Local deployments can run `onlinecompiler-mcp --transport stdio`; configure `ONLINECOMPILER_API_KEY` for that mode.

Yes, Cursor can connect to it as a remote MCP server. Add the hosted endpoint to `.cursor/mcp.json` and provide the API key in an `Authorization: Bearer` header.

Authenticate with OnlineCompiler.io OAuth in clients that support MCP sign-in, or send an API key as a bearer token. API keys can be supplied in the `Authorization` header for remote connections or through `ONLINECOMPILER_API_KEY` when using local stdio mode.

Yes, `judge_problem` evaluates code against hidden tests for a stored problem and returns their verdicts without exposing their inputs or expected outputs. Use `mode: samples` to run only sample tests, or the default `all` mode for the complete problem test set.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOnlinecompiler MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/onlinecompiler-io-onlinecompiler-mcp?style=directory)](https://allmcps.com/mcp/onlinecompiler-io-onlinecompiler-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/onlinecompiler-io-onlinecompiler-mcp"><img src="https://allmcps.com/api/badge/onlinecompiler-io-onlinecompiler-mcp?style=directory" alt="Onlinecompiler MCP on AllMCPs" /></a>