Semgrep MCP Server

local-only server

The server can only run on the client’s local machine because it depends on local resources.

Integrations

  • Enables cloning repositories for code analysis and scanning with Semgrep.

  • Supports working with Semgrep rules defined in YAML format, allowing for rule creation and management.

Semgrep 서버

Semgrep을 개발 환경에 통합하기 위한 MCP(Model Context Protocol) 서버입니다. 이 서버를 사용하면 MCP 프로토콜을 통해 정적 코드 분석을 수행하고 Semgrep 규칙을 직접 관리할 수 있습니다.

설치

지엑스피1

사용

서버는 다음과 같은 방법으로 시작할 수 있습니다.

# Produktionsmodus npm start # Entwicklungsmodus npm run dev

사용 가능한 도구

서버는 다음과 같은 MCP 도구를 제공합니다.

  • scan_directory : 디렉토리에서 Semgrep 검사를 실행합니다.
  • list_rules : 사용 가능한 Semgrep 규칙을 나열합니다.
  • analyze_results : 스캔 결과를 분석합니다.
  • create_rule : 새로운 Semgrep 규칙을 생성합니다.
  • filter_results : 다양한 기준에 따라 스캔 결과를 필터링합니다.
  • export_results : 다양한 형식으로 검사 결과를 내보냅니다.
  • compare_results : 두 개의 스캔 결과를 비교합니다.

개발

이 프로젝트는 TypeScript로 작성되었으며 서버 구현을 위해 MCP SDK를 사용합니다.

프로젝트 구조

semgrep-server/ ├── src/ # Quellcode ├── build/ # Kompilierte JavaScript-Dateien ├── test.js # Testdateien └── test-rule.yaml # Beispiel Semgrep-Regel

종속성

  • Node.js와 npm
  • 타입스크립트
  • MCP SDK
  • HTTP 요청을 위한 Axios

특허

이 프로젝트는 ISC 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 LICENSE 파일에서 확인할 수 있습니다.

-
security - not tested
A
license - permissive license
-
quality - not tested

MCP 프로토콜을 통해 개발 환경에서 Semgrep 통합을 가능하게 하여 정적 코드 분석, 규칙 관리 및 검사 결과 작업을 지원합니다.

  1. Installation
    1. Verwendung
      1. Verfügbare Tools
        1. Entwicklung
          1. Projektstruktur
          2. Abhängigkeiten
        2. Lizenz
          ID: 1kb2h7qn0c