# Compiler Explorer

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 19148
- Author: compiler-explorer
- License: BSD-2-Clause · policy=link-only · description only; the file stays with the author
- Source: https://github.com/compiler-explorer/compiler-explorer
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/compiler-explorer

## What it 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.

## Requirements
- Needs: a prebuilt binary from the repository releases
- Remote server: `https://godbolt.org/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http compiler-explorer https://godbolt.org/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add compiler-explorer --url https://godbolt.org/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "compiler-explorer": {
            "url": "https://godbolt.org/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "compiler-explorer": {
            "type": "http",
            "url": "https://godbolt.org/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http compiler-explorer https://godbolt.org/mcp
```

## When to use it
- 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
- 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

## Similar
- [reference-compiler-cli](https://affpapa.org/en/nevibecode/skills/reference-compiler-cli.md) — skill · 909 installs
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872
- [AIHawk](https://affpapa.org/en/nevibecode/mcp/aihawk.md) — MCP server · ★ 32221

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
