Skip to main content
Glama
ThreatWatch MCP

ThreatWatch MCP

by Abraar02

๐Ÿ›ก๏ธ ThreatWatch MCP

AI-Powered Threat Intelligence with Real-Time Alert Monitoring

A Model Context Protocol (MCP) server that brings multi-source threat intelligence directly into Claude Desktop and any MCP-compatible AI assistant.

Python 3.11+ License: Apache-2.0 MCP


โœจ What Makes ThreatWatch Different

Feature

ThreatWatch

fastmcp-threatintel

Real-time watch-list & alerts

โœ…

โŒ

Persistent alert history

โœ…

โŒ

Shodan InternetDB (free, no key needed)

โœ…

โŒ

Status-change detection

โœ…

โŒ

IOC extraction from freeform text

โœ…

โŒ

Works with zero API keys

โœ…

โŒ


Related MCP server: FastMCP ThreatIntel

๐Ÿ”Œ Available MCP Tools

Tool

Description

analyze_ioc

Analyse a single IP / domain / URL / hash

bulk_analyze

Analyse up to 50 IOCs concurrently

detect_iocs_in_text

Extract IOCs from log files, reports, pastes

add_watch

Add an IOC to the real-time watch-list

remove_watch

Remove an IOC from the watch-list

list_watches

Show all monitored IOCs and their status

get_alerts

Retrieve alerts from monitored IOCs

run_monitor_cycle

Manually trigger a re-scan of all watches

server_status

Show configured sources and monitor state


๐Ÿš€ Installation

Prerequisites

  • Python 3.11 or higher

  • Claude Desktop

  • API keys (see below โ€” all free tier)

Step 1 โ€” Clone the repo

git clone https://github.com/YOUR_USERNAME/threatwatch-mcp.git
cd threatwatch-mcp

Step 2 โ€” Install

pip3 install fastmcp httpx python-dotenv
pip3 install -e .

Step 3 โ€” Verify installation

which threatwatch

You should see a path like /usr/local/bin/threatwatch or /Library/Frameworks/Python.framework/Versions/3.x/bin/threatwatch. Copy this path โ€” you'll need it in Step 5.


๐Ÿ”‘ API Keys (All Free)

Source

Required

Free Limit

Sign Up

VirusTotal

Recommended

1,000 req/day

virustotal.com

AlienVault OTX

Recommended

Unlimited

otx.alienvault.com

AbuseIPDB

Optional

1,000 req/day

abuseipdb.com

IPinfo

Optional

50,000 req/month

ipinfo.io

Shodan InternetDB

None needed

Always free

Built-in

ThreatWatch works with zero API keys โ€” Shodan InternetDB is always available and returns open ports, CVEs, and hostnames for any IP for free.


โš™๏ธ Connect to Claude Desktop

Step 4 โ€” Open the Claude Desktop config

macOS:

open -e ~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows:

%APPDATA%\Claude\claude_desktop_config.json

Step 5 โ€” Add ThreatWatch

Add the threatwatch entry to your mcpServers block. Replace the command path with the output of which threatwatch from Step 3, and fill in your API keys:

{
  "mcpServers": {
    "threatwatch": {
      "command": "/Library/Frameworks/Python.framework/Versions/3.13/bin/threatwatch",
      "env": {
        "VIRUSTOTAL_API_KEY": "your_virustotal_key_here",
        "OTX_API_KEY": "your_otx_key_here",
        "ABUSEIPDB_API_KEY": "your_abuseipdb_key_here",
        "IPINFO_API_KEY": "your_ipinfo_key_here"
      }
    }
  }
}

If you already have other MCP servers configured, just add the threatwatch block inside your existing mcpServers object โ€” don't replace the whole file.

Step 6 โ€” Restart Claude Desktop

Fully quit Claude Desktop (Cmd + Q on Mac, system tray โ†’ Exit on Windows) and reopen it.

Step 7 โ€” Verify

Click the "+" button at the bottom of the Claude chat โ†’ Connectors. You should see ThreatWatch listed with all 9 tools.

Then test it:

Run server_status

๐Ÿ’ฌ Example Prompts

Analyse IP 185.220.101.1 for threats

Check if domain update-adobe-flash.ru is malicious

Is this hash dangerous: d41d8cd98f00b204e9800998ecf8427e

Extract all IOCs from this log and analyse them:
[paste your firewall log, SIEM alert, or email header]

Add a watch on 185.220.101.1 and alert me if it becomes malicious

Get all alerts from the last hour

Run a full monitor cycle now

๐Ÿ”” How Real-Time Monitoring Works

add_watch("185.220.101.1", alert_on=["malicious", "suspicious"])
         โ”‚
         โ–ผ
   Watch-list saved to ~/.threatwatch/watchlist.json
         โ”‚
         โ–ผ
run_monitor_cycle()   โ† trigger manually or on a schedule
         โ”‚
         โ–ผ
   Re-queries all sources for each watched IOC
         โ”‚
         โ–ผ
   Status changed or threshold crossed?
         โ”‚
    Yes  โ”‚  No
    โ–ผ    โ–ผ
  Alert  (no-op)
    โ”‚
    โ–ผ
get_alerts(since_minutes=60)

๐Ÿ—๏ธ Project Structure

threatwatch-mcp/
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ threatwatch/
โ”‚       โ”œโ”€โ”€ __init__.py        โ† package definition
โ”‚       โ”œโ”€โ”€ server.py          โ† FastMCP server + all 9 MCP tools
โ”‚       โ”œโ”€โ”€ config.py          โ† settings from environment variables
โ”‚       โ”œโ”€โ”€ ioc_detector.py    โ† IOC type detection (IP/domain/URL/hash)
โ”‚       โ”œโ”€โ”€ intel_sources.py   โ† API adapters (VT, OTX, AbuseIPDB, IPinfo, Shodan)
โ”‚       โ”œโ”€โ”€ alert_monitor.py   โ† real-time watch-list + alert engine
โ”‚       โ””โ”€โ”€ reporter.py        โ† Markdown report builder
โ”œโ”€โ”€ tests/
โ”‚   โ””โ”€โ”€ test_core.py           โ† unit tests
โ”œโ”€โ”€ pyproject.toml             โ† package config + dependencies
โ”œโ”€โ”€ .env.example               โ† environment variable template
โ””โ”€โ”€ README.md

๐Ÿ”’ Security Notes

  • Never commit your .env file โ€” it is in .gitignore by default

  • Restrict config file permissions on your machine:

    chmod 600 ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • All API keys used are read-only โ€” they can query data but cannot modify anything

  • If a key is ever leaked, regenerate it instantly from each service's dashboard


๐Ÿงช Running Tests

pip3 install pytest pytest-asyncio
pytest tests/ -v

๐Ÿ“œ License

Apache 2.0 โ€” see LICENSE for details.


๐Ÿ™ Acknowledgments

Available Tools

9 tools
add_watchAdd WatchA

Add an IOC to the real-time watch-list. ThreatWatch will periodically re-scan it and flag changes in threat status.

Inputs: ioc (required), label, alert_on. Returns: result

analyze_iocAnalyze IocB

Analyse a single Indicator of Compromise (IOC) across all available threat intelligence sources.

Supports: IPv4/IPv6 addresses, domain names, URLs, MD5/SHA1/SHA256 hashes.

Inputs: ioc (required), include_raw. Returns: result

bulk_analyzeBulk AnalyzeB

Analyse multiple IOCs concurrently and return a consolidated summary.

Inputs: iocs (required), max_concurrent. Returns: result

detect_iocs_in_textDetect Iocs In TextA

Extract all IOCs (IPs, domains, URLs, hashes) from freeform text such as log files, incident reports, or paste-bin content.

Inputs: text (required), auto_analyze. Returns: result

get_alertsGet AlertsC

Retrieve alerts generated by the real-time monitor for watched IOCs.

Inputs: severity, mark_read, since_minutes. Returns: result

list_watchesList WatchesA

List all IOCs currently on the watch-list with their last-known status.

Returns: Markdown table of watched IOCs.

Inputs: no named parameters. Returns: result

remove_watchRemove WatchC

Remove an IOC from the real-time watch-list.

Inputs: watch_id (required). Returns: result

run_monitor_cycleRun Monitor CycleA

Manually trigger a monitoring cycle โ€” re-scans all watched IOCs immediately rather than waiting for the next scheduled interval.

Returns: Summary of how many IOCs were checked and how many triggered alerts.

Inputs: no named parameters. Returns: result

server_statusServer StatusA

Return the current ThreatWatch server status including configured API sources, watch-list size, and pending alert count.

Returns: A Markdown status card.

Inputs: no named parameters. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A3.8/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: status, single analysis, bulk analysis, watch management, alert retrieval, manual monitor, and text extraction. No overlap between tools; an agent can easily select the right one based on the action and resource.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., analyze_ioc, add_watch, get_alerts) or noun_status pattern (server_status), with clear and predictable naming throughout.

    Tool Count5/5

    With 9 tools, the set is well-scoped for a threat intelligence watch server, covering analysis, watch-list management, monitoring, and alerting without redundancy.

    Completeness5/5

    The tool surface provides complete lifecycle coverage: analyze IOCs (single/bulk), manage watch-list (add/remove/list), monitor (manual/automatic), retrieve alerts, and extract IOCs. No obvious gaps for the stated purpose.

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Enterprise network analysis platform that enables AI-powered packet analysis, threat detection, and network security capabilities through Claude Desktop integration.
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI-powered threat intelligence analysis of IPs, domains, URLs, and file hashes across multiple threat intelligence platforms (VirusTotal, AlienVault OTX, AbuseIPDB, IPinfo) with APT attribution and interactive reporting through natural language queries.
      28 PyPI
      40
      Apache 2.0
    • A
      license
      C
      quality
      D
      maintenance
      An AI-powered penetration testing server that integrates over 30 security tools with Groq LLM analysis for automated vulnerability scanning, triage, and reporting. It enables users to perform comprehensive security assessments through natural language natively within Claude Desktop.
      29
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      This MCP server connects Claude Desktop to OpenCTI for AI-augmented threat intelligence analysis, enabling natural language queries and instant, contextualized answers from your threat intelligence database.
      29
      -