Compiler Explorer

Compile code with thousands of compilers, inspect the assembly, and share godbolt.org links

¿Debería usar esto?

Calidad y seguridad

A
Calidad de la descripción
93%
Integridad del esquema
89%
Calidad de los nombres
97%
Riesgo de envenenamiento
100%
Coincidencia de permisos
90%
Cumplimiento del protocolo
100%

Hallazgos (2)

  • LOWTool 'lookup_asm_instruction' description lacks action verben lookup_asm_instruction
  • LOWTool 'generate_short_url' suggests web access but openWorldHint=falseen generate_short_url

Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.

Costo de contexto

~2,161Tokens (definiciones de herramientas)
~2.9 KBTamaño de respuesta típico
Impacto moderado en la atención (1.69% del contexto de 128k)

Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.

Instalar

Instalación con un clic

Agrega esto a tu archivo `claude_desktop_config.json`:

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

Puntos de conexión remotos

https://godbolt.org/mcpstreamable-http

Qué puede hacer

Inventario de herramientas

Herramientas (7)

🟢 Solo lectura🟡 Escritura🔴 Eliminación⚪ Desconocido
🟢compile(source, language, compiler, options, execute, ...)

Compile source code and return assembly output, stdout, and stderr

Esquema de entrada

{
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "description": "Source code to compile"
    },
    "language": {
      "type": "string",
      "description": "Language ID (e.g. \"c++\", \"c\", \"rust\", \"python\")"
    },
    "compiler": {
      "description": "Compiler ID from list_compilers (e.g. \"g161\"). If omitted, uses the language's `defaultCompiler` from list_languages.",
      "type": "string"
    },
    "options": {
      "description": "Compiler flags (e.g. \"-O2 -std=c++20 -Wall\")",
      "type": "string"
    },
    "execute": {
      "description": "Run the program instead of returning assembly. `asm` becomes empty; runtime output goes to top-level `stdout`/`stderr`; compile diagnostics move to `buildResult.stdout`/`stderr`.",
      "type": "boolean"
    },
    "stdin": {
      "description": "Standard input for execution (requires execute=true)",
      "type": "string"
    },
    "filters": {
      "description": "Output filters",
      "type": "object",
      "properties": {
        "intel": {
          "description": "Use Intel assembly syntax (default: true)",
          "type": "boolean"
        },
        "demangle": {
          "description": "Demangle symbol names (default: true)",
          "type": "boolean"
        },
        "directives": {
          "description": "Filter assembler directives (default: true)",
          "type": "boolean"
        },
        "commentOnly": {
          "description": "Filter comment-only lines (default: true)",
          "type": "boolean"
        },
        "labels": {
          "description": "Filter unused labels (default: true)",
          "type": "boolean"
        },
        "libraryCode": {
          "description": "Filter library code (default: false)",
          "type": "boolean"
        },
        "trim": {
          "description": "Trim whitespace (default: false)",
          "type": "boolean"
        }
      }
    },
    "libraries": {
      "description": "Libraries to link.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Library ID from list_libraries (e.g. \"boost\")."
          },
          "version": {
            "type": "string",
            "description": "Version id (\"188\") OR human form (\"1.88.0\") — both accepted."
          }
        },
        "required": [
          "id",
          "version"
        ]
      }
    },
    "maxAsmLines": {
      "description": "Cap asm output (default 500 lines).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "maxStdoutLines": {
      "description": "Cap each stdout stream — compile and execute separately (default 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "maxStderrLines": {
      "description": "Cap each stderr stream — compile and execute separately (default 100).",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "source",
    "language"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢list_compilers(language, instructionSet, match, maxResults, lean, ...)

List available compilers, optionally filtered by language

Esquema de entrada

{
  "type": "object",
  "properties": {
    "language": {
      "description": "Language ID to filter by (e.g. \"c++\", \"rust\", \"python\")",
      "type": "string"
    },
    "instructionSet": {
      "description": "Target architecture filter. Combine with `latestPerMajor: true` for \"newest X for arch Y\" (e.g. `{language:\"c++\", instructionSet:\"amd64\", latestPerMajor:true}`).",
      "type": "string",
      "enum": [
        "6502",
        "aarch64",
        "amd64",
        "x86",
        "arm32",
        "avr",
        "beam",
        "c6x",
        "dex",
        "ebpf",
        "evm",
        "eravm",
        "ez80",
        "hook",
        "hppa",
        "core",
        "java",
        "kvx",
        "llvm",
        "loongarch",
        "m68k",
        "mips",
        "mos6502",
        "mpy",
        "mrisc32",
        "msp430",
        "perl",
        "powerpc",
        "ptx",
        "python",
        "amd_cdna1",
        "amd_cdna2",
        "amd_cdna3",
        "amd_cdna4",
        "amd_cdna5",
        "amd_rdna1",
        "amd_rdna2",
        "amd_rdna3",
        "amd_rdna3_5",
        "amd_rdna4",
        "riscv32",
        "riscv64",
        "s390x",
        "sass",
        "sh",
        "sparc",
        "spirv",
        "vax",
        "wasm32",
        "wasm64",
        "wdc65c816",
        "xtensa",
        "z180",
        "z80"
      ]
    },
    "match": {
      "description": "Case-insensitive AND-of-tokens filter on id and name. Punctuation splits tokens; numeric tokens match whole-word (\"gcc 14.1\" matches \"14.1.0\" not \"14.10\"); alphanumeric tokens substring-match (\"g14\" matches \"g142\"). Literal text only — for \"newest version\" use `latestPerMajor`; for \"newest X on arch Y\" prefer `instructionSet` + `latestPerMajor`.",
      "type": "string"
    },
    "maxResults": {
      "description": "Cap full-detail entries (default 25). Beyond the cap, degrades to lean (id+name only) with a refinement hint.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "lean": {
      "description": "Force id+name only, regardless of count. Useful to browse the catalog before drilling in.",
      "type": "boolean"
    },
    "latestPerMajor": {
      "description": "\"Newest X\" filter. By release track (stable/nightly/prerelease/experimental): newest stable per (language, instructionSet, semver major); all nightly + prerelease; experimental skipped unless `includeExperimental: true`.",
      "type": "boolean"
    },
    "includeExperimental": {
      "description": "With `latestPerMajor: true`, also include experimental compilers (c++ proposal forks, llvm-mos platform variants). Off by default — bloats \"newest X\" answers.",
      "type": "boolean"
    }
  },
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢list_languages

List supported languages. Each entry has `defaultCompiler` and `compilerCount`.

Esquema de entrada

{
  "type": "object",
  "properties": {}
}
🟢list_libraries(language, match, maxResults, lean)

List available libraries for a given programming language

Esquema de entrada

{
  "type": "object",
  "properties": {
    "language": {
      "type": "string",
      "description": "Language ID (e.g. \"c++\", \"rust\")"
    },
    "match": {
      "description": "Case-insensitive AND-of-tokens filter on id, name, and version strings (so \"boost 1.88\" finds Boost when one of its versions matches 1.88.x). Numeric tokens match version-prefix; alphanumeric substring.",
      "type": "string"
    },
    "maxResults": {
      "description": "Cap full-detail entries (default 25). Beyond the cap, degrades to lean (id+name only) with a refinement hint.",
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "lean": {
      "description": "Force id+name only, regardless of count. Useful to browse the catalog before drilling in.",
      "type": "boolean"
    }
  },
  "required": [
    "language"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢lookup_asm_instruction(instruction_set, opcode)

Look up documentation for an assembly instruction

Esquema de entrada

{
  "type": "object",
  "properties": {
    "instruction_set": {
      "type": "string",
      "enum": [
        "6502",
        "aarch64",
        "amd64",
        "amd_cdna1",
        "amd_cdna2",
        "amd_cdna3",
        "amd_cdna4",
        "amd_cdna5",
        "amd_rdna1",
        "amd_rdna2",
        "amd_rdna3",
        "amd_rdna3_5",
        "amd_rdna4",
        "arm32",
        "avr",
        "evm",
        "java",
        "llvm",
        "perl",
        "powerpc",
        "ptx",
        "python",
        "riscv64",
        "sass",
        "wdc65c816"
      ],
      "description": "Instruction set architecture (no default — must match the asm dialect being looked up)."
    },
    "opcode": {
      "type": "string",
      "description": "Assembly instruction mnemonic (e.g. \"MOV\", \"ADD\", \"JMP\")"
    }
  },
  "required": [
    "instruction_set",
    "opcode"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟡generate_short_url(source, language, compiler, options, libraries)

Create a Compiler Explorer short URL for sharing code with compiler settings

Esquema de entrada

{
  "type": "object",
  "properties": {
    "source": {
      "type": "string",
      "description": "Source code"
    },
    "language": {
      "type": "string",
      "description": "Language ID (e.g. \"c++\", \"c\", \"rust\")"
    },
    "compiler": {
      "type": "string",
      "description": "Compiler ID from list_compilers (e.g. \"g161\", \"clang_trunk\")"
    },
    "options": {
      "description": "Compiler flags (e.g. \"-O2 -std=c++20\")",
      "type": "string"
    },
    "libraries": {
      "description": "Libraries to include.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Library ID from list_libraries."
          },
          "version": {
            "type": "string",
            "description": "Version id (\"188\") OR human form (\"1.88.0\")."
          }
        },
        "required": [
          "id",
          "version"
        ]
      }
    }
  },
  "required": [
    "source",
    "language",
    "compiler"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}
🟢get_shortlink_info(id)

Retrieve source and compiler config from a CE short URL. Compiler entries are returned in the `compile` tool's shape ({compiler, options, libraries:[{id, version}]}). Multi-pane shortlinks (executors, conformance views, CMake trees, per-compiler filters/tools) are flattened — only the basic compile inputs survive.

Esquema de entrada

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Short link ID or full URL (e.g. \"G38YP7eW4\" or \"https://godbolt.org/z/G38YP7eW4\")"
    }
  },
  "required": [
    "id"
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Comunidad

Califica este servidor

Evidencia

Observaciones recientes

verificadoversión no registrada7 herramientas
verificadoversión no registrada7 herramientas
verificadoversión no registrada7 herramientas