StackHawk의 보안 스캔 플랫폼을 LLM 기반 IDE에 통합하여 프로젝트 설정, 보안 스캔 실행 및 취약점 분류를 자동화합니다.
다른 이름 stackhawk/stackhawk-mcp, stackhawk-mcp
- 스타
- 9
- Tools
- —
- 다운로드, 30일
- 205
- 최신 버전
- 1.1.1
- 마지막 커밋
- 2026년 10월 9일
- 라이선스
- —
StackHawk MCP란?
StackHawk은(는) MCP server입니다. StackHawk의 보안 스캔 플랫폼을 LLM 기반 IDE에 통합하여 프로젝트 설정, 보안 스캔 실행 및 취약점 분류를 자동화합니다.
프로젝트 README에서 생성된 요약
StackHawk MCP server 정보
이 MCP server는 개발자가 AI 기반 IDE 내에서 보안 스캔과 취약점 분류를 자동화할 수 있도록 지원합니다. StackHawk 보안 스캔 플랫폼에 연결하여 채팅이나 명령 인터페이스를 통해 전체 보안 라이프사이클을 관리할 수 있습니다. Python 기반 server를 통해 로컬에서 작동하거나 원격 HTTP 서비스로 작동하며, 요청 인증을 위해 STACKHAWK_API_KEY 환경 변수가 필요합니다.
개발자는 특정 도구를 사용하여 프로젝트 언어를 감지하고, 애플리케이션을 생성하며, stackhawk.yml 설정 파일을 생성할 수 있습니다. 이 server에는 YAML 파일이 공식 스키마와 일치하는지 확인하고 AI 환각 현상을 방지하기 위한 validate_stackhawk_config 및 validate_field_exists와 같은 전문 검증 도구가 포함되어 있습니다. 설정이 완료되면 run_stackhawk_scan을 사용하여 스캔을 트리거하고 get_app_findings_for_triage를 통해 조치 가능한 결과물을 가져올 수 있습니다. 이 통합 기능은 Cursor, Windsurf, GitHub Copilot Agents와 같은 환경과 호환됩니다.
활용 사례
- 1자동화된 프로젝트 보안 설정언어를 자동으로 감지하고 필요한 설정 파일을 생성하여 새로운 프로젝트의 보안 스캔을 구성합니다.
- 2직접적인 취약점 분류조치를 시작하기 위해 설정된 실패 임계값에 해당하는 보안 취약점을 식별하고 검토합니다.
- 3채팅을 통한 보안 스캔 실행AI 코딩 어시스턴트에서 직접 애플리케이션의 전체 보안 스캔을 시작합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
StackHawk MCP 설치 방법
형식 확인: 2026년 11월 10일Cursor에 추가Goose에 추가Claude Code에 StackHawk MCP 설치
$ claude mcp add --env 'STACKHAWK_API_KEY=<YOUR_STACKHAWK_API_KEY>' stackhawk-mcp -- uvx stackhawk-mcpCursor에 StackHawk MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"stackhawk-mcp": {
"command": "uvx",
"args": [
"stackhawk-mcp"
],
"env": {
"STACKHAWK_API_KEY": "<YOUR_STACKHAWK_API_KEY>"
}
}
}
}VS Code에 StackHawk MCP 설치
.vscode/mcp.json
{
"servers": {
"stackhawk-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"stackhawk-mcp"
],
"env": {
"STACKHAWK_API_KEY": "<YOUR_STACKHAWK_API_KEY>"
}
}
}
}VS Code CLI에 StackHawk MCP 설치
$ code --add-mcp '{"name":"stackhawk-mcp","type":"stdio","command":"uvx","args":["stackhawk-mcp"],"env":{"STACKHAWK_API_KEY":"<YOUR_STACKHAWK_API_KEY>"}}'Claude Desktop에 StackHawk MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"stackhawk-mcp": {
"command": "uvx",
"args": [
"stackhawk-mcp"
],
"env": {
"STACKHAWK_API_KEY": "<YOUR_STACKHAWK_API_KEY>"
}
}
}
}Codex에 StackHawk MCP 설치
$ codex mcp add stackhawk-mcp --env 'STACKHAWK_API_KEY=<YOUR_STACKHAWK_API_KEY>' -- uvx stackhawk-mcpCodex config.toml에 StackHawk MCP 설치
~/.codex/config.toml
[mcp_servers.stackhawk-mcp] command = "uvx" args = ["stackhawk-mcp"] [mcp_servers.stackhawk-mcp.env] STACKHAWK_API_KEY = "<YOUR_STACKHAWK_API_KEY>"
Gemini CLI에 StackHawk MCP 설치
$ gemini mcp add -s user -e 'STACKHAWK_API_KEY=<YOUR_STACKHAWK_API_KEY>' stackhawk-mcp uvx -- stackhawk-mcpGemini settings.json에 StackHawk MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"stackhawk-mcp": {
"command": "uvx",
"args": [
"stackhawk-mcp"
],
"env": {
"STACKHAWK_API_KEY": "<YOUR_STACKHAWK_API_KEY>"
}
}
}
}구성
STACKHAWK_API_KEY필수비밀StackHawk API key
| 이름 | 설명 | 유형 |
|---|---|---|
| STACKHAWK_API_KEY | StackHawk API key | 필수비밀 |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식 · 점수를 높이기 위해 수정할 항목
- 소스 저장소 연결 및 접근 가능stackhawk/stackhawk-mcp is public and reachablegithub.com/stackhawk/stackhawk-mcp ↗통과
- 패키지가 이 저장소를 소스로 명시stackhawk-mcp names stackhawk/stackhawk-mcp as sourcepypi.org/project/stackhawk-mcp/ ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for stackhawk-mcppypi.org/project/stackhawk-mcp/ ↗통과
- 오픈 소스 라이선스 (OSI)No license결함 발견
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-10-09github.com/stackhawk/stackhawk-mcp ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from stackhawk-mcp통과
- 패키지 및 해당 종속성에 중요한 보안 권고 없음34 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음0 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 원격 엔드포인트가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기StackHawk MCP Server
Current Version: 1.2.5 Requires Python 3.10 or higher
A Model Context Protocol (MCP) server for integrating with StackHawk's security scanning platform. Helps developers set up StackHawk, run security scans, and triage findings to fix vulnerabilities — all from within an LLM-powered IDE or chat.
Table of Contents
- Features
- Installation
- Usage
- Configuration
- Available Tools
- Testing & Development
- Example Configurations
- Integrating with LLMs and IDEs
- Contributing
- License
Features
- Setup: Detect your project, create a StackHawk application, and generate a ready-to-scan
stackhawk.yml - Scan: Run StackHawk scans directly from your IDE or chat (with install help if the CLI is missing)
- Triage: Get actionable findings at or above your failure threshold for remediation
- Validate: Check YAML configs against the official schema and validate field paths to prevent hallucination
- Custom User-Agent: All API calls include a versioned
User-Agentheader
Installation
- Install via pip (make sure you have write permission to your current python environment):
> pip install stackhawk-mcp # Requires Python 3.10 or higher
Or Install via pip in a virtual env:
> python3 -m venv ~/.virtualenvs/mcp
> source ~/.virtualenvs/mcp/bin/activate
> (mcp) pip install stackhawk-mcp
# Requires Python 3.10 or higher
Or Install via pip using pyenv:
> pyenv shell 3.10.11
> pip install stackhawk-mcp
# Requires Python 3.10 or higher
Or Install locally from this repo:
> pip install --user .
# Run this command from the root of the cloned repository
- Set your StackHawk API key:
> export STACKHAWK_API_KEY="your-api-key-here"
Usage
Running the MCP Server
python -m stackhawk_mcp.server
Running the HTTP Server (FastAPI)
python -m stackhawk_mcp.http_server
Running Tests
pytest
Integrating with LLMs and IDEs
StackHawk MCP can be used as a tool provider for AI coding assistants and LLM-powered developer environments, enabling security scanning setup, YAML validation, and vulnerability triage directly in your workflow.
Cursor (AI Coding Editor)
- Setup:
- Follow the installation instructions above to install
stackhawk-mcpin your python environment. - In Cursor, go to
Cursor Settings->Tools & Integrations->MCP Tools - Add a "New MCP Server" with the following json, depending on your setup:
- Using a virtual env at
~/.virtualenvs/mcp:{ "mcpServers": { "stackhawk": { "command": "/home/bobby/.virtualenvs/mcp/bin/python", "args": ["-m", "stackhawk_mcp.server"], "env": { "STACKHAWK_API_KEY": "${env:STACKHAWK_API_KEY}" }, "disabled": false } } } - Using pyenv:
{ "mcpServers": { "stackhawk": { "command": "/home/bobby/.pyenv/versions/3.10.11/bin/python3", "args": ["-m", "stackhawk_mcp.server"], "env": { "STACKHAWK_API_KEY": "${env:STACKHAWK_API_KEY}" }, "disabled": false } } } - Or use python directly:
{ "mcpServers": { "stackhawk": { "command": "python3", "args": ["-m", "stackhawk_mcp.server"], "env": { "STACKHAWK_API_KEY": "${env:STACKHAWK_API_KEY}" } } } } - Then make sure the "stackhawk" MCP Tool is enabled
- Using a virtual env at
- Follow the installation instructions above to install
- Usage:
- Use Cursor's tool invocation to call StackHawk MCP tools (e.g., vulnerability search, YAML validation).
- Example prompt:
Validate this StackHawk YAML config for errors.
OpenAI, Anthropic, and Other LLMs
- Setup:
- Deploy the MCP HTTP server and expose it to your LLM system (local or cloud).
- Use the LLM's tool-calling or function-calling API to connect to the MCP endpoint.
- Pass the required arguments (e.g., org_id, yaml_content) as specified in the tool schemas.
- Example API Call:
{ "method": "tools/call", "params": { "name": "validate_stackhawk_config", "arguments": {"yaml_content": "..."} } } - Best Practices:
- Use anti-hallucination tools to validate field names and schema compliance.
- Always check the tool's output for warnings or suggestions.
IDEs like Windsurf
- Setup:
- Add StackHawk MCP as a tool provider or extension in your IDE, pointing to the local or remote MCP server endpoint.
- Configure environment variables as needed.
- Usage:
- Invoke setup, scanning, validation, and triage tools directly from the IDE's command palette or tool integration panel.
General Tips
- Ensure the MCP server is running and accessible from your LLM or IDE environment.
- Review the Available Tools & API section for supported operations.
- For advanced integration, see the example tool usage in this README or explore the codebase for custom workflows.
GitHub Copilot Agents
StackHawk can be added to the GitHub Coding Agent as an MCP server or as its own GitHub Custom Agent.
Add to GitHub Coding Agent
You can add StackHawk MCP to the GitHub Copilot Coding Agent. This gives the agent all the stackhawk/ tools.
StackHawk MCP installation into the Coding Agent
General instructions on GitHub
For StackHawk MCP, the MCP Configuration JSON should look something like this:
{
"mcpServers": {
"stackhawk": {
"type": "local",
"tools": [
"*"
],
"command": "uvx",
"args": [
"stackhawk-mcp"
],
"env": {
"STACKHAWK_API_KEY": "COPILOT_MCP_STACKHAWK_API_KEY"
}
}
}
}
Then in the Repository's Settings->Environments->copilot->Environment Secrets, add COPILOT_MCP_STACKHAWK_API_KEY with your StackHawk API Key.
Installation verification instructions
StackHawk Onboarding Agent as a GitHub Copilot Custom Agent
You can the StackHawk Onboarding Agent as a custom agent at the enterprise, organization, or repository level in GitHub. When added, the StackHawk Onboarding Agent becomes a selectable option in the Copilot Agent Chat with context to help with onboarding, plus it installs stackhawk-mcp so the agent has access to all of those tools.
StackHawk Onboarding Agent installation
The general approach is to take the StackHawk Onboarding Agent defintion and apply it to either the desired repository, enterprise, or organization in GitHub.
- Instructions for installing into a repository on GitHub
- Instructions for installing into an enterprise on GitHub
- Instructions for installing into an organization GitHub
Note that the mcp-servers block in the StackHawk Onboarding Agent definition references an environment variable called COPILOT_MCP_STACKHAWK_API_KEY. Go to the Repository's Settings->Environments->copilot->Environment Secrets, add COPILOT_MCP_STACKHAWK_API_KEY with your StackHawk API Key.
Configuration
- All HTTP requests include a custom
User-Agentheader:User-Agent: StackHawk-MCP/{version} - The version is set in
stackhawk_mcp/server.pyasSTACKHAWK_MCP_VERSION. - Set your API key via the
STACKHAWK_API_KEYenvironment variable.
Available Tools
The MCP server exposes 7 tools organized around the developer workflow:
| Phase | Tool | Description |
|---|---|---|
| Discover | get_organization_info |
Get org details, teams, and applications |
| Discover | list_applications |
List applications in an organization |
| Setup | setup_stackhawk_for_project |
Detect language, find/create app, generate stackhawk.yml |
| Validate | validate_stackhawk_config |
Validate YAML against the official StackHawk schema |
| Validate | validate_field_exists |
Check if a field path is valid in the schema (anti-hallucination) |
| Scan | run_stackhawk_scan |
Run a StackHawk scan via the CLI (returns install help if CLI is missing) |
| Triage | get_app_findings_for_triage |
Get findings at/above the configured failure threshold |
Example Tool Usage
# Set up StackHawk for a project
result = await server.call_tool("setup_stackhawk_for_project", {"host": "http://localhost:3000"})
# Validate a YAML config
result = await server.call_tool("validate_stackhawk_config", {"yaml_content": "..."})
# Run a scan
result = await server.call_tool("run_stackhawk_scan", {})
# Get findings to triage
result = await server.call_tool("get_app_findings_for_triage", {})
Official Schema URL: https://download.stackhawk.com/hawk/jsonschema/hawkconfig.json
Testing & Development
Running All Tests
pytest
Running Individual Tests
pytest tests/test_ux_improvements.py
pytest tests/test_user_scenarios.py
Code Formatting
black stackhawk_mcp/
Type Checking
mypy stackhawk_mcp/
Example Configurations
Basic Configuration
app:
applicationId: "12345678-1234-1234-1234-123456789012"
env: "dev"
host: "http://localhost:3000"
name: "Development App"
description: "Local development environment"
Production Configuration with Authentication
app:
applicationId: "87654321-4321-4321-4321-210987654321"
env: "prod"
host: "https://myapp.com"
name: "Production App"
description: "Production environment"
authentication:
type: "form"
username: "your-username"
password: "your-password"
loginUrl: "https://myapp.com/login"
usernameField: "username"
passwordField: "password"
hawk:
spider:
base: true
ajax: false
maxDurationMinutes: 30
scan:
maxDurationMinutes: 60
threads: 10
startupTimeoutMinutes: 5
failureThreshold: "high"
tags:
- name: "environment"
value: "production"
- name: "application"
value: "myapp"
Contributing
Contributions are welcome! Please open issues or pull requests for bug fixes, new features, or documentation improvements.
License
Apache License 2.0. See LICENSE for details.
Release and Version Bumping
Version bumps are managed via the "Prepare Release" GitHub Actions workflow. When triggering this workflow, you can select whether to bump the minor or major version. The workflow will automatically update version files, commit, and push the changes to main.
Note: The workflow is protected against infinite loops caused by automated version bump commits.
GitHub Actions Authentication
All CI/CD git operations use a GitHub App token for authentication.
The git user and email are set from the repository secrets HAWKY_APP_USER and HAWKY_APP_USER_EMAIL.
Workflow Protections
Workflows are designed to skip jobs if the latest commit is an automated version bump, preventing workflow loops.
How to Trigger a Release
- Go to the "Actions" tab on GitHub.
- Select the "Prepare Release" workflow.
- Click "Run workflow" and choose the desired bump type (minor or major).
- The workflow will handle the rest!
StackHawk MCP 질문
StackHawk MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add --env 'STACKHAWK_API_KEY=<YOUR_STACKHAWK_API_KEY>' stackhawk-mcp -- uvx stackhawk-mcp를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
StackHawk MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
StackHawk MCP server로 무엇을 할 수 있나요?
프로젝트 감지, StackHawk 애플리케이션 생성, 설정 파일 생성, 보안 스캔 실행 및 조치를 위한 취약점 분류를 수행할 수 있습니다.
StackHawk MCP server를 어떻게 설치하나요?
pip install stackhawk-mcp 명령어를 사용하여 pip로 설치할 수 있습니다.
이 server의 시스템 요구 사항은 무엇인가요?
Python 3.10 이상의 버전이 필요합니다.