maltego-mcp
Click on "Deploy 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., "@maltego-mcp inspect example.mtgx and summarize entity and link counts"
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.
maltego-mcp
Model Context Protocol (MCP) server for Maltego v4.13.0 graphs (.mtgx / GraphML), entity schemas, local and remote (TDS v2 / TRX v3) transforms, native OSINT transforms, .machine scripts, and Maltego Desktop CLI / AutomationServer IPC.
Requirements
Node.js v24+ (
v24.21.0tested) and npm 12+Optional: Maltego Desktop v4.13.0 (
/usr/bin/maltegoand~/.maltego/v4.13.0) for environment inspection, local/cached discovery,.machineinspection, and--automationPortGraphML pushOptional: Python 3 (
python3) if executing Python local transforms
Related MCP server: maltego-mcp
Installation & Build
git clone https://github.com/Steph-ux/maltego-mcp.git
cd maltego-mcp
npm install
npm run buildRun the full test suite (compiles TypeScript and executes all test/*.test.mjs suites):
npm testTransport & CLI Options
By default, maltego-mcp starts on stdio JSON-RPC (all server logs go to stderr so stdout stays clean for MCP framing).
# stdio transport (default)
node dist/index.js
node dist/index.js --stdio
# Streamable HTTP transport (/mcp and /health)
node dist/index.js --http
node dist/index.js --http 3000 --host 127.0.0.1 --token my-secret-token
node dist/index.js --http --port 3000 --token my-secret-tokenFlags:
--stdio- Use stdio MCP transport (default)--http [port]- Use Streamable HTTP MCP transport (/mcpand/health)--host <addr>- HTTP bind address (default127.0.0.1, orMCP_HTTP_HOST)--port <port>- HTTP listen port (default3000, orMCP_HTTP_PORT)--token <secret>- RequireAuthorization: Bearer <secret>on/mcp-h,--help- Show CLI usage
Tool outputs are automatically bounded to <= 4 MiB (4194304 bytes) for safe MCP transport framing.
Environment Variables
Variable | Default | Description |
|
| Path to the Maltego launcher binary |
|
| Path to the Maltego user configuration directory |
| Current working directory | Base directory confining relative/workspace |
|
| Python interpreter used by generated Python local transform templates |
|
| Default timeout (ms) for local and remote transforms |
|
| Maximum uncompressed GraphML / |
|
| Set |
|
| Default transport ( |
|
| Default HTTP bind host |
|
| Default HTTP listen port |
|
| Default Bearer token required for Streamable HTTP |
Registered Tools (31)
.mtgx / GraphML Archive Tools (8)
mtgx_inspect- Inspect a.mtgxarchive: returns metadata, entity/link type counts, and paginated entities and links (cleanly detects.mtglPandora/Lucene archives with a structured error).mtgx_create- Atomically create a new Maltego v4.13.0.mtgxarchive from entities, directed links, and metadata.mtgx_add_entities- Add entities to an existing.mtgxarchive with auto-generated IDs, grid placement, and optional deduplication.mtgx_add_links- Add directed links between existing entities in a.mtgxarchive.mtgx_query_graph- Query entities and induced links by type, value substring, property match, bookmark, or k-hop BFS neighborhood.mtgx_update_entity- Update an entity's value, properties, notes, bookmark, position, or weight in a.mtgxarchive.mtgx_remove_entities- Remove entities by ID from a.mtgxarchive and cascade-delete incident links.mtgx_export_graphml- Export a.mtgxarchive as standalone GraphML XML or JSON (optionally writing atomically to a file).
Entity Schema & Builder Tools (5)
entity_list_types- List built-in Maltego v4.13.0 entity types and optionally scan custom/local plain-XML.entitydirectories (skipping binary/encrypted files safely).entity_get_schema- Return the full property schema, inheritance chain, primary property, and JSON/XML examples for an entity type.entity_build- Validate an entity's type, primary value, and typed fields and emit canonical JSON plus optional Transform<Entity>XML and GraphML<mtg:MaltegoEntity>XML.entity_parse_xml- Parse Transform<Entity>/<MaltegoMessage>, GraphML<mtg:MaltegoEntity>/<node>, or.entity<MaltegoEntity>definition XML into normalized JSON.entity_create_definition- Build a custom.entityXML definition and optionally write it safely withinMALTEGO_WORKSPACE_DIR.
Local & Remote (TDS/TRX) Transform Tools (7)
transform_run_local- Execute a local Maltego transform binary/script (shell: false) using Maltego's CLI field escaping protocol and parse its XML response or exception message (supports optionaloutput_mtgxmerge).transform_list_local- Discover local, cached remote, custom transforms, transform sets, and server entries without reading secrets or activation files.transform_discover_tds- Query TDS v2 XML (_TRANSFORMS,_CONFIG,_PERFORMANCE) or TRX v3 JSON (/transforms,/assets/*) discovery endpoints.transform_run_tds- Execute a remote transform via TDS v2 XML or TRX v3 JSON (external hosts gated byMALTEGO_ALLOW_EXTERNAL_TRANSFORMS=true; supports optionaloutput_mtgxmerge).transform_build_request- Build a TDS v2<MaltegoTransformRequestMessage>XML or TRX v3 JSON request payload offline.transform_parse_response- Parse a TDS v2 XML or TRX v3 JSON transform response into normalized entities, UI messages, buttons, and exceptions.transform_create_local_template- Generate an executable Python 3 or Node.js local transform script plus a matching.transformXML descriptor.
Built-in OSINT Transform Tools (5)
All 5 OSINT tools support optional output_mtgx to write or merge discovered entities and links directly into a .mtgx archive.
osint_domain_to_dns- Resolve A, AAAA, MX, NS, TXT, and CNAME records plus SPF/DMARC policies into normalized Maltego entities, links, GraphML, and Transform XML.osint_ip_analyze- Classify IPv4/IPv6 addresses (RFC1918, loopback, link-local, CGNAT, multicast, ULA, public) with optional PTR reverse DNS and RDAP/WHOIS enrichment.osint_website_and_tls- Fetch an HTTP(S) page and inspect its TLS certificate, extracting status, title, tech hints, links, hosts, emails, and TLS SANs/Issuer/Subject.osint_extract_entities- Extract deduplicated EmailAddress, Domain, IPv4Address, URL, Hash, and PhoneNumber entities from raw text or a workspace file.osint_run_pipeline- Run a bounded, cycle-free multi-step OSINT pipeline chainingextract,dns,ip_analyze, andwebsite_tls.
Desktop, CLI, Machines & Automation IPC Tools (6)
maltego_environment_info- Inspect Maltego binary, clusters, Java 11 JVM info, non-secret userdir counts, and redactedmessages.logtail (strictly excludesMaltegoID.*andCertificates/).maltego_list_servers_and_machines- List.tasservers (credentials redacted),.seed/.hubfiles,TransformSets, and.machinescripts, or inspect a specific.machinescript.maltego_parse_machine- Parse and validate a.machineDSL script, extracting metadata, blocks, and transform invocations.maltego_create_machine- Validate, format, and optionally write a.machineDSL script safely withinMALTEGO_WORKSPACE_DIR.maltego_automation_push- Push a validated<graphml>payload over TCP to Maltego Desktop's--automationPort(AutomationServer) to merge into the active UI graph.maltego_cli_launch- Build and optionally execute a validated shell-free invocation of/usr/bin/maltego(defaults todry_run: true).
Security Notes
The built-in XML parser (
src/utils/xml.ts) rejects all<!DOCTYPE,<!ENTITY, and DTD declarations to prevent XXE and billion-laughs attacks, and enforces size, depth, and node limits.Archive utilities (
src/utils/zip.ts) reject zip-slip path traversal and bound uncompressed entry and archive sizes.Path inputs are validated through
assertSafePath, local process execution usesspawn(..., { shell: false }), and non-local network calls in OSINT and TDS/TRX tools are disabled unlessMALTEGO_ALLOW_EXTERNAL_TRANSFORMS=true.Sensitive Maltego identity/key files (
MaltegoID.activation,MaltegoID.keypair,Certificates/, and.tascredentials) are excluded or redacted.
Available Tools
31 toolsentity_buildB
Validate an entity's type, primary value, and typed fields against Maltego v4.13.0 rules and emit canonical JSON plus optional Transform XML and GraphML mtg:MaltegoEntity XML.
Inputs: type (required), value (required), id, notes, +12 more.
entity_create_definitionB
Build a custom Maltego .entity XML definition and optionally write it safely within the configured workspace directory.
Inputs: id (required), displayName (required), primaryProperty (required), fields, +12 more.
entity_get_schemaA
Return the full property schema, inheritance chain, primary value key, and canonical JSON/XML examples for a Maltego entity type.
Inputs: type (required), customDir, includeInherited.
entity_list_typesB
List built-in Maltego v4.13.0 entity types and optionally scan a custom directory or local Maltego Entities directory for plain-XML .entity files (skipping binary/encoded files with warnings). Supports filtering by category/search and pagination.
Inputs: limit, offset, search, category, +2 more.
entity_parse_xmlA
Parse Transform (or ), GraphML mtg:MaltegoEntity (or ), or .entity definition XML into normalized JSON.
Inputs: xml (required), kind, customDir.
maltego_automation_pushA
Push a validated UTF-8 GraphML (...) payload over TCP to a running Maltego Desktop AutomationServer (--automationPort), closing write side (EOF) to trigger PasteRequestHandler.
Inputs: port (required), graphml (required), host, timeout_ms, +1 more.
maltego_cli_launchB
Build and optionally execute a validated shell-free argv invocation of Maltego CLI (/usr/bin/maltego) supporting --nosplash, --nogui, --open, --import, --machine, --automationPort, --userdir, --cachedir, --serverHttpAllowed, and --help. Defaults to dry_run=true.
Inputs: help, nogui, dry_run, machine, +10 more.
maltego_create_machineA
Validate, format, and optionally write a Maltego .machine DSL script from structured fields or raw DSL source, enforcing balanced braces, valid transform IDs, and assertSafePath.
Inputs: id, paths, write, author, +8 more.
maltego_environment_infoA
Inspect Maltego v4.13.0 installation binary, JVM info, non-secret userdir summary (TransformRepositories, TransformSets, Servers, Machines, Seeds), and optional var/log/messages.log tail. Strictly excludes MaltegoID/Certificates/credentials.
Inputs: log_tail_lines, include_jvm_version.
maltego_list_servers_and_machinesA
List .tas servers (credentials redacted), .seed/.hub files, TransformSets, and .machine scripts from Maltego userdir, or read/inspect a specific .machine script safely.
Inputs: kind, limit, machine_name.
maltego_parse_machineB
Parse and validate a Maltego .machine DSL script (from inline source or a safe .machine file path), extracting machine id, displayName, execution blocks, and transform invocations.
Inputs: source, file_path.
mtgx_add_entitiesB
Add one or more entities to an existing .mtgx archive with auto-generated IDs and automatic grid layout when position is omitted.
Inputs: path (required), entities (required), deduplicate.
mtgx_add_linksA
Add directed links between existing entities in a .mtgx archive (validates that sourceId and targetId exist).
Inputs: path (required), links (required).
mtgx_createA
Create a new Maltego v4.13.0 .mtgx archive atomically from entities and directed links.
Inputs: path (required), links, entities, metadata, +1 more.
mtgx_export_graphmlA
Export a .mtgx archive as a standalone GraphML XML string or JSON, optionally writing atomically to an output .graphml or .json file.
Inputs: path (required), format, pretty, output_path.
mtgx_inspectA
Inspect a Maltego .mtgx archive: returns metadata, entity/link type counts, and paginated entities and links. Cleanly detects and explains .mtgl (Pandora/Lucene) files.
Inputs: path (required), limit, offset, include_properties.
mtgx_query_graphA
Query entities and induced links in a .mtgx archive by entity type, value substring, property match, bookmark, or k-hop BFS neighborhood from an entity_id.
Inputs: path (required), hops, type, limit, +7 more.
mtgx_remove_entitiesA
Remove one or more entities by ID from a .mtgx archive and cascade-delete all incident links.
Inputs: path (required), entity_ids (required).
mtgx_update_entityC
Update an entity's value, properties, notes, bookmark, position, or weight in a .mtgx archive.
Inputs: path (required), entity_id (required), notes, value, +5 more.
osint_domain_to_dnsA
Resolve DNS records (A, AAAA, MX, NS, TXT, CNAME) for a domain via node:dns/promises, parse SPF/DMARC policies, and return normalized Maltego entities, links, GraphML, and MaltegoTransformResponseMessage XML.
Inputs: domain (required), nameserver, output_mtgx, record_types.
osint_extract_entitiesB
Extract deduplicated Maltego entities (EmailAddress, Domain, IPv4Address, URL, Hash, PhoneNumber) from input text or a safe local file path within workspaceDir, linking back to a root Document/Phrase.
Inputs: text, file_path, output_mtgx, source_type, +2 more.
osint_ip_analyzeB
Validate and classify an IPv4/IPv6 address (RFC1918, loopback, link-local, CGNAT, multicast, public), optionally perform reverse DNS PTR and RDAP/WHOIS enrichment, and emit Maltego graph/XML outputs.
Inputs: ip (required), rdap_url, nameserver, output_mtgx, +2 more.
osint_run_pipelineB
Run a bounded, cycle-free multi-step OSINT transform pipeline chaining extraction, DNS, IP analysis, and HTTP/TLS inspection, returning { graph, graphml, transform_xml, trace }.
Inputs: seed_type (required), seed_value (required), steps, rdap_url, +7 more.
osint_website_and_tlsA
Fetch an HTTP(S) page and inspect its TLS certificate via node:tls, extracting status, headers, title, tech hints, links, hosts, emails, and TLS SANs/Issuer/Subject into Maltego entities and GraphML/Transform XML. Non-local targets require allowExternalTransforms=true.
Inputs: url (required), timeout_ms, output_mtgx, max_body_bytes, +2 more.
transform_build_requestA
Build a Maltego TDS v2 XML (<MaltegoTransformRequestMessage>) or TRX v3 JSON (TransformRunRequest) transform request payload without making network calls.
Inputs: entity, limits, protocol, parameters, +3 more.
transform_create_local_templateB
Generate a ready-to-run local Maltego transform script (Python 3 or Node.js) with executable permissions plus a matching .transform XML descriptor file.
Inputs: name (required), language (required), author, overwrite, +5 more.
transform_discover_tdsB
Discover transforms, config/performance (TDS v2 XML) or transforms/machines/sets/entities (TRX v3 JSON) from a TDS/TRX server URL. Always permits localhost/127.0.0.1/::1; external hosts require MALTEGO_ALLOW_EXTERNAL_TRANSFORMS=true.
Inputs: url (required), api_key, command, protocol, +4 more.
transform_list_localB
Discover local and installed Maltego transforms, transform sets, and server definitions from Maltego v4.13.0 config directories (TransformRepositories/, TransformSets/, Servers/) plus an optional custom workspace directory, without reading secret keys or activation files.
Inputs: limit, filter, custom_dir, include_sets, +3 more.
transform_parse_responseB
Parse a Maltego TDS v2 / local XML (<MaltegoTransformResponseMessage> or <MaltegoTransformExceptionMessage>) or TRX v3 JSON response string into structured entities, UI messages, buttons, and exceptions.
Inputs: payload (required), protocol.
transform_run_localA
Execute a local Maltego transform binary/script directly (shell: false) using the Maltego v4.13.0 CLI protocol ([...params, entityValue, escapedAdditionalFields]) and parse its XML response or exception message.
Inputs: command (required), entity_value (required), parse_xml, parameters, +6 more.
transform_run_tdsA
Execute a remote transform via TDS v2 XML (POST ?Command=_RUN&TransformToRun=...) or TRX v3 JSON (POST <base>/transforms/<id>/run). Always permits localhost/127.0.0.1/::1; external hosts require MALTEGO_ALLOW_EXTERNAL_TRANSFORMS=true.
Inputs: url (required), transform_name (required), oem, entity, +8 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 31 tools
Tools are grouped by domain and mostly target distinct operations across .mtgx archives, entity schemas, transforms, machines, and OSINT. A few clusters are close, such as entity_build vs. entity_create_definition and mtgx_inspect vs. mtgx_query_graph, but their descriptions make the boundaries workable.
Names consistently use snake_case with semantic prefixes for domain grouping (mtgx_, entity_, transform_, osint_, maltego_). Most names follow prefix_action_object patterns, though a few like osint_domain_to_dns and maltego_automation_push are less verb-first.
Thirty-one tools is heavy for a single MCP server, but the breadth of the Maltego integration means the tools are split across several coherent subdomains. The count is on the high side and could overwhelm selection, but most tools do appear to earn their place.
The surface covers graph archive creation/inspection/editing, entity schema/build/parse, local and TDS transform workflows, machine scripting, automation push, and OSINT transforms. Minor gaps remain, such as standalone link removal/update and archive deletion lifecycle operations.
Maintenance
Related MCP Connectors
Enrich, search, assess, and manage threat intelligence through 80+ typed MCP tools.
DNS, WHOIS, IP geolocation and SSL checks as agent tools.
Offline methodology engine for authorized penetration testing, CTF, and security research.
Agent utilities: RDAP domain lookup, unshorten URLs, HTTPS checks, QR codes, calendar invites
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables 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.1341 npm13MIT
- AlicenseAqualityDmaintenanceTurns an LLM into a Maltego CE investigation copilot, enabling AI-assisted OSINT investigations by building, analyzing, and exporting Maltego graph files.52MIT
- AlicenseNot gradedqualityCmaintenanceEnables LLMs to perform OSINT link-analysis by exposing transforms (DNS, WHOIS, Shodan, etc.) as MCP tools for autonomous investigation and graph enrichment.MIT
- FlicenseNot gradedqualityBmaintenanceEnables agents to work with an embedded graph database over MCP by exposing tools for entity storage, declarative rule creation, similarity search, association explanations, role-filtered queries, and historical edge inspection. It supports building and querying self-maintaining graphs locally with explainable derived relationships.5-