Compiler Explorer

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

사용해야 할까요

품질 및 안전성

A
설명 품질
93%
스키마 완전성
89%
이름 품질
97%
오염 위험
100%
권한 일치
90%
프로토콜 준수
100%

발견 사항 (2)

  • LOWTool 'lookup_asm_instruction' description lacks action verblookup_asm_instruction에서
  • LOWTool 'generate_short_url' suggests web access but openWorldHint=falsegenerate_short_url에서

도구 정의와 프로토콜 준수에 대한 자동 분석을 기반으로 합니다.

컨텍스트 비용

~2,161토큰 (도구 정의)
~2.9 KB일반적인 응답 크기
중간 정도의 주의 영향 (128k 컨텍스트의 1.69%)

이는 서버의 도구가 모델의 컨텍스트에 로드될 때마다 소비되는 대략적인 토큰 수입니다. 수치가 높을수록 다른 작업에 사용할 수 있는 주의가 줄어듭니다.

설치

원클릭 설치

`claude_desktop_config.json` 파일에 다음을 추가하세요:

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

원격 엔드포인트

https://godbolt.org/mcpstreamable-http

할 수 있는 일

도구 목록

도구 (7)

🟢 읽기 전용🟡 쓰기🔴 삭제⚪ 알 수 없음
🟢compile(source, language, compiler, options, execute, ...)

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

입력 스키마

{
  "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

입력 스키마

{
  "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`.

입력 스키마

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

List available libraries for a given programming language

입력 스키마

{
  "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

입력 스키마

{
  "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

입력 스키마

{
  "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.

입력 스키마

{
  "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#"
}

커뮤니티

이 서버 평가하기

증거

최근 관측

검증됨버전이 기록되지 않음도구 7개
검증됨버전이 기록되지 않음도구 7개
검증됨버전이 기록되지 않음도구 7개