Skip to main content
Glama
P-Shreyas-Maersk

security-mcp

Security MCP 설정

이 설정은 security-mcp 서버를 AI 코딩 도구에 연결하여 에이전트가 현재 저장소의 GitHub Code Scanning 알림을 가져와 로컬 패치를 적용할 수 있도록 합니다.

지원되는 클라이언트:

  • Claude Code — MCP는 claude mcp add를 통해, 슬래시 명령은 .claude/commands/fix-vuls.md를 통해

  • Cursor — MCP는 설정을 통해, 스킬은 .cursor/skills/fix-vuls/SKILL.md를 통해

  • GitHub Copilot CLI — MCP는 copilot mcp add 또는 .github/mcp.json을 통해, 스킬은 .github/skills/fix-vuls/SKILL.md를 통해

  • IntelliJ IDEA (GitHub Copilot 플러그인) — MCP는 Copilot Chat Agent 모드 위젯을 통해, 스킬은 .github/skills/fix-vuls/SKILL.md를 통해

/fix-vuls 스킬은 수정 루프를 실행합니다:

/fix-vuls
  → fetch open GitHub Code Scanning alerts
  → triage and classify each alert
  → research CVEs (Spring Boot BOM first for dependency alerts)
  → apply minimal local patches
  → validate with build and tests
  → re-check alerts and repeat until done or blocked

에이전트는 사용자가 명시적으로 요청하지 않는 한 커밋, 푸시 또는 PR을 생성하지 않습니다. 전체 스킬 프롬프트는 이 저장소의 fix-vuls.md에 있습니다.

알림을 가져오는 데 사용되는 GitHub 토큰은 수정 중인 저장소 내부의 .env 파일에서 읽어옵니다 (IDE 또는 CLI에서 연 조직 저장소) — 명령줄에 전달되거나 소스 제어에 커밋되지 않습니다. 클라이언트가 지원하는 경우 MCP 서버 env 구성에 GITHUB_TOKEN을 설정할 수도 있습니다.


1. 저장소 복제 및 의존성 설치

이 저장소를 복제하고 MCP 서버를 연결하기 전에 Node.js 의존성을 설치하십시오:

git clone https://github.com/P-Shreyas-Maersk/security-mcp.git
cd security-mcp
npm install

아래 단계에서 MCP 서버를 등록할 때 이 폴더의 절대 경로를 사용하십시오.


Related MCP server: osv-ui-mcp

2. GitHub 토큰으로 .env 파일 추가

GitHub 토큰은 CLI 플래그로 전달되지 않습니다. 대신 스캔하려는 조직 저장소 내부.env 파일을 생성하십시오 (security-mcp 서버 폴더가 아님).

현재 v1의 경우 토큰은 보안/코드 스캐닝 알림을 읽을 수 있는 권한만 있으면 됩니다.

macOS:

cd your-org-repo
echo "GITHUB_TOKEN=YOUR_GITHUB_TOKEN" > .env

Windows (PowerShell):

cd your-org-repo
"GITHUB_TOKEN=YOUR_GITHUB_TOKEN" | Out-File -Encoding utf8 .env

Windows (명령 프롬프트):

cd your-org-repo
echo GITHUB_TOKEN=YOUR_GITHUB_TOKEN > .env

YOUR_GITHUB_TOKEN을 Code Scanning 알림을 읽을 권한이 있는 GitHub 토큰으로 바꾸십시오.

⚠️ .env.gitignore에 추가하여 토큰이 커밋되지 않도록 하십시오.


3. Claude Code — MCP 연결

동일한 저장소 폴더에서 MCP 서버를 추가하십시오 (토큰 플래그 불필요 — security-mcp는 런타임에 .env에서 읽습니다):

macOS:

claude mcp add security-mcp -- node /absolute/path/to/security-mcp/server.js

예시:

claude mcp add security-mcp -- node /Users/p.shreyas/workplace/experiment/code-vuls/security-mcp/server.js

Windows (PowerShell / 명령 프롬프트):

claude mcp add security-mcp -- node C:\absolute\path\to\security-mcp\server.js

예시:

claude mcp add security-mcp -- node C:\Users\shreyas\workplace\experiment\code-vuls\security-mcp\server.js

4. MCP 연결 확인

다음을 실행하십시오:

claude mcp list

예상 출력:

security-mcp  ✓ Connected

서버가 연결되지 않은 경우 Claude Code를 다시 시작하고 MCP 경로와 .env 파일을 확인하십시오.


5. 대상 저장소에서 Claude Code 열기

조직 저장소(.env 파일이 있는 동일한 폴더)로 이동하십시오:

macOS:

cd your-org-repo
claude

예시:

cd /Users/p.shreyas/workplace/vas-experience-api
claude

Windows (PowerShell / 명령 프롬프트):

cd your-org-repo
claude

예시:

cd C:\Users\shreyas\workplace\vas-experience-api
claude

6. MCP 수동 테스트

Claude Code 내에서 다음 프롬프트를 실행하십시오:

Use the security-mcp tool to list open code scanning alerts for this current GitHub repo. Detect owner and repo from git remote.

예상 결과:

Found open code scanning alerts:
- java/sql-injection ...
- java/path-injection ...
- java/log-injection ...

이 오류가 표시되면:

Missing GITHUB_TOKEN in environment

다음을 확인하십시오:

  • claude를 실행한 저장소 폴더(security-mcp 서버 폴더가 아님)에 .env 파일이 있는지 확인하십시오.

  • .env 파일에 정확히 GITHUB_TOKEN=YOUR_GITHUB_TOKEN 형식의 줄이 있고 따옴표나 추가 공백이 없는지 확인하십시오.

  • .env를 생성하거나 편집한 후 Claude Code(claude)를 다시 시작했는지 확인하십시오.

필요한 경우 MCP를 제거하고 다시 추가하십시오:

macOS:

claude mcp remove security-mcp
claude mcp add security-mcp -- node /absolute/path/to/security-mcp/server.js

Windows:

claude mcp remove security-mcp
claude mcp add security-mcp -- node C:\absolute\path\to\security-mcp\server.js

그런 다음 Claude Code를 다시 시작하십시오.


7. fix-vuls 스킬 설치

이 저장소는 스킬 프롬프트를 fix-vuls.md에 제공합니다. 내용을 수동으로 복사하지 말고 해당 파일을 대상 저장소 및 도구의 스킬 또는 슬래시 명령 폴더로 복사하거나 이동하십시오.

Claude Code 슬래시 명령 — 스캔할 저장소로 복사:

macOS:

mkdir -p your-org-repo/.claude/commands
cp /absolute/path/to/security-mcp/fix-vuls.md your-org-repo/.claude/commands/fix-vuls.md

Windows (PowerShell):

New-Item -ItemType Directory -Force your-org-repo\.claude\commands
Copy-Item C:\absolute\path\to\security-mcp\fix-vuls.md your-org-repo\.claude\commands\fix-vuls.md

Cursor 프로젝트 스킬 — 스캔할 저장소로 복사:

macOS:

mkdir -p your-org-repo/.cursor/skills/fix-vuls
cp /absolute/path/to/security-mcp/fix-vuls.md your-org-repo/.cursor/skills/fix-vuls/SKILL.md

Windows (PowerShell):

New-Item -ItemType Directory -Force your-org-repo\.cursor\skills\fix-vuls
Copy-Item C:\absolute\path\to\security-mcp\fix-vuls.md your-org-repo\.cursor\skills\fix-vuls\SKILL.md

GitHub Copilot 스킬SKILL.md로 스캔할 저장소로 복사 (Copilot은 YAML 머리말 필요, 11절 또는 13절 참조):

macOS:

mkdir -p your-org-repo/.github/skills/fix-vuls
cp /absolute/path/to/security-mcp/fix-vuls.md your-org-repo/.github/skills/fix-vuls/SKILL.md

Windows (PowerShell):

New-Item -ItemType Directory -Force your-org-repo\.github\skills\fix-vuls
Copy-Item C:\absolute\path\to\security-mcp\fix-vuls.md your-org-repo\.github\skills\fix-vuls\SKILL.md

그런 다음 11절 또는 13절에 표시된 YAML 머리말을 SKILL.md 상단에 추가하십시오.

/absolute/path/to/security-mcp를 이 저장소를 복제한 경로로, your-org-repo를 수정할 저장소로 바꾸십시오.

여기서 스킬이 업데이트되면 변경 사항을 반영하기 위해 fix-vuls.md를 대상 폴더에 다시 복사하십시오.


8. Claude Code — 명령 실행

Claude Code 내부:

/fix-vuls

예상 최종 동작:

Remediation complete after 2 cycles.

Fixed:
- Alert #4 (java/sql-injection) — src/main/java/.../Repository.java
- Alert #7 (CVE-2024-XXXX) — root pom.xml Spring Boot 3.2.x → 3.2.y

Fixed locally, pending GitHub rescan:
- Alert #9 (java/path-injection) — green build; push and wait for CodeQL rescan

Blocked:
- Alert #12 — generated code; cannot patch locally

Build: mvn -B test — SUCCESS

No commit, push, or PR was performed.

9. 개발자 검토

수정 루프가 완료된 후 요약 및 로컬 diff를 검토하십시오:

git diff

Claude는 루프 중에 빌드 및 테스트를 실행하지만 커밋하기 전에 사용자 환경에서 결과를 확인하십시오.

변경 사항이 괜찮아 보이면 일반적인 팀 워크플로를 사용하여 브랜치를 만들고, 커밋하고, 푸시하고, PR을 여십시오. GitHub Code Scanning 알림은 푸시 및 CodeQL 재스캔 후에 업데이트됩니다.


10. GitHub Copilot CLI — MCP 서버

전제 조건:

  • GitHub Copilot CLI가 설치 및 로그인되어 있어야 함

  • 12 단계 완료

  • 스캔할 조직 저장소(.env 파일이 있는 폴더)에서 터미널 열기

옵션 A — copilot mcp add로 전역 등록

macOS:

copilot mcp add security-mcp -- node /absolute/path/to/security-mcp/server.js

Windows (PowerShell / 명령 프롬프트):

copilot mcp add security-mcp -- node C:\absolute\path\to\security-mcp\server.js

MCP 프로세스가 대상 저장소의 .env를 읽을 수 없는 경우 토큰을 명시적으로 전달하십시오:

macOS:

copilot mcp add security-mcp -e GITHUB_TOKEN=YOUR_GITHUB_TOKEN -- node /absolute/path/to/security-mcp/server.js

Windows (PowerShell):

copilot mcp add security-mcp -e GITHUB_TOKEN=YOUR_GITHUB_TOKEN -- node C:\absolute\path\to\security-mcp\server.js

확인:

copilot mcp list
copilot mcp get security-mcp

옵션 B — 조직 저장소에 프로젝트 MCP 구성 커밋

스캔할 저장소에 .github/mcp.json을 추가하여 협력자가 동일한 설정을 받도록 하십시오:

macOS 예시 (your-org-repo/.github/mcp.json):

{
  "mcpServers": {
    "security-mcp": {
      "type": "local",
      "command": "node",
      "args": ["/Users/you/workplace/projects/security-mcp/server.js"],
      "env": {
        "GITHUB_TOKEN": "YOUR_GITHUB_TOKEN"
      },
      "tools": ["*"]
    }
  }
}

Windows 예시 (your-org-repo\.github\mcp.json):

{
  "mcpServers": {
    "security-mcp": {
      "type": "local",
      "command": "node",
      "args": ["C:\\Users\\you\\workplace\\projects\\security-mcp\\server.js"],
      "env": {
        "GITHUB_TOKEN": "YOUR_GITHUB_TOKEN"
      },
      "tools": ["*"]
    }
  }
}

조직 저장소 루트에서 Copilot CLI를 시작하십시오. 처음 사용할 때 폴더 신뢰를 확인하라는 메시지가 표시되면 확인하여 프로젝트 MCP 서버가 로드되도록 하십시오.

대화형 세션 내에서 /mcp add를 실행하고 STDIO를 선택한 다음 node /absolute/path/to/security-mcp/server.js를 입력할 수도 있습니다.


11. GitHub Copilot CLI — fix-vuls 스킬

GitHub Copilot 스킬은 스킬 이름을 딴 폴더에 있어야 하며 YAML 머리말이 있는 SKILL.md 파일을 사용해야 합니다.

  1. fix-vuls.md를 조직 저장소로 복사:

macOS:

mkdir -p your-org-repo/.github/skills/fix-vuls
cp /absolute/path/to/security-mcp/fix-vuls.md your-org-repo/.github/skills/fix-vuls/SKILL.md

Windows (PowerShell):

New-Item -ItemType Directory -Force your-org-repo\.github\skills\fix-vuls
Copy-Item C:\absolute\path\to\security-mcp\fix-vuls.md your-org-repo\.github\skills\fix-vuls\SKILL.md
  1. SKILL.md 상단에 다음 머리말 블록을 추가:

---
name: fix-vuls
description: Fetch open GitHub code scanning alerts, apply minimal local fixes, validate with build/tests, and loop until alerts are resolved or blocked. Use when asked to fix vulnerabilities, code scanning alerts, CVEs, or /fix-vuls.
---
  1. 조직 저장소에서 Copilot CLI를 시작하고 스킬을 다시 로드:

cd your-org-repo
copilot
/skills reload
/skills list
  1. 수정 실행:

Use the /fix-vuls skill to fetch open code scanning alerts for this repo and fix them locally.

12. IntelliJ IDEA — MCP 서버 (Copilot 위젯)

전제 조건:

  • 최신 GitHub Copilot 플러그인이 설치된 IntelliJ IDEA

  • Copilot Chat에서 Agent 모드 활성화 (MCP 도구는 Agent 모드에서 사용 가능)

  • 12 단계 완료

  • 조직 저장소가 IntelliJ 프로젝트로 열려 있음 (.env 파일이 있는 폴더)

  • 조직에서 Copilot Business/Enterprise를 사용하는 경우 Copilot의 MCP 서버 정책이 활성화되어 있어야 함

Copilot Chat 위젯을 통해 구성

  1. IntelliJ IDEA에서 조직 저장소를 엽니다.

  2. 상태 표시줄(오른쪽 아래)에서 GitHub Copilot 아이콘을 클릭합니다.

  3. Open Chat을 선택합니다.

  4. 채팅 패널에서 모드 드롭다운을 Agent로 전환합니다.

  5. 채팅 패널 하단의 도구 아이콘(MCP 서버 구성)을 클릭합니다.

  6. Add MCP Tools(또는 Add More Tools...)를 클릭합니다.

  7. mcp.json 편집기에서 아래 security-mcp 서버 항목을 추가합니다.

  8. Command + S(macOS) 또는 Ctrl + S(Windows)로 파일을 저장합니다. 도구가 즉시 나타나지 않으면 IDE를 다시 시작합니다.

  9. 도구 아이콘을 다시 클릭하고 list_code_scanning_alertssecurity-mcp 아래에 나열되는지 확인합니다.

대안 — 상태 표시줄에서 MCP 설정 열기

  1. 상태 표시줄에서 GitHub Copilot 아이콘을 클릭합니다.

  2. Edit Settings를 선택합니다.

  3. Model Context ProtocolConfigure를 엽니다.

  4. 아래와 동일한 서버 항목으로 mcp.json을 편집하고 저장합니다.

security-mcp용 mcp.json 항목

macOS:

{
  "servers": {
    "security-mcp": {
      "command": "node",
      "args": ["/Users/you/workplace/projects/security-mcp/server.js"],
      "env": {
        "GITHUB_TOKEN": "YOUR_GITHUB_TOKEN"
      }
    }
  }
}

Windows:

{
  "servers": {
    "security-mcp": {
      "command": "node",
      "args": ["C:\\Users\\you\\workplace\\projects\\security-mcp\\server.js"],
      "env": {
        "GITHUB_TOKEN": "YOUR_GITHUB_TOKEN"
      }
    }
  }
}

args 경로를 복제한 security-mcp 폴더로 바꾸십시오. 열린 IntelliJ 프로젝트에 .env가 있으면 env를 생략하고 dotenv가 프로젝트 루트에서 GITHUB_TOKEN을 로드하도록 할 수 있습니다.

Agent 모드에서 테스트

Copilot Chat(Agent 모드)에서 다음을 실행:

Use the security-mcp tool to list open code scanning alerts for this current GitHub repo. Detect owner and repo from git remote.

13. IntelliJ IDEA — fix-vuls 스킬

IntelliJ Agent 모드는 Copilot CLI와 동일한 Agent Skills 레이아웃을 사용합니다.

  1. fix-vuls.md를 조직 저장소로 복사:

macOS:

mkdir -p your-org-repo/.github/skills/fix-vuls
cp /absolute/path/to/security-mcp/fix-vuls.md your-org-repo/.github/skills/fix-vuls/SKILL.md

Windows (PowerShell):

New-Item -ItemType Directory -Force your-org-repo\.github\skills\fix-vuls
Copy-Item C:\absolute\path\to\security-mcp\fix-vuls.md your-org-repo\.github\skills\fix-vuls\SKILL.md
  1. SKILL.md 상단에 YAML 머리말 추가 (11절과 동일):

---
name: fix-vuls
description: Fetch open GitHub code scanning alerts, apply minimal local fixes, validate with build/tests, and loop until alerts are resolved or blocked. Use when asked to fix vulnerabilities, code scanning alerts, CVEs, or /fix-vuls.
---
  1. 스킬이 즉시 나타나지 않으면 프로젝트를 다시 열거나 IntelliJ를 다시 시작합니다.

  2. Copilot Chat(Agent 모드)에서 다음을 실행:

Use the /fix-vuls skill to fetch open code scanning alerts for this repo and fix them locally.

이 저장소에서 fix-vuls.md가 업데이트되면 조직 저장소의 .github/skills/fix-vuls/SKILL.md로 다시 복사하십시오 (머리말 블록 유지).


최종 수명 주기

Developer runs /fix-vuls (Claude Code, Cursor, or Copilot Agent mode)
        ↓
Agent detects GitHub repo
        ↓
Security MCP fetches Code Scanning alerts
        ↓
Agent triages, researches CVEs, patches, and validates (loop)
        ↓
Agent reports summary (fixed / blocked / pending rescan)
        ↓
Developer reviews diff, commits, pushes, and raises PR manually
A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    -
    maintenance
    Provides tools for autonomous CVE detection, enrichment, and remediation across managed repositories using GHSA and NVD data. It enables automated triage and pull request creation for dependency fixes based on configurable severity policies.
  • A
    license
    A
    quality
    C
    maintenance
    Visual CVE audit dashboard for npm, Python, Go, and Rust projects. Scans your project manifests (package-lock.json, requirements.txt, go.sum, Cargo.lock) against OSV.dev live data, opens a browser dashboard for human review, then applies fixes only after explicit confirmation. Supports multi-service monorepos in one command.
    4
    35
    4
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Local-only GitHub Actions and CI maintenance scanner for AI-built apps. Exposes scan, explanation, and fix-planning tools to MCP clients; modifies nothing and makes no outbound requests by default.
    3
    63
    2
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/P-Shreyas-Maersk/security-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server