OnlineCompiler.io — Claude Code MCP server for running code
The OnlineCompiler.io MCP server for Claude Code runs programs in 46 languages inside fresh, offline sandboxes. Agents can execute code and check it against tests.
MIT updated 2026-11-10
claude mcp add --transport http compiler https://api.onlinecompiler.io/mcpWhat OnlineCompiler.io does
OnlineCompiler.io gives an agent tools to run programs, compare output with test cases, and judge solutions to stored problems. It can list available compilers and run code with input or supplied files. Each run starts in a new sandbox with network access disabled.
The hosted endpoint is https://api.onlinecompiler.io/mcp. Access requires OAuth sign-in or an API key, and runs count against the service plan. In Claude Code, add the server with claude mcp add --transport http onlinecompilerio https://api.onlinecompiler.io/mcp, then open /mcp and sign in. Using a key requires separate configuration.
What it helps with
- run a code snippet with a chosen compiler
- compare program output with test cases
- judge a solution to a stored problem
Example prompts for the agent
- Run this Python code and show me its output.
- Check this program against these tests and compare actual and expected output.
- Judge my solution for the
two-sumproblem.
How to install OnlineCompiler.io
Platform CLI: remote server
claude mcp add --transport http compiler https://api.onlinecompiler.io/mcpPlatform CLI: remote server
codex mcp add onlinecompilerio --url https://api.onlinecompiler.io/mcpConfig file
{
"mcpServers": {
"onlinecompilerio": {
"url": "https://api.onlinecompiler.io/mcp"
}
}
}Config file
{
"servers": {
"onlinecompilerio": {
"type": "http",
"url": "https://api.onlinecompiler.io/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http onlinecompilerio https://api.onlinecompiler.io/mcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about OnlineCompiler.io
How do I install OnlineCompiler.io in Claude Code?
Run claude mcp add --transport http onlinecompilerio https://api.onlinecompiler.io/mcp. Then open /mcp, select the server, and sign in to OnlineCompiler.io.
What does OnlineCompiler.io do?
It runs code in multiple languages, checks programs against test cases, and judges solutions to stored problems. Each run uses a new sandbox with network access disabled.
What does OnlineCompiler.io require?
It needs access to the hosted endpoint https://api.onlinecompiler.io/mcp and authentication through OAuth or an API key. Runs count against the OnlineCompiler.io plan.