convez.ai
MCP Server
solomonneas

mitre-mcp

solomonneas/mitre-mcp

Ver no GitHub
InicialPluginScore · de 0 a 100

MCP server for MITRE ATT&CK knowledge base. Map alerts to techniques, profile threat groups, analyze detection gaps, and enrich SOC workflows with adversary intelligence.

Instalação

$npx convez-ai solomonneas/mitre-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
4
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 3 semanas
Versão
v2.0.4
Issues abertas
6
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

An MCP server providing comprehensive access to the MITRE ATT&CK knowledge base with full SOC stack integration. Enables LLMs to look up techniques, map alerts to ATT&CK, analyze detection coverage, profile campaigns, generate Navigator layers, and correlate across Wazuh, TheHive, Cortex, and MISP.

Features

  • 39 tools for technique lookup, tactic navigation, group intelligence, software analysis, mitigation mapping, detection coverage, alert mapping, campaign profiling, Navigator layer export, and SOC integration
  • 3 resources for matrix overview, version info, and tactic listing
  • 4 prompts for incident mapping, threat hunting, gap analysis, and attribution
  • SOC Integration: Wazuh alert mapping, TheHive case management, Cortex analyzer correlation, MISP event/IOC management
  • Cross-stack correlation: Search for ATT&CK techniques across all connected platforms simultaneously
  • ATT&CK Navigator: Generate layer JSON for heatmaps, group overlays, coverage maps, and diff views
  • Campaign support: Full STIX campaign object parsing and attribution
  • Offline-capable with local STIX 2.1 data caching
  • Auto-updating with configurable refresh intervals
  • Enterprise, Mobile, and ICS matrix support

Prerequisites

  • Node.js 20 or later
  • Internet access for initial ATT&CK data download (cached locally after first run)
  • (Optional) Wazuh, TheHive, Cortex, and/or MISP instances for SOC integration

Installation

git clone https://github.com/solomonneas/mitre-mcp.git
cd mitre-mcp
npm install
npm run build

Configuration

Core Settings

VariableDefaultDescription
MITRE_DATA_DIR~/.mitre-mcp/dataLocal cache directory for STIX bundles
MITRE_MATRICESenterpriseComma-separated matrices: enterprise, mobile, ics
MITRE_UPDATE_INTERVAL86400Auto-update check interval in seconds (default 24h)

SOC Integration (all optional)

VariableDescription
WAZUH_URLWazuh API URL (e.g., https://wazuh.example.internal:55000)
WAZUH_USERNAMEWazuh API username (default: wazuh-wui)
WAZUH_PASSWORDWazuh API password
WAZUH_VERIFY_SSLVerify SSL certs (default: true, set false for self-signed)
THEHIVE_URLTheHive URL (e.g., http://thehive.example.internal:9000)
THEHIVE_API_KEYTheHive API key
CORTEX_URLCortex URL (e.g., http://cortex.example.internal:9001)
CORTEX_API_KEYCortex API key
MISP_URLMISP URL (e.g., https://misp.example.internal)
MISP_API_KEYMISP API key (authkey)
MISP_VERIFY_SSLVerify SSL certs (default: true, set false for self-signed)
MITRE_SOC_ALLOW_WRITESGlobally pre-authorize state-changing SOC tools (default: off). When unset, write tools run in dry-run mode unless the call passes confirm: true. Set to true/1/yes to allow writes without per-call confirmation.

SOC write safety

State-changing SOC tools (mitre_misp_create_event, mitre_thehive_create_case, and mitre_cortex_run_analyzers) default to a dry run: they return the action they would perform without touching the SOC platform. To actually execute, either:

  • pass confirm: true in the individual tool call, or
  • set MITRE_SOC_ALLOW_WRITES=true to pre-authorize all SOC writes for the session.

mitre_cortex_run_analyzers is the highest-impact tool (it submits live analyzer jobs, including sandbox detonation, against the supplied observable), so confirm it deliberately. mitre_thehive_enrich keeps its existing addTags flag (default false, read-only analysis) as its write guard.

When SSL verification is disabled (*_VERIFY_SSL=false), the relaxed TLS policy is scoped to each individual request and never disables certificate validation globally, so concurrent requests to other hosts remain protected.

IDs supplied to SOC tools (event IDs, case IDs, agent IDs, data types) are validated against a strict allow-list and URL-encoded before being placed in API request paths.

Usage

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "mitre-attack": {
      "command": "mitre-mcp",
      "env": {
        "MITRE_MATRICES": "enterprise",
        "WAZUH_URL": "https://wazuh.example.internal:55000",
        "WAZUH_USERNAME": "wazuh-wui",
        "WAZUH_PASSWORD": "your-password",
        "WAZUH_VERIFY_SSL": "false",
        "THEHIVE_URL": "http://thehive.example.internal:9000",
        "THEHIVE_API_KEY": "your-api-key",
        "CORTEX_URL": "http://cortex.example.internal:9001",
        "CORTEX_API_KEY": "your-api-key",
        "MISP_URL": "https://misp.example.internal",
        "MISP_API_KEY": "your-api-key",
        "MISP_VERIFY_SSL": "false"
      }
    }
  }
}

Claude Code

claude mcp add mitre-attack \
  --env MITRE_MATRICES=enterprise \
  -- mitre-mcp

Add --scope user to make it available from any directory instead of only the current project. Add --env flags for any SOC integrations (Wazuh, TheHive, Cortex, MISP) you want to enable.

OpenClaw

If you're running from a source checkout instead of the npm-installed binary, point command/args at the built dist/index.js:

openclaw mcp set mitre-attack '{
  "command": "node",
  "args": ["/absolute/path/to/mitre-mcp/dist/index.js"],
  "env": {
    "MITRE_MATRICES": "enterprise"
  }
}'

Or, with the global npm install:

openclaw mcp set mitre-attack '{
  "command": "mitre-mcp",
  "env": {
    "MITRE_MATRICES": "enterprise"
  }
}'

Then restart the OpenClaw gateway so the new server is picked up:

systemctl --user restart openclaw-gateway
openclaw mcp list   # confirm "mitre-attack" is registered

Hermes Agent

Hermes Agent reads MCP config from ~/.hermes/config.yaml under the mcp_servers key. Add an entry:

mcp_servers:
  mitre-attack:
    command: "mitre-mcp"
    env:
      MITRE_MATRICES: "enterprise"

Or, when running from a source checkout instead of the global npm install:

mcp_servers:
  mitre-attack:
    command: "node"
    args: ["/absolute/path/to/mitre-mcp/dist/index.js"]
    env:
      MITRE_MATRICES: "enterprise"

Then reload MCP from inside a Hermes session:

/reload-mcp

Codex CLI

Codex CLI registers MCP servers via codex mcp add:

codex mcp add mitre-attack \
  --env MITRE_MATRICES=enterprise \
  -- mitre-mcp

Or, when running from a source checkout:

codex mcp add mitre-attack \
  --env MITRE_MATRICES=enterprise \
  -- node /absolute/path/to/mitre-mcp/dist/index.js

Codex writes the entry to ~/.codex/config.toml under [mcp_servers.mitre-attack]. Verify with:

codex mcp list

Standalone

npm run start

Development

npm run dev

Tool Reference

Core ATT&CK Tools (19)

Technique Lookup

ToolDescription
mitre_get_techniqueGet full details of a technique by ID (T1059, T1059.001)
mitre_search_techniquesSearch techniques by keyword, tactic, platform, data source

Tactic Navigation

ToolDescription
mitre_list_tacticsList all tactics in kill-chain order
mitre_get_tacticGet tactic details with all associated techniques

Threat Group Intelligence

ToolDescription
mitre_get_groupGet group details including techniques and software used
mitre_search_groupsSearch groups by keyword or technique usage
mitre_list_groupsList all known threat groups

Software & Malware

ToolDescription
mitre_get_softwareGet software details with techniques and associated groups
mitre_search_softwareSearch software by name, technique, or type (malware/tool)

Mitigation Mapping

ToolDescription
mitre_get_mitigationGet mitigation details with addressed techniques
mitre_mitigations_for_techniqueGet all mitigations for a specific technique
mitre_search_mitigationsSearch mitigations by keyword

Detection & Data Sources

ToolDescription
mitre_get_datasourceGet data source details with detectable techniques
mitre_detection_coverageAnalyze detection coverage based on available data sources

Mapping & Correlation

ToolDescription
mitre_map_alert_to_techniqueMap security alerts to likely ATT&CK techniques
mitre_technique_overlapFind technique overlap between groups for attribution
mitre_attack_pathGenerate possible attack paths through the kill chain

Data Management

ToolDescription
mitre_update_dataForce update of the local ATT&CK data cache
mitre_data_versionGet current data version and object counts

Campaign Tools (4)

ToolDescription
mitre_campaign_profileBuild a technique profile with group/software/campaign matching
mitre_get_campaignGet campaign details with techniques, software, and groups
mitre_list_campaignsList all known ATT&CK campaigns
mitre_search_campaignsSearch campaigns by keyword or technique

Navigator Layer Export (1)

ToolDescription
mitre_navigator_layerGenerate ATT&CK Navigator JSON layers (coverage, group, campaign, diff)

Wazuh Integration (4)

ToolDescription
mitre_wazuh_statusWazuh manager status, agents, and rule stats
mitre_map_wazuh_alertMap Wazuh alerts to ATT&CK techniques by rule ID/description/groups
mitre_wazuh_rule_coverageAnalyze Wazuh rules mapped to ATT&CK techniques
mitre_wazuh_alertsFetch recent alerts enriched with ATT&CK context

TheHive Integration (3)

ToolDescription
mitre_thehive_enrichEnrich a TheHive case with ATT&CK techniques and mitigations
mitre_thehive_create_caseCreate a case pre-populated with ATT&CK context
mitre_thehive_list_casesList cases with ATT&CK technique filtering

Cortex Integration (2)

ToolDescription
mitre_cortex_analyzer_coverageMap Cortex analyzers to ATT&CK data sources
mitre_cortex_run_analyzersRun analyzers on observables with ATT&CK context

MISP Integration (4)

ToolDescription
mitre_misp_event_to_attackMap MISP event attributes/galaxies to ATT&CK
mitre_misp_search_indicatorsSearch MISP IOCs by technique or group
mitre_misp_create_eventCreate events pre-tagged with ATT&CK techniques
mitre_misp_list_eventsList events with ATT&CK enrichment

Cross-Stack Correlation (2)

ToolDescription
mitre_soc_statusConnection status for all SOC integrations
mitre_cross_correlateSearch for techniques across Wazuh, TheHive, and MISP simultaneously

Resource Reference

URIDescription
mitre://matrix/enterpriseFull Enterprise ATT&CK matrix (tactics x techniques)
mitre://versionCurrent data version and statistics
mitre://tacticsAll tactics in kill-chain order

Prompt Reference

PromptDescription
map-incident-to-attackMap incident observables to ATT&CK techniques
threat-hunt-planGenerate a threat hunting plan
gap-analysisPerform detection gap analysis
attribution-analysisAssist with threat attribution

Examples

Check SOC integration status

Use mitre_soc_status to check which SOC platforms are connected.

Map a Wazuh alert to ATT&CK

Use mitre_map_wazuh_alert with ruleId 5710 and ruleGroups ["sshd", "authentication_failed"]
to find matching ATT&CK techniques.

Create an ATT&CK-enriched TheHive case

Use mitre_thehive_create_case with title "Suspected APT28 Activity",
techniques ["T1059.001", "T1566.001", "T1078"] and severity 3
to create a case with ATT&CK context, mitigations, and investigation tasks.

Generate a Navigator coverage layer

Use mitre_navigator_layer with mode "coverage" and
dataSources ["Process", "Network Traffic", "File"]
to generate a heatmap of detection coverage.

Cross-correlate across the SOC stack

Use mitre_cross_correlate with techniques ["T1059.001", "T1566.001"]
to search for related alerts in Wazuh, cases in TheHive, and events in MISP.

Map a MISP event to ATT&CK

Use mitre_misp_event_to_attack with eventId "1"
to extract ATT&CK techniques from MISP galaxies and attributes.

Compare two threat groups

Use mitre_navigator_layer with mode "diff" and
compareGroupIds ["G0007", "G0016"]
to generate a visual comparison of APT28 vs APT29 techniques.

Testing

npm test            # Run all tests
npm run test:watch  # Watch mode
npm run lint        # Type check

Project Structure

mitre-mcp/
  src/
    index.ts              # MCP server entry point
    config.ts             # Environment config (core + SOC)
    types.ts              # STIX/ATT&CK type definitions
    resources.ts          # MCP resources
    prompts.ts            # MCP prompts
    data/
      loader.ts           # STIX bundle downloader and cache manager
      parser.ts           # STIX 2.1 JSON parser (incl. campaigns)
      index.ts            # Indexed, queryable ATT&CK data store
    tools/
      techniques.ts       # Technique lookup and search
      tactics.ts          # Tactic navigation
      groups.ts           # Threat group intelligence
      software.ts         # Software/malware lookup
      mitigations.ts      # Mitigation mapping
      datasources.ts      # Data source and detection coverage
      mapping.ts          # Alert-to-technique mapping and correlation
      campaigns.ts        # Campaign analysis and attribution
      navigator.ts        # ATT&CK Navigator layer generation
      management.ts       # Data update management
    soc/
      client.ts           # HTTP clients for Wazuh, TheHive, Cortex, MISP
      wazuh.ts            # Wazuh alert mapping and rule coverage
      thehive.ts          # TheHive case enrichment and creation
      cortex.ts           # Cortex analyzer coverage mapping
      misp.ts             # MISP event/IOC management
      correlation.ts      # Cross-stack ATT&CK correlation
      util.ts             # Shared SOC security helpers (ID validation, write gating)
      index.ts            # SOC module barrel export
  tests/
    parser.test.ts        # STIX parser tests
    tools.test.ts         # Data store query tests
    mapping.test.ts       # Mapping and correlation tests
    soc-security.test.ts  # SOC security regression tests (TLS scoping, ID encoding, write gates)
  CHANGELOG.md
  package.json
  tsconfig.json
  tsup.config.ts
  vitest.config.ts
  README.md

Data Sources

ATT&CK data is sourced from the official MITRE STIX 2.1 bundles:

  • Enterprise ATT&CK: Windows, Linux, macOS, Cloud, Network, Containers
  • Mobile ATT&CK: Android and iOS
  • ICS ATT&CK: Industrial control systems

Data is downloaded on first run and cached locally. Set MITRE_UPDATE_INTERVAL to control how often the server checks for updates.

License

MIT

Ver o original no GitHub

Bom para

Relacionados