Semgrep リモートMCPを Gemini CLI にMCP接続する方法(設定手順)

Semgrep のリモートMCPサーバーを Gemini CLI に約1分でMCP接続。OAuth / 401 の問題は先に OAuth 2.1 デバッガーで確認できます。

🛡️ Official✓ VerifiedStreamable HTTPOAuth 2.1🛡️ A+~284 tok8 tools
Streamable HTTPhttps://mcp.semgrep.ai/mcp

Add to ~/.gemini/settings.json under mcpServers — httpUrl for Streamable HTTP, url for legacy SSE:

{
  "mcpServers": {
    "semgrep": {
      "httpUrl": "https://mcp.semgrep.ai/mcp"
    }
  }
}

接続手順

  1. 設定ファイルを編集 — ~/.gemini/settings.json を開きます。
  2. サーバーを追加 — mcpServers に "semgrep": { "httpUrl": https://mcp.semgrep.ai/mcp } を追加します。
  3. 認証を完了 — 初回呼び出し時に Semgrep の OAuth 認可画面が開きます。許可するとツールが有効になります。
  4. 検証 — オンライン Inspector に https://mcp.semgrep.ai/mcp を貼り付け、initialize と tools/list を実行して接続を確認します。

🧰 ツール一覧(8)

ToolSafetyDescriptionParameters
semgrep_scan
~31 tok
🟢 ReadScan code files with Semgrep rules.—
semgrep_scan_with_custom_rule
~36 tok
🟢 ReadScan code with a custom Semgrep rule.—
get_supported_languages
~34 tok
🟢 ReadList languages supported by Semgrep.—
semgrep_rule_schema
~32 tok
🟢 ReadGet the Semgrep rule YAML schema.—
write_custom_semgrep_rule
~35 tok
🟠 WriteWrite a validated custom Semgrep rule.—
security_check
~32 tok
🟢 ReadRun a security-focused Semgrep scan.—
get_abstract_syntax_tree
~33 tok
🟢 ReadGet the AST of a code snippet.—
semgrep_findings
~31 tok
🟢 ReadList findings of a Semgrep scan.—

その他の接続ガイド