Skip to main content
Glama
Godbolt Compiler Explorer MCP

Godbolt Compiler Explorer MCP

by Benestar

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

Related MCP server: Judge0 CE MCP Server

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • Overleaf MCP server for ChatGPT, Claude and any AI agent: list projects, read file, edit file, compile project, add comment, reply to comment, accept tracked change and invite collaborator in your own Overleaf account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Overleaf yourself; Cotlet does not store your password and you need no Overleaf API key. About the official Overleaf API: Overleaf has no public API to read or change existing projects (checked 5 Nov 2026). Its only API, Open in Overleaf, sends LaTeX in one direction to create a new project. Setup and FAQ: https://cotlet.dev/integrations/overleaf-api-mcp-server

    • Grammarly MCP server for ChatGPT, Claude and any AI agent: list documents, read suggestions, accept or dismiss suggestion, check AI text and plagiarism, get writing score, set document goals, add dictionary word and delete and restore document in your own Grammarly account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Grammarly yourself; Cotlet does not store your password and you need no Grammarly API key. About the official Grammarly API: Grammarly has an official API only for organizations (checked 5 Nov 2026): Writing Score, AI Detection and Plagiarism Detection, plus Analytics and License Management, reached through Contact Sales and OAuth 2.0 credentials. None of them reads or edits your own documents, suggestions, goals or dictionary, and Grammarly has no official MCP server. Setup and FAQ: https://cotlet.dev/integrations/grammarly-api-mcp-server

    • Feedly MCP server for ChatGPT, Claude and any AI agent: list feeds, list articles, search articles, save article to Board, mark articles as read and follow source in your own Feedly account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Feedly yourself; Cotlet does not store your password and you need no Feedly API key. About the official Feedly API: Feedly has a REST API, but only Enterprise clients can create a token, and its documented endpoints are built around Threat Intelligence (checked 17 Oct 2026). Feedly's official MCP server, Feedly Threat Graph, queries threat intelligence and needs an Advanced or Enterprise account. Setup and FAQ: https://cotlet.dev/integrations/feedly-api-mcp-server

      https://cotlet.dev/mcp/v1/feedly
    • Productboard MCP server for ChatGPT, Claude and any AI agent: search features, read feedback, add feedback, link feedback to a feature, mark feedback processed, update feature status and list objectives in your own Productboard account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Productboard yourself; Cotlet does not store your password and you need no Productboard API key. About the official Productboard API: Productboard has a full REST API v2 for notes, entities, teams, members, webhooks and analytics, and a beta MCP server at mcp.productboard.com that works on specs (checked 22 Oct 2026). API tokens need a workspace admin on the Pro plan or higher, and the API reference lists no endpoints for boards. Setup and FAQ: https://cotlet.dev/integrations/productboard-api-mcp-server

    Related MCP Servers