# Compiler Explorer MCP server

> Compile code with many compilers, inspect assembly output, look up instructions and share godbolt.org links

- Listing: https://mcp.tc/i/compiler-explorer
- Connect: use the server's own URL `https://godbolt.org/mcp` (no sign-in); clients connect to it directly. The listing link is a page, not an MCP endpoint.
- Type: remote (Streamable HTTP)
- Auth: none
- Category: [Developer Tools](https://mcp.tc/c/developer-tools)
- Vendor: Compiler Explorer
- Homepage: <https://godbolt.org/>
- Repository: <https://github.com/compiler-explorer/compiler-explorer>

## About

Connects to Compiler Explorer (godbolt.org) so an assistant can compile source code in 30+ languages, optionally run it, and read the assembly, stdout and stderr. It can list languages, compilers and libraries, look up documentation for assembly instructions, and create or read shareable short links.

The server is hosted at https://godbolt.org/mcp and uses streamable HTTP. No sign-in or API key is needed.

## What it can do

- Compile source code and return assembly, stdout and stderr
- Optionally execute compiled programs with stdin
- List supported languages, compilers and libraries
- Look up documentation for assembly instructions
- Create Compiler Explorer short links for sharing
- Retrieve source and settings from an existing short link

## Tools (7)

- `compile`: Compile source code and return assembly, stdout and stderr, optionally executing it (read-only)
- `list_compilers`: List available compilers, optionally filtered by language (read-only)
- `list_languages`: List supported languages with default compiler and compiler count (read-only)
- `list_libraries`: List available libraries for a given language (read-only)
- `lookup_asm_instruction`: Look up documentation for an assembly instruction (read-only)
- `generate_short_url`: Create a Compiler Explorer short URL for sharing code with compiler settings
- `get_shortlink_info`: Retrieve source and compiler config from a short URL (read-only)

## Example prompts

- "Compile this C++ function with GCC -O2 and show me the assembly"
- "Compare the assembly for this loop on Clang and GCC trunk"
- "What does the x86 instruction VPSHUFB do?"
- "Create a godbolt link for this Rust snippet with the latest stable compiler"

## Install

### Claude Code

1. Run this in a terminal, in your project folder:

```bash
claude mcp add --transport http compiler-explorer https://godbolt.org/mcp
```

2. Start Claude Code and type `/mcp`. **compiler-explorer** should show as connected.

Add `--scope user` to make it available in every project, not just this one.

### Claude Desktop

1. Open **Customize → Connectors**, click **+ Add**, then **Add custom connector**.

2. Name it **Compiler Explorer** and paste this URL:

```url
https://godbolt.org/mcp
```

3. Click **Add**. Its tools appear in the chat’s tools menu.

Claude Desktop’s JSON config file only starts local servers. Remote servers go through Connectors, and connectors you add on claude.ai show up here too.

### claude.ai

1. Open the connector form on claude.ai. This button fills in the name and URL for you:

[Add to claude.ai](<https://claude.ai/customize/connectors?modal=add-custom-connector&connectorName=Compiler%20Explorer&connectorUrl=https%3A%2F%2Fgodbolt.org%2Fmcp>) (opens connector settings)

2. Check that the URL reads `https://godbolt.org/mcp` and click **Add**.

3. Turn it on in a chat from the tools menu.

Free plans allow one custom connector. On Team and Enterprise plans an owner adds it under **Organization settings → Connectors**.

### ChatGPT

1. On chatgpt.com, go to **Plugins**, select **+**, then **Add custom MCP server**.

2. Enter a name for the server.

3. Under **Connection**, paste `https://godbolt.org/mcp` as the server URL, then for authentication choose **No authentication**.

4. Check **I understand and want to continue**, then select **Create as a plugin**.

Whether you can add a custom MCP server depends on your ChatGPT plan and your workspace permissions (in Business workspaces, admins and owners can).

### Cursor

[Add to Cursor](<https://cursor.com/install-mcp?name=compiler-explorer&config=eyJ1cmwiOiJodHRwczovL2dvZGJvbHQub3JnL21jcCJ9>) (opens Cursor)

Or add it by hand to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project):

`mcp.json`:

```json
{
  "mcpServers": {
    "compiler-explorer": {
      "url": "https://godbolt.org/mcp"
    }
  }
}
```

### VS Code

[Install in VS Code](<https://vscode.dev/redirect/mcp/install?name=compiler-explorer&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fgodbolt.org%2Fmcp%22%7D>) (opens VS Code)

Or from a terminal:

```bash
code --add-mcp '{"name":"compiler-explorer","type":"http","url":"https://godbolt.org/mcp"}'
```

Or commit it to the repo in `.vscode/mcp.json`:

`.vscode/mcp.json`:

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

### Devin Desktop

1. Add it to `~/.config/devin/mcp_config.json` (macOS and Linux) or `%APPDATA%\devin\mcp_config.json` (Windows):

`mcp_config.json`:

```json
{
  "mcpServers": {
    "compiler-explorer": {
      "serverUrl": "https://godbolt.org/mcp"
    }
  }
}
```

2. Refresh the MCP server list in Cascade.

Devin Desktop is the new name for Windsurf. It reads `serverUrl` (or `url`) for remote servers.

### Codex

```bash
codex mcp add compiler-explorer --url https://godbolt.org/mcp
```

Or edit `~/.codex/config.toml` directly:

`config.toml`:

```toml
[mcp_servers.compiler-explorer]
url = "https://godbolt.org/mcp"
```

### Gemini CLI

```bash
gemini mcp add --transport http compiler-explorer https://godbolt.org/mcp
```

This adds it to the current project. Add `-s user` to use it everywhere.

### Any client

Most clients accept this shape. Some name the URL field differently: `serverUrl` in Devin Desktop, `httpUrl` in Gemini CLI’s settings file.

```json
{
  "mcpServers": {
    "compiler-explorer": {
      "type": "http",
      "url": "https://godbolt.org/mcp"
    }
  }
}
```

Zed puts servers under `context_servers` in its settings. Cline needs `"type": "streamableHttp"`, or it assumes SSE.

Client only starts local servers? Bridge it with `npx -y mcp-remote https://godbolt.org/mcp`.

## Recent changes

- 2026-11-11 05:47 UTC: 6 tools changed. Source: automatic check. Changed: compile, get\_shortlink\_info, list\_compilers, list\_languages, list\_libraries, lookup\_asm\_instruction.
- 2026-11-02 02:23 UTC: Tracking started: 7 tools read. Source: automatic check.

More on the History tab, with descriptions before and after for the newest entries: https://mcp.tc/i/compiler-explorer#history (Atom feed: https://mcp.tc/i/compiler-explorer/history.xml). It records what mcp.tc's anonymous checks saw, every 3 hours where the tool list can be read without sign-in; it is not a security review.

## Details

- Server version: gh-19988
- MCP protocol version: 2025-11-25
- Last checked: 2026-11-18 (reachable)
- Listed: 2026-11-02
- Updated: 2026-11-11

---
Source: https://mcp.tc/i/compiler-explorer (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
