Godbolt Compiler Explorer MCP server

Godbolt Compiler Explorer MCP server

godbolt-mcp•bybenestar

An MCP server built with FastMCP that offers tools and read-only resources for querying the Godbolt Compiler Explorer REST API.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Exposes compilation tools: compile_code compiles source code and compile_cmake compiles a CMake project, with optional user arguments, files, and libraries.
  • •Provides a format_code tool for formatting source code with a chosen formatter.
  • •Offers read-only resources for languages, compilers, libraries, formatters, assembly instruction documentation, and version info.

BEST FOR

  • •Generating and inspecting assembly output for C++ or Rust code through an MCP-compatible agent.
  • •Discovering which compilers and libraries are available for a given language on Compiler Explorer.

ABOUT GODBOLT-MCP

Godbolt Compiler Explorer MCP server is cataloged as an MCP server attributed to benestar. An MCP server built with FastMCP that offers tools and read-only resources for querying the Godbolt Compiler Explorer REST API. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Godbolt Compiler Explorer MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What language supports CMake compilation through the server?

The compile_cmake tool compiles a CMake project using a specified compiler_id, with optional user arguments, files, and libraries.

Can the server format source code?

Yes, the format_code tool formats source code using a specified formatter.

Upstream README

View this exact version on GitHub

README.md · 87bf7a44490c · Fetched 2026-11-13 11:43:27 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Godbolt Compiler Explorer MCP

A Model Context Protocol (MCP) server that provides access to the Godbolt Compiler Explorer REST API endpoints. Built with the FastMCP Python library.

Installation

  1. Clone this repository:
git clone <repository-url>
cd godbolt-mcp
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate
  1. Install dependencies:
pip install -r requirements.txt

Usage

Standalone Usage

Run the MCP server directly:

python godbolt_mcp.py

Adding to MCP-Compatible Agents

Add the server to your MCP configuration (using virtual environment Python):

{
  "mcpServers": {
    "godbolt-compiler-explorer": {
      "command": "/absolute/path/to/godbolt-mcp/venv/bin/python",
      "args": ["/absolute/path/to/godbolt-mcp/godbolt_mcp.py"]
    }
  }
}

Note: Replace /absolute/path/to/godbolt-mcp with the actual absolute path to your installation directory.

Available Tools

Resources (Read-only access)

  • resource://languages - List all supported programming languages
  • resource://compilers/{language_id} - Get available compilers for a specific language
  • resource://libraries/{language_id} - Get available libraries for a specific language
  • resource://formats - List available code formatters
  • resource://asm/{instruction_set}/{opcode} - Get assembly instruction documentation
  • resource://version - Get Compiler Explorer version information

Tools (Actions)

  • compile_code(compiler_id, source, user_arguments=None, files=None, libraries=None) - Compile source code
  • compile_cmake(compiler_id, source, user_arguments=None, files=None, libraries=None) - Compile CMake project
  • format_code(formatter, source) - Format source code

Examples

The examples/ folder contains sample source files you can use to test the MCP server:

  • hello.cpp - Simple C++ "Hello World" program
  • hello.rs - Simple Rust "Hello World" program

Try these prompts with MCP-compatible agents to generate assembly code for the example files:

For C++ example:

Compile the hello.cpp file from the examples folder with GCC and show me the exact generated assembly code with optimization level -O2.

For Rust example:

Compile the hello.rs file from the examples folder with the latest Rust compiler and show me the exact generated assembly code with release optimizations.

Dependencies

  • fastmcp>=0.2.0 - MCP server framework
  • httpx>=0.25.0 - HTTP client for API requests

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Godbolt Compiler Explorer MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/godbolt-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools