security-mcp
Fetches open GitHub Code Scanning alerts for the current repository and applies minimal local patches based on those alerts.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@security-mcpfix open code scanning vulnerabilities in the current repo"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Security MCP Setup
This setup connects the security-mcp server to AI coding tools so the agent can fetch GitHub Code Scanning alerts for the current repository and apply local patches.
Supported clients:
Claude Code — MCP via
claude mcp add, slash command via.claude/commands/fix-vuls.mdCursor — MCP via settings, skill via
.cursor/skills/fix-vuls/SKILL.mdGitHub Copilot CLI — MCP via
copilot mcp addor.github/mcp.json, skill via.github/skills/fix-vuls/SKILL.mdIntelliJ IDEA (GitHub Copilot plugin) — MCP via Copilot Chat Agent mode widget, skill via
.github/skills/fix-vuls/SKILL.md
The /fix-vuls skill runs a remediation loop:
/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 blockedThe agent does not commit, push, or open a PR unless you explicitly ask. The full skill prompt lives in fix-vuls.md in this repo.
The GitHub token used to fetch alerts is read from a .env file inside the repo you are remediating (the org repo you open in your IDE or CLI) — it is never passed on the command line or committed to source control. You can also set GITHUB_TOKEN in MCP server env configuration where your client supports it.
1. Clone and install dependencies
Clone this repo and install Node.js dependencies before connecting the MCP server:
git clone https://github.com/P-Shreyas-Maersk/security-mcp.git
cd security-mcp
npm installUse the absolute path to this folder when registering the MCP server in the steps below.
Related MCP server: osv-ui-mcp
2. Add a .env file with your GitHub token
The GitHub token is not passed as a CLI flag. Instead, create a .env file inside the org repo you want to scan (not the security-mcp server folder).
For the current v1, the token only needs access to read security/code scanning alerts.
macOS:
cd your-org-repo
echo "GITHUB_TOKEN=YOUR_GITHUB_TOKEN" > .envWindows (PowerShell):
cd your-org-repo
"GITHUB_TOKEN=YOUR_GITHUB_TOKEN" | Out-File -Encoding utf8 .envWindows (Command Prompt):
cd your-org-repo
echo GITHUB_TOKEN=YOUR_GITHUB_TOKEN > .envReplace YOUR_GITHUB_TOKEN with a GitHub token that has permission to read Code Scanning alerts.
⚠️ Add
.envto.gitignoreso the token is never committed.
3. Claude Code — connect MCP
From the same repo folder, add the MCP server (no token flag needed — security-mcp reads it from .env at runtime):
macOS:
claude mcp add security-mcp -- node /absolute/path/to/security-mcp/server.jsExample:
claude mcp add security-mcp -- node /Users/p.shreyas/workplace/experiment/code-vuls/security-mcp/server.jsWindows (PowerShell / Command Prompt):
claude mcp add security-mcp -- node C:\absolute\path\to\security-mcp\server.jsExample:
claude mcp add security-mcp -- node C:\Users\shreyas\workplace\experiment\code-vuls\security-mcp\server.js4. Verify MCP connection
Run:
claude mcp listExpected output:
security-mcp ✓ ConnectedIf the server is not connected, restart Claude Code and verify the MCP path and .env file.
5. Open Claude Code in the target repo
Go to your org repo (the same folder containing your .env file):
macOS:
cd your-org-repo
claudeExample:
cd /Users/p.shreyas/workplace/vas-experience-api
claudeWindows (PowerShell / Command Prompt):
cd your-org-repo
claudeExample:
cd C:\Users\shreyas\workplace\vas-experience-api
claude6. Test the MCP manually
Inside Claude Code, run this prompt:
Use the security-mcp tool to list open code scanning alerts for this current GitHub repo. Detect owner and repo from git remote.Expected result:
Found open code scanning alerts:
- java/sql-injection ...
- java/path-injection ...
- java/log-injection ...If you see this error:
Missing GITHUB_TOKEN in environmentCheck the following:
A
.envfile exists in the repo folder you ranclaudefrom (not thesecurity-mcpserver folder).The
.envfile contains a line exactly likeGITHUB_TOKEN=YOUR_GITHUB_TOKEN, with no quotes or extra spaces.You restarted Claude Code (
claude) after creating or editing.env.
If needed, remove and re-add the MCP:
macOS:
claude mcp remove security-mcp
claude mcp add security-mcp -- node /absolute/path/to/security-mcp/server.jsWindows:
claude mcp remove security-mcp
claude mcp add security-mcp -- node C:\absolute\path\to\security-mcp\server.jsThen restart Claude Code.
7. Install the fix-vuls skill
This repo ships the skill prompt in fix-vuls.md. Do not copy the content by hand — copy or move that file into the skill or slash-command folder for your target repo and tool.
Claude Code slash command — copy into the repo you scan:
macOS:
mkdir -p your-org-repo/.claude/commands
cp /absolute/path/to/security-mcp/fix-vuls.md your-org-repo/.claude/commands/fix-vuls.mdWindows (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.mdCursor project skill — copy into the repo you scan:
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.mdWindows (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.mdGitHub Copilot skill — copy into the repo you scan as SKILL.md (Copilot requires YAML frontmatter; see section 11 or section 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.mdWindows (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.mdThen add the YAML frontmatter shown in sections 11 or 13 to the top of SKILL.md.
Replace /absolute/path/to/security-mcp with the path where you cloned this repo, and your-org-repo with the repository you want to remediate.
When the skill is updated here, re-copy fix-vuls.md to your target folder to pick up changes.
8. Claude Code — run the command
Inside Claude Code:
/fix-vulsExpected final behavior:
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. Developer review
After the remediation loop finishes, review the summary and local diff:
git diffClaude runs build and tests during the loop, but confirm the results in your environment before committing.
If the changes look good, create a branch, commit, push, and open a PR using your normal team workflow. GitHub Code Scanning alerts will update after the push and CodeQL rescan.
10. GitHub Copilot CLI — MCP server
Prerequisites:
GitHub Copilot CLI installed and signed in
Open a terminal in the org repo you want to scan (the folder containing your
.envfile)
Option A — register globally with copilot mcp add
macOS:
copilot mcp add security-mcp -- node /absolute/path/to/security-mcp/server.jsWindows (PowerShell / Command Prompt):
copilot mcp add security-mcp -- node C:\absolute\path\to\security-mcp\server.jsIf the MCP process cannot read your target repo .env, pass the token explicitly:
macOS:
copilot mcp add security-mcp -e GITHUB_TOKEN=YOUR_GITHUB_TOKEN -- node /absolute/path/to/security-mcp/server.jsWindows (PowerShell):
copilot mcp add security-mcp -e GITHUB_TOKEN=YOUR_GITHUB_TOKEN -- node C:\absolute\path\to\security-mcp\server.jsVerify:
copilot mcp list
copilot mcp get security-mcpOption B — commit project MCP config in the org repo
Add .github/mcp.json in the repo you scan so collaborators get the same setup:
macOS example (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 example (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": ["*"]
}
}
}Start Copilot CLI from the org repo root. On first use, confirm folder trust when prompted so project MCP servers load.
Inside an interactive session you can also run /mcp add, choose STDIO, and enter node /absolute/path/to/security-mcp/server.js.
11. GitHub Copilot CLI — fix-vuls skill
GitHub Copilot skills must live in a folder named after the skill and use a file called SKILL.md with YAML frontmatter.
Copy
fix-vuls.mdinto your org repo:
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.mdWindows (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.mdAdd this frontmatter block at the very top of
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.
---Start Copilot CLI in the org repo and reload skills:
cd your-org-repo
copilot/skills reload
/skills listRun remediation:
Use the /fix-vuls skill to fetch open code scanning alerts for this repo and fix them locally.12. IntelliJ IDEA — MCP server (Copilot widget)
Prerequisites:
IntelliJ IDEA with the latest GitHub Copilot plugin
Agent mode enabled in Copilot Chat (MCP tools are available in Agent mode)
Org repo opened as the IntelliJ project (the folder containing your
.envfile)If your organization uses Copilot Business/Enterprise, the MCP servers in Copilot policy must be enabled
Configure via Copilot Chat widget
Open your org repo in IntelliJ IDEA.
Click the GitHub Copilot icon in the status bar (bottom-right corner).
Select Open Chat.
In the chat panel, switch the mode dropdown to Agent.
Click the tools icon at the bottom of the chat panel (Configure your MCP server).
Click Add MCP Tools (or Add More Tools...).
In the
mcp.jsoneditor, add thesecurity-mcpserver entry below.Save the file with Command + S (macOS) or Ctrl + S (Windows). Restart the IDE if tools do not appear immediately.
Click the tools icon again and confirm
list_code_scanning_alertsis listed undersecurity-mcp.
Alternative — open MCP settings from the status bar
Click the GitHub Copilot icon in the status bar.
Select Edit Settings.
Open Model Context Protocol → Configure.
Edit
mcp.jsonwith the same server entry below and save.
mcp.json entry for security-mcp
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"
}
}
}
}Replace the args path with your cloned security-mcp folder. If .env is present in the opened IntelliJ project, you can omit env and let dotenv load GITHUB_TOKEN from the project root instead.
Test in Agent mode
In Copilot Chat (Agent mode), run:
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 skill
IntelliJ Agent mode uses the same Agent Skills layout as Copilot CLI.
Copy
fix-vuls.mdinto your org repo:
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.mdWindows (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.mdAdd YAML frontmatter at the top of
SKILL.md(same as section 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.
---Reopen the project or restart IntelliJ if the skill does not appear immediately.
In Copilot Chat (Agent mode), run:
Use the /fix-vuls skill to fetch open code scanning alerts for this repo and fix them locally.When fix-vuls.md is updated in this repo, re-copy it to .github/skills/fix-vuls/SKILL.md in your org repo (keep the frontmatter block).
Final lifecycle
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 manuallyThis server cannot be installed
Maintenance
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
Alicense-quality-maintenanceProvides 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.- AlicenseAqualityCmaintenanceVisual 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.4354MIT
- Flicense-qualityCmaintenanceScans Python, Node.js, Java/Spring, and PHP dependency manifests for known vulnerabilities using OSV and GitHub Advisory APIs.
- AlicenseAqualityAmaintenanceLocal-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.3632MIT
Related MCP Connectors
Generate SBOMs, scan vulnerabilities, and analyze dependencies from local projects or Git repos.
Screens public GitHub repos and PRs to generate risk maps, findings, and merge-readiness signals.
CVE lookups (NVD) and dependency-manifest audits (OSV) for AI agents. No API keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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