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.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

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.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 87bf7a44490c · 采集于 2026-11-13 11:43:27 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

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.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

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