MCP-Server

Compiler Explorer

io.github.compiler-explorer/compiler-explorer
Entwicklertools Öffentlich und erreichbar MCP 2026-07-28

Was dieses MCP kann

Compiles source code with multiple compilers, returns assembly and program output, looks up assembly instructions, and creates shareable links.

compile
Compile source code and return assembly output, stdout, and stderr
Nur Lesen
Eingabeschema
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['source', 'language'], 'properties': {'stdin': {'type': 'string', 'description': 'Standard input for execution (requires execute=true)'}, 'source': {'type': 'string', 'description': 'Source code to compile'}, 'execute': {'type': 'boolean', 'description': 'Run the program instead of returning assembly. `asm` becomes empty; runtime output goes to top-level `stdout`/`stderr`; compile diagnostics move to `buildResult.stdout`/`stderr`.'}, 'filters': {'type': 'object', 'properties': {'trim': {'type': 'boolean', 'description': 'Trim whitespace (default: false)'}, 'intel': {'type': 'boolean', 'description': 'Use Intel assembly syntax (default: true)'}, 'labels': {'type': 'boolean', 'description': 'Filter unused labels (default: true)'}, 'demangle': {'type': 'boolean', 'description': 'Demangle symbol names (default: true)'}, 'directives': {'type': 'boolean', 'description': 'Filter assembler directives (default: true)'}, 'commentOnly': {'type': 'boolean', 'description': 'Filter comment-only lines (default: true)'}, 'libraryCode': {'type': 'boolean', 'description': 'Filter library code (default: false)'}}, 'description': 'Output filters'}, 'options': {'type': 'string', 'description': 'Compiler flags (e.g. "-O2 -std=c++20 -Wall")'}, 'compiler': {'type': 'string', 'description': 'Compiler ID from list_compilers (e.g. "g161"). If omitted, uses the language\'s `defaultCompiler` from list_languages.'}, 'language': {'type': 'string', 'description': 'Language ID (e.g. "c++", "c", "rust", "python")'}, 'libraries': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'version'], 'properties': {'id': {'type': 'string', 'description': 'Library ID from list_libraries (e.g. "boost").'}, 'version': {'type': 'string', 'description': 'Version id ("188") OR human form ("1.88.0") â\x80\x94 both accepted.'}}}, 'description': 'Libraries to link.'}, 'maxAsmLines': {'type': 'integer', 'maximum': 9007199254740991, 'description': 'Cap asm output (default 500 lines).', 'exclusiveMinimum': 0}, 'maxStderrLines': {'type': 'integer', 'maximum': 9007199254740991, 'description': 'Cap each stderr stream â\x80\x94 compile and execute separately (default 100).', 'exclusiveMinimum': 0}, 'maxStdoutLines': {'type': 'integer', 'maximum': 9007199254740991, 'description': 'Cap each stdout stream â\x80\x94 compile and execute separately (default 100).', 'exclusiveMinimum': 0}}}
generate_short_url
Create a Compiler Explorer short URL for sharing code with compiler settings
Idempotent
Eingabeschema
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['source', 'language', 'compiler'], 'properties': {'source': {'type': 'string', 'description': 'Source code'}, 'options': {'type': 'string', 'description': 'Compiler flags (e.g. "-O2 -std=c++20")'}, 'compiler': {'type': 'string', 'description': 'Compiler ID from list_compilers (e.g. "g161", "clang_trunk")'}, 'language': {'type': 'string', 'description': 'Language ID (e.g. "c++", "c", "rust")'}, 'libraries': {'type': 'array', 'items': {'type': 'object', 'required': ['id', 'version'], 'properties': {'id': {'type': 'string', 'description': 'Library ID from list_libraries.'}, 'version': {'type': 'string', 'description': 'Version id ("188") OR human form ("1.88.0").'}}}, 'description': 'Libraries to include.'}}}
get_shortlink_info
Retrieve source and compiler config from a CE short URL. Compiler entries are returned in the `compile` tool's shape ({compiler, options, libraries:[{id, version}]}). Multi-pane shortlinks (executors, conformance views, CMake trees, per-compiler filters/tools) are flattened — only the basic compile inputs survive.
Nur Lesen
Eingabeschema
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['id'], 'properties': {'id': {'type': 'string', 'description': 'Short link ID or full URL (e.g. "G38YP7eW4" or "https://godbolt.org/z/G38YP7eW4")'}}}
list_compilers
List available compilers, optionally filtered by language
Nur Lesen
Eingabeschema
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'properties': {'lean': {'type': 'boolean', 'description': 'Force id+name only, regardless of count. Useful to browse the catalog before drilling in.'}, 'match': {'type': 'string', 'description': 'Case-insensitive AND-of-tokens filter on id and name. Punctuation splits tokens; numeric tokens match whole-word ("gcc 14.1" matches "14.1.0" not "14.10"); alphanumeric tokens substring-match ("g14" matches "g142"). Literal text only â\x80\x94 for "newest version" use `latestPerMajor`; for "newest X on arch Y" prefer `instructionSet` + `latestPerMajor`.'}, 'language': {'type': 'string', 'description': 'Language ID to filter by (e.g. "c++", "rust", "python")'}, 'maxResults': {'type': 'integer', 'maximum': 9007199254740991, 'description': 'Cap full-detail entries (default 25). Beyond the cap, degrades to lean (id+name only) with a refinement hint.', 'exclusiveMinimum': 0}, 'instructionSet': {'enum': ['6502', 'aarch64', 'amd64', 'x86', 'arm32', 'avr', 'beam', 'c6x', 'dex', 'ebpf', 'evm', 'eravm', 'ez80', 'hook', 'hppa', 'core', 'java', 'kvx', 'llvm', 'loongarch', 'm68k', 'mips', 'mos6502', 'mpy', 'mrisc32', 'msp430', 'perl', 'powerpc', 'ptx', 'python', 'amd_cdna1', 'amd_cdna2', 'amd_cdna3', 'amd_cdna4', 'amd_cdna5', 'amd_rdna1', 'amd_rdna2', 'amd_rdna3', 'amd_rdna3_5', 'amd_rdna4', 'riscv32', 'riscv64', 's390x', 'sass', 'sh', 'sparc', 'spirv', 'vax', 'wasm32', 'wasm64', 'wdc65c816', 'xtensa', 'z180', 'z80'], 'type': 'string', 'description': 'Target architecture filter. Combine with `latestPerMajor: true` for "newest X for arch Y" (e.g. `{language:"c++", instructionSet:"amd64", latestPerMajor:true}`).'}, 'latestPerMajor': {'type': 'boolean', 'description': '"Newest X" filter. By release track (stable/nightly/prerelease/experimental): newest stable per (language, instructionSet, semver major); all nightly + prerelease; experimental skipped unless `includeExperimental: true`.'}, 'includeExperimental': {'type': 'boolean', 'description': 'With `latestPerMajor: true`, also include experimental compilers (c++ proposal forks, llvm-mos platform variants). Off by default â\x80\x94 bloats "newest X" answers.'}}}
list_languages
List supported languages. Each entry has `defaultCompiler` and `compilerCount`.
Nur Lesen
Eingabeschema
{'type': 'object', 'properties': {}}
list_libraries
List available libraries for a given programming language
Nur Lesen
Eingabeschema
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['language'], 'properties': {'lean': {'type': 'boolean', 'description': 'Force id+name only, regardless of count. Useful to browse the catalog before drilling in.'}, 'match': {'type': 'string', 'description': 'Case-insensitive AND-of-tokens filter on id, name, and version strings (so "boost 1.88" finds Boost when one of its versions matches 1.88.x). Numeric tokens match version-prefix; alphanumeric substring.'}, 'language': {'type': 'string', 'description': 'Language ID (e.g. "c++", "rust")'}, 'maxResults': {'type': 'integer', 'maximum': 9007199254740991, 'description': 'Cap full-detail entries (default 25). Beyond the cap, degrades to lean (id+name only) with a refinement hint.', 'exclusiveMinimum': 0}}}
lookup_asm_instruction
Look up documentation for an assembly instruction
Nur Lesen
Eingabeschema
{'type': 'object', '$schema': 'http://json-schema.org/draft-07/schema#', 'required': ['instruction_set', 'opcode'], 'properties': {'opcode': {'type': 'string', 'description': 'Assembly instruction mnemonic (e.g. "MOV", "ADD", "JMP")'}, 'instruction_set': {'enum': ['6502', 'aarch64', 'amd64', 'amd_cdna1', 'amd_cdna2', 'amd_cdna3', 'amd_cdna4', 'amd_cdna5', 'amd_rdna1', 'amd_rdna2', 'amd_rdna3', 'amd_rdna3_5', 'amd_rdna4', 'arm32', 'avr', 'evm', 'java', 'llvm', 'perl', 'powerpc', 'ptx', 'python', 'riscv64', 'sass', 'wdc65c816'], 'type': 'string', 'description': 'Instruction set architecture (no default â\x80\x94 must match the asm dialect being looked up).'}}}
Geändert
lookup_asm_instruction
1. October 2026 02:44
Geändert
list_compilers
1. October 2026 02:44
Hinzugefügt
get_shortlink_info
17. September 2026 12:41
Hinzugefügt
generate_short_url
17. September 2026 12:41
Hinzugefügt
lookup_asm_instruction
17. September 2026 12:41
Hinzugefügt
list_libraries
17. September 2026 12:41
Hinzugefügt
list_languages
17. September 2026 12:41
Hinzugefügt
list_compilers
17. September 2026 12:41
Hinzugefügt
compile
17. September 2026 12:41