Skip to main content
Glama

๐Ÿ•ต๏ธ maltego-mcp

An AI-assisted Maltego CE investigation copilot. Build, expand, analyze, and report on OSINT investigation graphs through natural language โ€” exported as native Maltego .mtgx files.

MCP Python License Tools Tests

An MCP server that turns an LLM into a Maltego CE investigation copilot โ€” an AI-assisted OSINT platform built on Maltego Community Edition's native graph format.


Contents

Related MCP server: maltego-mcp

How it works

Maltego CE has no live external API. Instead of trying to remote-control the desktop UI, this server uses Maltego's native .mtgx graph file (a ZIP archive of GraphML XML) as the integration surface:

  1. The LLM builds / reads / edits an investigation graph held in memory.

  2. Transforms โ€” and high-level investigation workflows / machines โ€” expand the graph (e.g. a domain โ†’ its IP addresses โ†’ open ports).

  3. The LLM analyzes the graph (summaries, pivots, next steps), lays it out, and generates a shareable report.

  4. The graph is saved as a .mtgx file that you open (or refresh) in Maltego CE.

A pluggable transform-provider layer keeps the design extensible: the built-in local provider needs no API keys, and external OSINT providers (VirusTotal, Shodan, SecurityTrails, Censys, Hunter.io, HaveIBeenPwned) activate automatically when their API keys are present โ€” all without changing the graph core or the MCP tools.

Capabilities at a glance

Area

What you get

Build graphs

Create/edit entities & links; save/open native .mtgx.

High-level workflows

investigate_domain/email/ip โ€” one call runs many transforms.

Unified entry point

maltego_investigate(query) โ€” detect, build, expand, analyze, recommend in one call.

Investigation Memory

Procedural memory: records why/how each step ran; queryable; travels in the .mtgx.

Next Best Action

Deterministic, explainable, memory-aware ranking of the most valuable next move.

Risk & confidence

Per-entity confidence, source reliability, linkage, priority, novelty scores.

Real-time mode

Optional event stream (entity_discovered, transform_*, report_generated, โ€ฆ).

Investigation machines

Reusable templates (Passive Domain, Email, Infrastructure Mapping).

OSINT providers

VirusTotal, Shodan, SecurityTrails, Censys, Hunter.io, HIBP (env-var keys).

AI analysis

Summarize, explain entity, identify pivots, suggest next steps.

Layout

Deterministic hierarchical / radial / force-directed layouts.

CSV import

Bulk-build graphs from type,value CSV.

Reporting

Deterministic Markdown / HTML investigation reports (now incl. quality scores).

Continuation

Load or merge existing .mtgx investigations and keep working.

This is a standalone MCP server. The server is launched with uv via uvx, which auto-installs the Python dependencies in an isolated environment โ€” no manual pip install needed. Install uv once if you don't have it:

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

Add it to Claude Code

Register the server straight from GitHub (available in every project โ€” user scope):

claude mcp add maltego --scope user -- uvx --from git+https://github.com/SulimanAbdulrazzaq/maltego-mcp.git maltego-mcp

Or run from a local clone (reflects your local edits โ€” best for development):

git clone https://github.com/SulimanAbdulrazzaq/maltego-mcp.git
claude mcp add maltego --scope user -- uvx --from ./maltego-mcp maltego-mcp

On Windows PowerShell, the -- separator can be swallowed by the shell. If claude mcp add errors with unknown option '--from', add the server by editing your config instead: open ~/.claude.json and add a maltego entry under the top-level "mcpServers" object:

"maltego": {
  "type": "stdio",
  "command": "uvx",
  "args": ["--from", "git+https://github.com/SulimanAbdulrazzaq/maltego-mcp.git", "maltego-mcp"]
}

The repo also ships a committed .mcp.json, so if you simply open a clone of this repo in Claude Code the maltego server is offered automatically (project scope, launched with uvx --from .).

Verify it connected:

claude mcp list   # โ†’ maltego: uvx ... - โˆš Connected

After it connects, the maltego_* tools are available in Claude. Set OSINT keys (optional) in your shell before starting Claude Code to enable those providers (see Transforms by provider).

Prefer not to use uv? See Manual / pip install and point the MCP command at the venv's maltego-mcp executable instead.

Windows troubleshooting (first launch)

On Windows, the very first launch occasionally fails with failed to rename ... Access is denied (os error 5) while unpacking pywin32 (a transitive dependency of mcp). This is Windows Defender briefly locking the files during real-time scanning โ€” not a bug in the server. Fixes:

  • Just retry โ€” restart Claude Code; it succeeds once Defender finishes scanning and the dependency is cached (verified: it works on the second attempt).

  • Or pre-warm the cache once from a terminal: uvx --from <path-to-this-repo> maltego-mcp (Ctrl-C after it prints nothing โ€” it's a stdio server), then retry in Claude Code.

  • Or add an exclusion for %LOCALAPPDATA%\uv\cache in Windows Security โ†’ Virus & threat protection โ†’ Exclusions.

Manual / pip install

cd maltego-mcp
python -m venv .venv
.venv/Scripts/activate        # Windows
# source .venv/bin/activate   # macOS/Linux
pip install -e .

Then register the stdio server with any MCP client, e.g.:

{
  "mcpServers": {
    "maltego": { "command": ".../.venv/Scripts/maltego-mcp.exe" }
  }
}

Running

The server speaks MCP over stdio (ideal for local desktop integration):

maltego-mcp
# or
python -m maltego_mcp.server

Register with an MCP client

Example mcp.json / client config entry:

{
  "mcpServers": {
    "maltego": {
      "command": "C:/Users/you/Desktop/maltego_mcp/.venv/Scripts/maltego-mcp.exe"
    }
  }
}

(Use the .venv Python on macOS/Linux: "command": ".../.venv/bin/maltego-mcp".)

Test with the MCP Inspector

npx @modelcontextprotocol/inspector maltego-mcp

Tools

52 tools. The tables below group them by area. For the complete reference with every argument, type, and default, see TOOLS.md (auto-generated from the live tool schemas โ€” the file an AI agent should read to learn the exact interface).

Graph management

Tool

Description

maltego_create_graph

Create a new empty in-memory graph (becomes active).

maltego_open_graph

Load an existing .mtgx file into memory.

maltego_save_graph

Write a graph to a .mtgx file for Maltego CE.

maltego_list_graphs

List open graphs and show the active one.

maltego_set_active_graph

Switch the active graph.

Tool

Description

maltego_add_entity

Add a node (domain, IP, person, email, โ€ฆ).

maltego_add_link

Add a directed link between two entities.

maltego_list_entities

List/filter/paginate entities on the active graph.

maltego_get_entity

Full details for one entity.

maltego_update_entity

Update value/properties/notes/weight.

maltego_delete_entity

Delete an entity and its links.

maltego_list_entity_types

Discover supported Maltego entity types.

Transforms

Tool

Description

maltego_list_transforms

List available transforms (optionally by input type; shows availability).

maltego_run_transform

Run a single transform on an entity and add the results.

High-level investigation workflows

Tool

Description

maltego_investigate_domain

Seed a domain and auto-run all applicable/available transforms.

maltego_investigate_email

Seed an email and auto-investigate (domain, breaches, footprint).

maltego_investigate_ip

Seed an IP and auto-investigate (reverse DNS, ports, services).

maltego_list_machines

List investigation machines (workflow templates).

maltego_run_machine

Run a machine (e.g. passive_domain) against a seed value.

Unified entry point (primary interface for agents)

Tool

Description

maltego_investigate

One call does it all: detect type โ†’ build/expand graph โ†’ layout โ†’ summarize โ†’ rank โ†’ next-best-actions โ†’ inline report, returned as one finished briefing. Supports depth: quick / standard / deep (deep runs all applicable transforms over more rounds). No follow-up calls or file writes needed.

maltego_expand_entity

Run all applicable transforms on one entity (pivot from a specific node).

maltego_find_path

Shortest relationship path between two entities.

maltego_guide

Returns the server's usage guidance (workflow + tool map) on demand.

The AI is told how to use these tools via the server's MCP instructions (auto-injected into the model's context โ€” this is how the assistant knows to run an investigation to completion instead of asking after each step). You can also invoke the bundled command /maltego-mcp:investigate <target> or the investigate / triage / report prompts.

AI-oriented analysis (the "copilot")

Tool

Description

maltego_summarize_graph

Deterministic overview: counts, type breakdown, key/isolated entities.

maltego_explain_entity

Explain one entity: data, neighbours, applicable transforms.

maltego_identify_pivots

Rank the most-connected pivot entities.

maltego_suggest_next_steps

Simple heuristic suggestions (retained for compatibility).

maltego_next_best_actions

Decision engine: deterministic, explainable, memory-aware ranking of the best next move.

Investigation Memory (procedural memory)

Tool

Description

maltego_list_investigation_steps

List recorded steps (what ran, why, outcome, importance).

maltego_explain_why

Trace an entity's provenance โ€” which transform/step discovered it and why.

maltego_explain_transform

Full detail of one recorded transform execution (by execution id).

maltego_get_investigation_timeline

Chronological narrative of the whole investigation.

Risk & confidence scoring

Tool

Description

maltego_score_entity

Confidence, source reliability, linkage strength, priority, novelty for one entity.

maltego_rank_entities

Rank all entities by investigation priority.

maltego_explain_scores

Scores plus a deterministic rationale for one entity.

Real-time mode (optional)

Tool

Description

maltego_subscribe_events

Enable live event mode; returns a subscription id.

maltego_get_recent_events

Poll recent events (supports since_seq incremental polling).

Tool

Description

maltego_apply_layout

Assign positions (hierarchical/radial/force), saved into the .mtgx.

maltego_import_csv

Build entities/links from a CSV file or inline CSV text.

maltego_export_csv

Export entities to CSV (round-trips with import).

maltego_export_json

Export the full graph + memory + scores as JSON.

maltego_list_links / maltego_delete_link

List or delete individual links.

maltego_rename_graph / maltego_delete_graph

Rename or drop an open graph.

maltego_list_providers

List OSINT providers and whether their API keys are configured.

maltego_generate_report / maltego_export_report

Markdown/HTML report inline or to a file.

maltego_load_graph / maltego_import_graph

Open a .mtgx as a new graph, or merge into the active one.

Outcome-based learning (opt-in)

Tool

Description

maltego_learning_stats

View cross-investigation transform success/yield history.

maltego_reset_learning

Clear the learning store.

Learning is off by default (keeps results deterministic). Enable with MALTEGO_MCP_LEARNING=1 (or MALTEGO_MCP_LEARNING_PATH=/path/to/learning.json). When on, the server records per-transform outcomes across investigations and lets that history nudge maltego_next_best_actions.

Transforms by provider

No API key required โ€” work out of the box:

  • dns.domain_to_ip โ€” domain/DNS name โ†’ IPv4 addresses (DNS A record) [network]

  • dns.ip_to_host โ€” IPv4 address โ†’ hostname (reverse DNS / PTR) [network]

  • parse.url_to_domain / parse.email_to_domain / parse.domain_to_website (offline)

  • crtsh.domain_to_subdomains โ€” subdomains from Certificate Transparency (crt.sh) [network]

  • rdap.domain_info โ€” registrar, dates, nameservers, contacts (RDAP/WHOIS) [network]

  • rdap.ip_info โ€” netblock + owning org/ASN for an IP (RDAP) [network]

External OSINT providers โ€” activate when their env-var key is set (see maltego_list_providers). Transforms are always listed but only run when configured; a missing key yields an actionable message rather than an error.

Provider

Env var(s)

Example transforms

VirusTotal

VIRUSTOTAL_API_KEY

vt.domain_to_ip, vt.domain_to_subdomains, vt.ip_to_domain

Shodan

SHODAN_API_KEY

shodan.ip_to_info, shodan.domain_to_subdomains

SecurityTrails

SECURITYTRAILS_API_KEY

securitytrails.domain_to_subdomains, securitytrails.domain_to_dns

Censys

CENSYS_API_ID, CENSYS_API_SECRET

censys.ip_to_services

Hunter.io

HUNTER_API_KEY

hunter.domain_to_emails

Have I Been Pwned

HIBP_API_KEY

hibp.email_to_breaches

Configure keys via environment variables (in your MCP client's env block or the shell), then restart the server. Example client config:

{
  "mcpServers": {
    "maltego": {
      "command": ".../.venv/Scripts/maltego-mcp.exe",
      "env": { "VIRUSTOTAL_API_KEY": "...", "SHODAN_API_KEY": "..." }
    }
  }
}

Example workflows

Manual (low-level):

maltego_create_graph(name="acme-recon")
maltego_add_entity(type="maltego.Domain", value="example.com")        # -> n0
maltego_run_transform(transform_name="dns.domain_to_ip", entity_id="n0")
maltego_apply_layout(algorithm="hierarchical")
maltego_save_graph(path="C:/Users/you/Desktop/acme-recon.mtgx")

One-call copilot (recommended for agents):

maltego_investigate(query="bob@example.com")   # detect โ†’ build โ†’ expand โ†’ analyze โ†’ recommend
maltego_explain_why(entity_id="n1")            # why is this entity here?
maltego_next_best_actions()                    # explainable, memory-aware ranking
maltego_rank_entities()                        # focus on the highest-priority findings
maltego_get_investigation_timeline()           # the reasoning trace
maltego_generate_report(format="html")
maltego_save_graph(path="C:/cases/example.mtgx")   # memory travels inside the .mtgx

AI-assisted (step-by-step):

maltego_investigate_domain(value="example.com")     # auto-runs transforms
maltego_identify_pivots()                            # find key nodes
maltego_next_best_actions()                          # what to do next (decision engine)
maltego_apply_layout(algorithm="radial")
maltego_generate_report(format="markdown")           # shareable report
maltego_save_graph(path="C:/Users/you/Desktop/example.mtgx")

Continue a previous investigation:

maltego_load_graph(path="C:/cases/old.mtgx")         # reopen
maltego_run_machine(machine_name="infrastructure_mapping", seed_value="example.com")
maltego_import_graph(path="C:/cases/related.mtgx")   # merge in another case

Bulk import from CSV:

maltego_import_csv(content="type,value,link_to\nDomain,example.com,\nIPv4Address,1.2.3.4,example.com\n")

Extending

Add a new OSINT provider

  1. Create a module under src/maltego_mcp/transforms/osint/.

  2. Write pure parser functions (dict -> list[ResultEntity]) and async run functions that read the API key from an env var via require_keys(...).

  3. Register a ProviderInfo with providers.register(...) and your Transform(...) objects (with api_key_env=...) via registry.register(...).

  4. Import the module from transforms/osint/__init__.py.

No changes to the graph core, orchestration, machines, or MCP tools are needed โ€” new transforms automatically participate in investigate_*, machines, analysis, and suggestions.

Add an investigation machine

from maltego_mcp.machines import Machine, register_machine
register_machine(Machine(
    name="my_workflow", display_name="My Workflow", description="...",
    seed_type="maltego.Domain",
    transform_names=["dns.domain_to_ip", "vt.domain_to_subdomains"],
    allow_network=True, max_rounds=2,
))

Architecture

src/maltego_mcp/
โ”œโ”€โ”€ server.py          # FastMCP server (with MCP instructions) + 52 tools + prompts
โ”œโ”€โ”€ models.py          # Pydantic input models
โ”œโ”€โ”€ entities.py        # Maltego entity-type catalog
โ”œโ”€โ”€ formatting.py      # markdown/JSON response helpers + error mapping
โ”œโ”€โ”€ detect.py          # query -> entity type/value/machine (for maltego_investigate)
โ”œโ”€โ”€ orchestration.py   # breadth-first engine + run_and_record (memory+events choke-point)
โ”œโ”€โ”€ machines.py        # reusable workflow templates + registry
โ”œโ”€โ”€ analysis.py        # deterministic summarize/explain/pivots/next-steps
โ”œโ”€โ”€ recommendation.py  # Next Best Action decision engine (memory-aware, explainable)
โ”œโ”€โ”€ scoring.py         # Risk & confidence engine (deterministic per-entity metrics)
โ”œโ”€โ”€ memory.py          # Investigation Memory (procedural memory; storage + queries)
โ”œโ”€โ”€ learning.py        # opt-in cross-investigation outcome learning (feeds NBA)
โ”œโ”€โ”€ events.py          # architecture-agnostic event bus (real-time mode)
โ”œโ”€โ”€ layout.py          # hierarchical / radial / force-directed layouts
โ”œโ”€โ”€ csv_import.py      # CSV -> entities/links (type aliases, dedupe)
โ”œโ”€โ”€ reporting.py       # deterministic Markdown / HTML reports (incl. quality scores)
โ”œโ”€โ”€ graph/
โ”‚   โ”œโ”€โ”€ graph_store.py # in-memory Graph (+ .memory, merge, analysis helpers)
โ”‚   โ”œโ”€โ”€ mtgx_writer.py # Graph -> .mtgx (GraphML + positions + memory sidecar + zip)
โ”‚   โ””โ”€โ”€ mtgx_reader.py # .mtgx -> Graph (recovers positions + memory sidecar)
โ””โ”€โ”€ transforms/
    โ”œโ”€โ”€ base.py        # Transform/registry + ProviderInfo/ProviderRegistry (+ reliability)
    โ”œโ”€โ”€ local.py       # built-in no-auth transforms
    โ””โ”€โ”€ osint/         # providers
        โ”œโ”€โ”€ base_http.py
        โ”œโ”€โ”€ keyless.py    # NO-key: crt.sh (cert transparency), RDAP (domain + IP)
        โ””โ”€โ”€ virustotal.py, shodan.py, securitytrails.py, censys.py, hunterio.py, hibp.py

Investigation Memory & determinism

  • Procedural memory (memory.py) records every transform execution โ€” the trigger entity, the chosen transform, why it was chosen, what it discovered, status, importance, and whether to reconsider it. It is stored on Graph.memory, kept separate from the graph structure, and serialized to a sidecar member (maltego_mcp/investigation_memory.json) inside the .mtgx โ€” so it travels with the investigation but never affects Maltego CE compatibility (Maltego ignores unknown archive members).

  • orchestration.run_and_record is the single choke-point through which the engine and the manual maltego_run_transform tool execute transforms, so memory and events are captured consistently everywhere.

  • Scores (scoring.py) are computed deterministically from the graph + memory and provider reliability (ProviderInfo.reliability), so the same investigation always yields the same scores, recommendations, and reports.

Verifying a graph opens in Maltego CE

The .mtgx format is validated by our reader/writer round-trip and by checking entity property field names against Maltego's real definitions (e.g. Domain/Website โ†’ fqdn, Company/Organization โ†’ title, IPv4Address โ†’ ipv4-address). To confirm end-to-end in the actual app:

  1. Install Maltego CE (free; requires a download + account at maltego.com).

  2. Generate a sample: maltego_investigate("example.com") (or add a few entities) then maltego_save_graph(path="โ€ฆ/sample.mtgx"). A ready-made sample-verification.mtgx is produced on the Desktop by the test fixtures.

  3. In Maltego CE: File โ†’ Import โ†’ Import Graph (or File โ†’ Open) and select the .mtgx.

  4. Confirm entities render with their values populated, correct types, and links with labels. If a given type's value is blank, its main_property in src/maltego_mcp/entities.py needs correcting against Maltego's field id for that entity.

Status: the common entity types (Domain, IP, Email, Website, Person, Company, โ€ฆ) have had their field names verified against a reference; opening in a real Maltego CE install is the final confirmation step and is left to the user (no Maltego install was available here).

Notes & limitations

  • Targets Maltego CE's file format; it does not remote-control the running desktop app. Re-open or refresh the .mtgx in Maltego after saving.

  • The entity-type catalog is a curated subset; custom maltego.* types are accepted and saved as-is.

  • Graphs live in process memory until saved; restarting the server clears unsaved graphs.

  • Layout positions are written into the .mtgx as yFiles node graphics. Maltego CE may re-run its own layout on import; positions are always available via the tools regardless.

  • OSINT provider transforms call third-party APIs โ€” respect each provider's terms of service and rate limits. Without a key, those transforms are listed but skip with a clear "missing credential" message.

  • Reports, layouts, scores, and recommendations are deterministic: the same graph + memory always yields the same output, so results are reproducible and shareable. (Timestamps in memory/events are the only non-deterministic field.)

  • Investigation Memory is stored as a sidecar JSON member inside the .mtgx and is recovered on load โ€” it survives save/load and merges, and is ignored by Maltego CE. Manually-added/CSV entities are "analyst-provided" (no discovering step) and scored with full source reliability.

  • Real-time mode is optional: the event bus always buffers cheaply, and maltego_subscribe_events enables live callbacks. Over MCP stdio you retrieve events by polling maltego_get_recent_events (use since_seq for increments).

License

MIT

Available Tools

52 tools
maltego_add_entityA

Add an entity (node) to the active graph.

Use this to place domains, IPs, people, emails, etc. on the investigation graph. By default duplicate entities (same type + value) are merged rather than re-created. Unknown maltego.* types are accepted so investigations are never blocked by a missing catalog entry.

Args: params (AddEntityInput): - type (str): Maltego entity type id (e.g. 'maltego.Domain'). - value (str): Primary value (e.g. 'example.com'). - properties (Optional[Dict[str,str]]): Extra properties. - notes (Optional[str]): Free-text notes. - dedupe (bool): Reuse existing identical entity (default True).

Returns: str: Confirmation including the new (or existing) entity id, plus a hint if the entity type is not in the known catalog.

Inputs: params (required). Returns: result

maltego_apply_layoutA
Idempotent

Compute and assign (x, y) layout positions to entities on the active graph.

Positions are stored on the graph and persisted into the .mtgx on save. Re-run after adding entities to refresh the layout. Layouts are deterministic.

Args: params (ApplyLayoutInput): - algorithm (str): 'hierarchical', 'radial', or 'force'.

Returns: str: Confirmation with the number of entities positioned.

Inputs: params (required). Returns: result

maltego_create_graphA

Create a new, empty in-memory Maltego graph and make it active.

The graph lives in server memory until you save it with maltego_save_graph, which writes a .mtgx file that opens in Maltego CE. Subsequent entity/link operations target the active graph.

Args: params (CreateGraphInput): - name (str): Unique name for the new graph.

Returns: str: Confirmation message including the graph name.

Inputs: params (required). Returns: result

maltego_delete_entityA
DestructiveIdempotent

Delete an entity and all links touching it from the active graph.

Args: params (DeleteEntityInput): - entity_id (str): Entity to delete.

Returns: str: Confirmation including how many links were removed, or an error.

Inputs: params (required). Returns: result

maltego_delete_graphA
DestructiveIdempotent

Remove an open graph from the server's memory.

This does NOT delete any saved .mtgx file on disk โ€” only the in-memory copy. If the active graph is removed, another open graph becomes active (if any).

Args: params (DeleteGraphInput): - name (str): Name of the open graph to remove.

Returns: str: Confirmation, or an actionable error if the name is unknown.

Inputs: params (required). Returns: result

maltego_expand_entityA

Run ALL applicable, available transforms on ONE entity to pivot from it.

Use when: you want to dig into a specific node (e.g. a pivot from maltego_identify_pivots) rather than re-running a whole investigation. Records Investigation Memory and links results back to the entity.

Args: params (ExpandEntityInput): - entity_id (str): Entity to expand (e.g. 'n0'). - allow_network (bool): Run network transforms (default True). - max_rounds (int): Expansion rounds from this entity (1-4, default 1).

Returns: str: Summary of what the expansion discovered.

Inputs: params (required). Returns: result

maltego_explain_entityA
Read-onlyIdempotent

Explain one entity: its data, neighbours, and how it can be expanded.

Deterministic context for a single node: properties, notes, degree, incoming and outgoing neighbours (with link labels), and which transforms apply to it (and whether each is currently available).

Args: params (ExplainEntityInput): - entity_id (str): Entity id (e.g. 'n0'). - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: Detailed explanation, or an error if the id is unknown.

Inputs: params (required). Returns: result

maltego_explain_scoresA
Read-onlyIdempotent

Explain how an entity's intelligence-quality scores were derived.

Returns the scores plus a deterministic, human-readable rationale (sources, connectivity, type rarity, enriching properties).

Args: params (ScoreEntityInput): - entity_id (str): Entity id (e.g. 'n0').

Returns: str: Markdown explanation with the scores and contributing factors.

Inputs: params (required). Returns: result

maltego_explain_transformA
Read-onlyIdempotent

Explain one recorded transform execution by its execution id.

Args: params (ExplainTransformInput): - transform_execution_id (str): e.g. 'x0' (see maltego_list_investigation_steps). - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: Full step detail, or an error if the execution id is unknown.

Inputs: params (required). Returns: result

maltego_explain_whyA
Read-onlyIdempotent

Explain why an entity is on the graph: which step/transform discovered it.

Uses Investigation Memory to trace an entity's provenance โ€” the transform that produced it, the entity that triggered that transform, and the recorded reason. Seed entities (added manually or via CSV) report as analyst-provided.

Args: params (ExplainWhyInput): - entity_id (str): Entity id (e.g. 'n3'). - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: Provenance explanation, or an error if the id is unknown.

Inputs: params (required). Returns: result

maltego_export_csvA
DestructiveIdempotent

Export the active graph's entities to a CSV file (round-trips with import).

Writes the same type,value,notes,link_to schema that maltego_import_csv reads, so an exported CSV can be re-imported to reconstruct entities and their relationships.

Args: params (ExportPathInput): - path (str): Destination CSV file path.

Returns: str: Confirmation including the path and entity count.

Inputs: params (required). Returns: result

maltego_export_jsonA
DestructiveIdempotent

Export the full active graph (entities, links, memory, scores) as JSON.

A complete, programmatic snapshot โ€” a superset of the .mtgx sidecars โ€” useful for downstream tooling that doesn't read Maltego files.

Args: params (ExportPathInput): - path (str): Destination JSON file path.

Returns: str: Confirmation including the path.

Inputs: params (required). Returns: result

maltego_export_reportA
DestructiveIdempotent

Write a deterministic investigation report for the active graph to a file.

Same content as maltego_generate_report, written to path. Use a .md path for markdown or .html for HTML.

Args: params (ExportReportInput): - path (str): Destination file path. - format (ReportFormat): 'markdown' (default) or 'html'.

Returns: str: Confirmation including the path written.

Inputs: params (required). Returns: result

maltego_find_pathA
Read-onlyIdempotent

Find the shortest relationship path between two entities (undirected BFS).

Use when: you want to know how two findings are connected (e.g. does this email relate to that IP, and through what?).

Args: params (FindPathInput): - source_id (str): Start entity id. - target_id (str): End entity id.

Returns: str: The shortest path as a chain of entities (with link labels), or a note if no path exists.

Inputs: params (required). Returns: result

maltego_generate_reportA
Read-onlyIdempotent

Generate a deterministic investigation report for the active graph.

The report includes an executive summary, key findings (pivots), an entity inventory by type, relationship highlights, and suggested next steps. Returns the report text inline (use maltego_export_report to write it to a file).

Args: params (GenerateReportInput): - format (ReportFormat): 'markdown' (default) or 'html'.

Returns: str: The full report as Markdown or HTML text.

Inputs: params (required). Returns: result

maltego_get_entityA
Read-onlyIdempotent

Fetch full details of one entity on the active graph by id.

Args: params (GetEntityInput): - entity_id (str): Entity id (e.g. 'n0'). - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: Entity detail. JSON form is {id, type, value, properties, notes, weight}; markdown form is a readable block. Error if the id is unknown.

Inputs: params (required). Returns: result

maltego_get_investigation_timelineA
Read-onlyIdempotent

Return the chronological timeline of the active investigation.

A compact, ordered narrative of every transform execution recorded in Investigation Memory โ€” useful for review, audit, and explaining the path the investigation took.

Returns: str: Markdown timeline (one line per step in execution order).

Inputs: no named parameters. Returns: result

maltego_get_recent_eventsA
Read-onlyIdempotent

Return recent investigation events (entity_discovered, transform_*, etc.).

Reads from the event bus's bounded buffer. Use since_seq to fetch only events newer than a sequence number you've already seen (incremental polling).

Args: params (GetEventsInput): - limit (int): Max events (default 50). - since_seq (Optional[int]): Only events with seq greater than this. - response_format (ResponseFormat): 'json' (default) or 'markdown'.

Returns: str: JSON form is {count, next_seq, events:[{seq,type,timestamp,data}]}; markdown is a readable list.

Inputs: params (required). Returns: result

maltego_guideA
Read-onlyIdempotent

Return how to use this server: the autonomous workflow and the tool map.

Use when: you are unsure which tool to call or how the investigation flow works. This is the same guidance the server provides as MCP instructions โ€” call it to pull the workflow into context. Next: usually maltego_investigate.

Returns: str: The full usage guidance (workflow, tool map, conventions).

Inputs: no named parameters. Returns: result

maltego_identify_pivotsA
Read-onlyIdempotent

Identify the most promising pivot entities in the active graph.

Deterministically ranks entities that connect many others (degree >= 2), which are typically the best points to pivot an investigation (shared IPs, central emails, etc.).

Args: params (AnalysisLimitInput): - limit (int): Max pivots to return (1-50, default 10). - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: Ranked pivots with id, value, type, degree, and a reason.

Inputs: params (required). Returns: result

maltego_import_csvA

Build entities (and optional links) on the active graph from CSV.

Accepts a CSV file path or raw CSV text with a 'type,value' header (optional 'notes' and 'link_to' columns). The 'type' column accepts friendly aliases ('Domain', 'Email', 'IP') or full Maltego type ids. Entities are deduplicated; rows with unknown types are skipped and reported.

Args: params (ImportCsvInput): - path (Optional[str]): Path to a CSV file, OR - content (Optional[str]): Raw CSV text.

Returns: str: Counts of entities added/reused, links added, rows skipped, and any per-row warnings.

Inputs: params (required). Returns: result

maltego_import_graphA

Merge a .mtgx file's contents into the ACTIVE graph (combine investigations).

Unlike maltego_load_graph (which opens a separate graph), this merges another graph's entities and links into the current active graph, remapping ids and de-duplicating by (type, value) when dedupe is true.

Args: params (ImportGraphInput): - path (str): Path to the .mtgx file to merge in. - dedupe (bool): Reuse matching entities instead of duplicating.

Returns: str: Counts of entities/links added and reused, or an actionable error.

Inputs: params (required). Returns: result

maltego_investigateA

PRIMARY entry point โ€” run a COMPLETE investigation in one call.

Use when the user wants to investigate anything (domain, email, IPv4/IPv6, or URL, or a bare value). This is the default for "investigate X". It auto-detects the type, builds/expands the graph via the right machine (recording Investigation Memory), lays it out, summarizes, scores/ranks entities, computes next-best-actions, and includes an inline report โ€” and returns ONE finished briefing. Present it directly; do not call summarize/ list/suggest afterwards. Next: offer to maltego_save_graph or maltego_export_report (do not write files unless asked).

Args: params (InvestigateQueryInput): - query (str): What to investigate (type auto-detected). - allow_network (bool): Run network transforms (default True). - depth (str): 'quick' | 'standard' (default) | 'deep'. 'deep' runs ALL applicable available transforms over more rounds (thorough, slower); use it when the user asks to "go deep"/"dig further". - max_rounds (Optional[int]): Explicit rounds override (else set by depth). - layout (str): 'hierarchical' | 'radial' | 'force'. - include_report (bool): Append the full inline report (default True). - include_next_actions (bool): Include NBA recommendations (default True).

Returns: str: One complete briefing โ€” detection + run stats, important discoveries, recommended next actions, and (by default) a full inline report. No files are written.

Inputs: params (required). Returns: result

maltego_investigate_domainA

Automatically investigate a domain by adding it and running transforms.

A one-call workflow: ensures an active graph (creating one if needed), adds a Domain entity, then expands the graph by running every applicable + available transform (DNS, plus any configured OSINT providers) for a few rounds, de-duplicating results. Use this instead of chaining transforms manually.

Args: params (InvestigateInput): - value (str): The domain to investigate (e.g. 'example.com'). - allow_network (bool): Run network transforms (default True). - max_rounds (int): Expansion depth 1-4 (default 2).

Returns: str: Summary of how many transforms ran and what was discovered, plus a note of any transforms skipped for missing API keys.

Inputs: params (required). Returns: result

maltego_investigate_emailA

Automatically investigate an email address (domain, breaches, footprint).

Adds an Email Address entity and expands the graph: derives the domain, checks breach exposure (if a HaveIBeenPwned key is configured), and expands the related domain's basic footprint. See maltego_investigate_domain for the shared behaviour and return shape.

Args: params (InvestigateInput): - value (str): The email to investigate (e.g. 'bob@example.com'). - allow_network (bool): Run network transforms (default True). - max_rounds (int): Expansion depth 1-4 (default 2).

Returns: str: Summary of what was discovered.

Inputs: params (required). Returns: result

maltego_investigate_ipA

Automatically investigate an IPv4 address (reverse DNS, ports, services).

Adds an IPv4 Address entity and expands the graph using reverse DNS plus any configured host-intelligence providers (Shodan, Censys). See maltego_investigate_domain for the shared behaviour and return shape.

Args: params (InvestigateInput): - value (str): The IPv4 address (e.g. '8.8.8.8'). - allow_network (bool): Run network transforms (default True). - max_rounds (int): Expansion depth 1-4 (default 2).

Returns: str: Summary of what was discovered.

Inputs: params (required). Returns: result

maltego_learning_statsA
Read-onlyIdempotent

Show cross-investigation learning stats used by the Next Best Action engine.

Learning is opt-in: enable it by setting the env var MALTEGO_MCP_LEARNING=1 (or MALTEGO_MCP_LEARNING_PATH=/path/to/file.json). When enabled, the engine records per-transform outcomes across investigations (runs, successes, average yield) and lets that history nudge recommendations.

Returns: str: JSON of per-transform stats, or a note if learning is disabled.

Inputs: no named parameters. Returns: result

maltego_list_entitiesA
Read-onlyIdempotent

List entities on the active graph, with optional filtering and pagination.

Args: params (ListEntitiesInput): - type_filter (Optional[str]): Restrict to a Maltego type. - value_contains (Optional[str]): Case-insensitive substring filter. - limit (int): Max results (1-500, default 50). - offset (int): Results to skip (default 0). - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: In JSON form, an object: { "total": int, # entities matching filters "count": int, # entities in this page "offset": int, "has_more": bool, "next_offset": int | None, "entities": [ {id, type, value, properties, notes, weight}, ... ] } In markdown form, a readable bullet list.

Inputs: params (required). Returns: result

maltego_list_entity_typesA
Read-onlyIdempotent

List supported Maltego entity types from the built-in catalog.

Use this to discover valid type ids for maltego_add_entity. The catalog is a curated subset of Maltego's built-in types; custom types also work.

Args: params (ListEntityTypesInput): - category (Optional[str]): Filter to one category (e.g. 'infrastructure', 'personal', 'social', 'organization', 'location').

Returns: str: Markdown grouped by category, listing each type id and its main property.

Inputs: params (required). Returns: result

maltego_list_graphsA
Read-onlyIdempotent

List all graphs currently open in the server and mark the active one.

Returns: str: Markdown bullet list of open graphs with entity/link counts, or a note if none are open.

Inputs: no named parameters. Returns: result

maltego_list_investigation_stepsA
Read-onlyIdempotent

List recorded investigation steps (procedural memory) for the active graph.

Each step records a transform execution: what ran, why, the trigger entity, what it discovered, status, and importance. This is the investigation's reasoning trace, not just its data.

Args: params (ListStepsInput): - limit/offset (int): Pagination. - status (Optional[str]): Filter by 'success', 'empty', or 'error'. - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: JSON form is {total, count, offset, steps:[...]}; markdown is a list.

Inputs: params (required). Returns: result

maltego_list_machinesA
Read-onlyIdempotent

List available investigation machines (reusable workflow templates).

Machines run a curated set of transforms over several rounds (e.g. 'Passive Domain Investigation'). Run one with maltego_run_machine.

Returns: str: Markdown list of machines with their seed type and description.

Inputs: no named parameters. Returns: result

maltego_list_providersA
Read-onlyIdempotent

List OSINT transform providers and whether each is configured.

Shows the built-in 'local' provider plus external providers (VirusTotal, Shodan, SecurityTrails, Censys, Hunter.io, HaveIBeenPwned), the environment variable(s) each needs, and whether those are currently set.

Returns: str: Markdown list grouped by tier with configuration status and the env vars required to enable each provider.

Inputs: no named parameters. Returns: result

maltego_list_transformsA
Read-onlyIdempotent

List available transforms, optionally filtered by accepted input type.

Transforms expand an entity into related entities (e.g. a domain into its IP addresses). The built-in 'local' provider needs no API keys; more providers (a Maltego API, OSINT services) can be added without changing these tools.

Args: params (ListTransformsInput): - input_type (Optional[str]): Only transforms accepting this type.

Returns: str: Markdown list of transforms with name, accepted input types, output types, provider, and whether they require network access.

Inputs: params (required). Returns: result

maltego_load_graphA

Load an existing .mtgx file as a new active graph (continue an investigation).

Equivalent to maltego_open_graph: parses all entities, links, properties, and any stored layout positions so you can continue editing and re-save (full round-trip).

Args: params (LoadGraphInput): - path (str): Path to the .mtgx file.

Returns: str: Summary of the loaded graph, or an actionable error.

Inputs: params (required). Returns: result

maltego_next_best_actionsA
Read-onlyIdempotent

Recommend the most valuable next moves (decision engine). Use when deciding what to do next.

A deterministic, explainable ranking that weighs entity importance, expected information gain, confidence, provider availability, and โ€” crucially โ€” the Investigation Memory (so it never re-suggests a transform already attempted on an entity). Supersedes maltego_suggest_next_steps with richer reasoning.

Args: params (AnalysisLimitInput): - limit (int): Max recommendations (1-50, default 10). - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: Ranked recommendations, each with transform, target entity, a deterministic score, expected gain, and a plain-English reason.

Inputs: params (required). Returns: result

maltego_open_graphA

Open an existing Maltego .mtgx file into memory and make it active.

Parses the GraphML inside the archive into entities and links so they can be inspected and edited. The graph remembers its source path so maltego_save_graph can re-save in place.

Args: params (OpenGraphInput): - path (str): Path to an existing .mtgx file.

Returns: str: Summary of the loaded graph (entity/link counts) or an error.

Inputs: params (required). Returns: result

maltego_rank_entitiesA
Read-onlyIdempotent

Rank entities by investigation priority (deterministic).

Scores every entity and returns them ordered by investigation_priority, so an analyst can focus on the most meaningful findings first.

Args: params (RankEntitiesInput): - limit (int): Max entities (1-200, default 20). - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: Ranked entities with their scores.

Inputs: params (required). Returns: result

maltego_rename_graphA

Rename an open graph (defaults to the active graph).

Args: params (RenameGraphInput): - new_name (str): New name. - graph_name (Optional[str]): Graph to rename; defaults to active.

Returns: str: Confirmation, or an actionable error (unknown/duplicate name).

Inputs: params (required). Returns: result

maltego_reset_learningA
DestructiveIdempotent

Clear the cross-investigation learning store (in-memory and on disk).

No-op when learning is disabled.

Returns: str: Confirmation.

Inputs: no named parameters. Returns: result

maltego_run_machineA

Run an investigation machine against a seed value on the active graph.

Ensures an active graph (creating one if needed), seeds the machine's entity type with seed_value, and expands the graph per the machine's recipe. Missing/unavailable transforms are skipped gracefully.

Args: params (RunMachineInput): - machine_name (str): e.g. 'passive_domain' (see maltego_list_machines). - seed_value (str): Seed value (domain/email/ip). - allow_network (Optional[bool]): Override the machine's network setting. - max_rounds (Optional[int]): Override expansion depth.

Returns: str: Summary of what the machine discovered, or an actionable error.

Inputs: params (required). Returns: result

maltego_run_transformA

Run a transform on an entity in the active graph to discover related entities.

Looks up the named transform, runs it against the given input entity, and (by default) adds the resulting entities to the active graph with links back to the input entity. Results are de-duplicated against existing entities.

Args: params (RunTransformInput): - transform_name (str): Transform to run (see maltego_list_transforms). - entity_id (str): Input entity id in the active graph. - add_to_graph (bool): Add results to the graph (default True).

Returns: str: Summary of discovered entities (and the ids created when added), or an actionable error (unknown transform, type mismatch, no results).

Inputs: params (required). Returns: result

maltego_save_graphA
DestructiveIdempotent

Save a graph to a Maltego .mtgx file that opens in Maltego CE.

Writes the active graph (or the named graph) as a .mtgx archive. If no path is supplied, re-saves to the path the graph was opened from. Open the resulting file in Maltego CE via File > Open, or refresh it if already open.

Args: params (SaveGraphInput): - path (Optional[str]): Destination .mtgx path. Defaults to the graph's original source path. - graph_name (Optional[str]): Graph to save; defaults to active graph.

Returns: str: The absolute path written, or an actionable error.

Inputs: params (required). Returns: result

maltego_score_entityA
Read-onlyIdempotent

Compute intelligence-quality scores for one entity (deterministic).

Returns confidence, source_reliability, linkage_strength, investigation_priority, and novelty in [0, 1], derived from the graph structure and Investigation Memory (which providers found the entity).

Args: params (ScoreEntityInput): - entity_id (str): Entity id (e.g. 'n0').

Returns: str: JSON object {entity, scores:{confidence, source_reliability, linkage_strength, investigation_priority, novelty}}.

Inputs: params (required). Returns: result

maltego_set_active_graphA
Idempotent

Make a previously-opened graph the active target for entity/link operations.

Args: params (SetActiveGraphInput): - name (str): Name of an open graph (see maltego_list_graphs).

Returns: str: Confirmation or an actionable error.

Inputs: params (required). Returns: result

maltego_subscribe_eventsA

Enable real-time investigation mode and return a subscription id.

Turns on the event bus's live mode and buffering. Because MCP stdio cannot push to the caller, retrieve emitted events by polling maltego_get_recent_events (events are also buffered before subscribing). Real-time mode is optional and does not change any .mtgx behaviour.

Returns: str: The subscription id and current buffer/sequence state.

Inputs: no named parameters. Returns: result

maltego_suggest_next_stepsA
Read-onlyIdempotent

Legacy simple heuristic for next transforms โ€” prefer maltego_next_best_actions.

Use when: you want the basic heuristic list. For real recommendations use maltego_next_best_actions (memory-aware, ranked, explainable). Kept for backward compatibility.

Deterministically recommends transforms to advance the investigation, prioritising the most-connected entities and available transforms first. Unavailable (missing-key) transforms are still listed but flagged.

Args: params (AnalysisLimitInput): - limit (int): Max suggestions (1-50, default 10). - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: Suggestions of (transform, target entity, expected output types).

Inputs: params (required). Returns: result

maltego_summarize_graphA
Read-onlyIdempotent

Summarize the active investigation graph (composition + key entities).

Deterministic overview: entity/link totals, a breakdown by entity type, the most-connected entities, and any isolated entities. Ideal for presenting an investigation's state to a user.

Args: params (SummarizeGraphInput): - response_format (ResponseFormat): 'markdown' (default) or 'json'.

Returns: str: JSON form matches analysis.summarize_graph (name, entity_count, link_count, type_breakdown, most_connected, isolated_count, isolated); markdown form is a readable brief.

Inputs: params (required). Returns: result

maltego_update_entityA
Idempotent

Update an entity's value, properties, notes, or weight on the active graph.

Only the supplied fields change; properties are merged (not replaced).

Args: params (UpdateEntityInput): - entity_id (str): Entity to update. - value (Optional[str]): New primary value. - properties (Optional[Dict[str,str]]): Properties to set/merge. - notes (Optional[str]): Replacement notes. - weight (Optional[int]): Node weight (0-100).

Returns: str: Confirmation or an actionable error.

Inputs: params (required). Returns: result

Tool Schema Changelog

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

Loading tool schema changelogโ€ฆ

    TDQS

    A4/5.0

    Scored across 52 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, especially with detailed descriptions. However, there is some overlap between the generic 'maltego_investigate' and the type-specific 'maltego_investigate_domain', 'maltego_investigate_email', 'maltego_investigate_ip', and between 'maltego_suggest_next_steps' and 'maltego_next_best_actions', which could cause confusion.

    Naming Consistency5/5

    All tools follow a consistent 'maltego_' prefix with snake_case naming. Verbs are uniform and descriptive (e.g., list_*, create_*, delete_*), and compound names like 'investigate_domain' follow a predictable pattern.

    Tool Count3/5

    52 tools is a large number for an MCP server, bordering on excessive. While the domain is complex, many tools (e.g., type-specific investigates, legacy 'suggest_next_steps') could be consolidated, making the surface feel heavy.

    Completeness4/5

    The tool set covers the full investigation lifecycle: graph management, entity/link CRUD, transforms, analysis, scoring, reporting, and learning. Minor gaps exist (e.g., no tool to clear all entities), but overall it is comprehensive.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Augments an LLM with Ontolocy cyber graph capabilities, enabling natural language queries against a Neo4j graph database populated with MITRE ATT\&CK data.
      1
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      Enables LLMs to author Maltego .mtgx graph files and perform OSINT lookups, with an optional transform layer for pivoting into MISP, TheHive, Cortex, and MITRE ATT\&CK directly in Maltego Desktop.
      13
      17 npm
      12
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables LLMs to perform OSINT link-analysis by exposing transforms (DNS, WHOIS, Shodan, etc.) as MCP tools for autonomous investigation and graph enrichment.
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI agents and LLMs to query codebase structure and data flow through Joern Code Property Graphs, supporting CPGQL queries, taint tracking, program slicing, and vulnerability hunting across multiple languages.
      -