Compiler Explorer — Claude Code MCP server: compile and inspect
Gives your agent access to godbolt.org: compile code, read the assembly, share links. Useful when you want to see what your C++ or Rust actually turns into.
claude mcp add --transport http compiler-explorer https://godbolt.org/mcpWhat Compiler Explorer does
The server wires an AI agent into the public Compiler Explorer API. You ask it to compile a snippet, pick a compiler and look at the output — the agent does that through godbolt.org, not on your machine.
C, C++, C#, F#, Rust, Go, D, Haskell, Swift, Pascal, ispc, Python, Java and more are supported. Each language has several compilers to choose from. Read the assembly, compare output across compiler versions, grab a link you can send to a colleague.
The server is remote, at https://godbolt.org/mcp. Nothing to install locally, but it will not compile your private code either: everything goes to someone else's server. Not an option for closed-source work.
What it helps with
- see what assembly a C++ function compiles to
- compare two compiler versions on the same snippet
- get a godbolt.org link to send to a colleague
- check how Rust or Go compiles a specific piece of code
- inspect optimisation without a local toolchain
Example prompts for the agent
- Compile this C++ snippet and show me the assembly
- Compare gcc and clang output for this function
- Make a godbolt.org link with this code
How to install Compiler Explorer
Platform CLI: remote server
claude mcp add --transport http compiler-explorer https://godbolt.org/mcpPlatform CLI: remote server
codex mcp add compiler-explorer --url https://godbolt.org/mcpConfig file
{
"mcpServers": {
"compiler-explorer": {
"url": "https://godbolt.org/mcp"
}
}
}Config file
{
"servers": {
"compiler-explorer": {
"type": "http",
"url": "https://godbolt.org/mcp"
}
}
}Platform CLI: remote server
gemini mcp add -t http compiler-explorer https://godbolt.org/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 Compiler Explorer
How do I install Compiler Explorer in Claude Code?
With one command: claude mcp add --transport http compiler-explorer https://godbolt.org/mcp.
What does Compiler Explorer do?
It compiles code through godbolt.org and returns the assembly, the build result and a shareable link.
Do I need anything installed locally?
No. The server is remote and lives at https://godbolt.org/mcp. Your code does go to an external server, so keep closed-source projects out of it.