Godbolt Compiler Explorer
БесплатноНе проверенEnables compiling source code and exploring assembly outputs via the Godbolt Compiler Explorer API. Supports multiple languages, compilers, and optimization lev
Описание
Enables compiling source code and exploring assembly outputs via the Godbolt Compiler Explorer API. Supports multiple languages, compilers, and optimization levels.
README
A Model Context Protocol (MCP) server that provides access to the Godbolt Compiler Explorer REST API endpoints. Built with the FastMCP Python library.
Installation
- Clone this repository:
git clone <repository-url>
cd godbolt-mcp
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate
- 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 languagesresource://compilers/{language_id}- Get available compilers for a specific languageresource://libraries/{language_id}- Get available libraries for a specific languageresource://formats- List available code formattersresource://asm/{instruction_set}/{opcode}- Get assembly instruction documentationresource://version- Get Compiler Explorer version information
Tools (Actions)
compile_code(compiler_id, source, user_arguments=None, files=None, libraries=None)- Compile source codecompile_cmake(compiler_id, source, user_arguments=None, files=None, libraries=None)- Compile CMake projectformat_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" programhello.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 frameworkhttpx>=0.25.0- HTTP client for API requests
Установка Godbolt Compiler Explorer
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/Benestar/godbolt-mcpFAQ
Godbolt Compiler Explorer MCP бесплатный?
Да, Godbolt Compiler Explorer MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Godbolt Compiler Explorer?
Нет, Godbolt Compiler Explorer работает без API-ключей и переменных окружения.
Godbolt Compiler Explorer — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Godbolt Compiler Explorer в Claude Desktop, Claude Code или Cursor?
Открой Godbolt Compiler Explorer на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
GitHub
PRs, issues, code search, CI status
автор: GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
автор: mcpdotdirectCompare Godbolt Compiler Explorer with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development
