Logo vun NetExec MCP

NetExec MCP

Communautéit
mpgn

NetExec MCP

Editeurmpgn
RepositoryNetExec-mcp
SproochPython
Forks
6
Stären
89
Disponibel Tools
0
Transporttypstdio
LizenzBSD-2-Clause
Linken
  • Tools mat KI-Workflows verbannen

    NetExec MCP stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    89 Stären an 6 Forks aus dem verlinkte Repository.

netexec-mcp

An MCP server that lets an AI agent drive NetExec (nxc) for authorized security testing only.

It is a pure subprocess wrapper: it shells out to the nxc CLI as an argv list (never shell=True, never importing NetExec as a library) and declares no nxc dependency. How nxc itself is installed (PATH / uv / pipx / docker) is entirely up to you.

With recon mode:

With full mode:

Status

v1 — all 10 nxc protocols, 135 tools (121 protocol tools + 9 discovery/meta-tools + 5 offline workspace-DB readers). SMB, LDAP, WinRM, MSSQL, SSH, RDP, WMI, FTP, NFS, and VNC are built out (native flags, credential dumping/gathering, command exec, file transfer, promoted high-value -M modules, and structured output). The first seven are validated end-to-end against a live AD lab; FTP/NFS/VNC are source-verified + unit-tested (no lab yet). A 3-level safety model gates everything; the long tail of nxc -M modules is reachable via meta-tools.

Built for small / local models

With 135 tools, listing every one to the model would spend ~46k tokens of context before any work starts enough to overflow a small-context (≤8B / 32k) model and to make every call on a large one needlessly expensive. So the default NXC_TOOL_MODE is dynamic: only a handful of meta-tools are exposed (nxc_catalog, nxc_find_tool, nxc_describe_tool, nxc_call, nxc_health), and the model discovers and dispatches the real tools on demand. This keeps the tool surface out of the context window required to run on small local models, and cheaper (same quality) on large ones. Set NXC_TOOL_MODE=static to opt out and list every tool. See the NXC_TOOL_MODE row under Configuration and the step-budget note beneath it.

Requirements

  • Python ≥ 3.10, uv or pipx
  • NetExec installed separately — it is not a pip dependency and is not on PyPI. See the official install guide. Any install works as long as nxc / netexec is reachable on PATH or via NXC_COMMAND; the server runs nxc --version on boot and refuses to start if it can't find it.

Quick start

Option A: uv (run from a source checkout)

bash
uv sync

# Point at your nxc install (example: a uv-managed source checkout)
export NXC_COMMAND="uv run --directory ~/NetExec netexec"
export NXC_SCOPE="10.0.0.0/24"          # required to target anything (fail-closed)

uv run netexec-mcp

MCP client config (command/args launch the server itself):

json
{
  "command": "uv",
  "args": ["run", "--directory", "/path/to/netexec-mcp", "netexec-mcp"]
}

Option B: install from PyPI (standalone netexec-mcp CLI)

bash
# Pick one installer — all put `netexec-mcp` on PATH:
pipx install netexec-mcp                 # pipx
uv tool install netexec-mcp              # uv
# or run without installing:
uvx netexec-mcp                          # uv, one-shot

export NXC_COMMAND="nxc"                 # or however your nxc install is invoked
export NXC_SCOPE="10.0.0.0/24"

netexec-mcp

MCP client config — netexec-mcp is on PATH, so no uv/--directory wrapper:

json
{
  "command": "netexec-mcp",
  "args": []
}

On boot the server runs <base> --version and refuses to start if it fails (unless mode suggest, which downgrades that to a warning). See .mcp.json.example for a ready-to-edit MCP client config (uv variant).

Operating modes (NXC_MODE)

Four escalating levels of how much the server is allowed to do:

ModeWhat runsUse when
suggestNothing executes. Tools return the resolved nxc command for a human (the auditor) to run. Scope still enforced; offensive commands can be previewed.You want the agent to plan commands you run yourself.
recon (default)Read-only enumeration; executes, credential-dumping and state-changing actions are refused.Day-to-day authorized recon.
lootRecon plus read-only credential-dumping (sam/lsa/ntds/gpp/roasting) — no state change on the target, but it harvests credential material.Authorized credential-harvesting.
fullEverything executes, including state-changing / privilege-escalation actions (exec, write, spray, coercion-with-listener, exploits).Authorized active testing.

NXC_MODE is the canonical control; it defaults to recon when unset.

Configuration (env vars)

VarPurposeDefault
NXC_COMMANDBase command (shlex-parsed). Falls back to nxc/netexec on PATH.autodetect
NXC_PROTOCOLSComma-separated protocols to enable (e.g. smb,ldap).all implemented
NXC_TOOL_MODETool-surface presentation — dynamic (default: expose only meta-tools; the ~100-tool surface is discovered via nxc_find_tool/nxc_catalog and run via nxc_call) or static (list every tool). Dynamic keeps the ~46k-token surface out of the context window — required for small-context models, ~8× cheaper (same quality) on large ones. Set static to opt out (best for a decisive model, or to avoid discovery round-trips on a big-context model).dynamic
NXC_SCOPEComma-separated target allowlist (IP/CIDR/range/hostname). Fail-closed: targets with no scope are rejected.(none)
NXC_MODEOperating level — suggest / recon / loot / full.recon
NXC_TIMEOUTPer-call timeout (seconds).300
NXC_MAX_TARGETSMax target tokens per call.256
NXC_AUDIT_LOGPath to an append-only JSONL audit log.(none)
NXC_WORKSPACEnxc workspace the workspace_* readers look in. Read-side only — it does not change where nxc writes (nxc takes its workspace from nxc.conf, which this does not touch). To isolate a run, set NXC_PATH, not this.(none — reads nxc.conf's workspace, else default)
NXC_PATHOverride nxc's home dir (mirrors nxc's own NXC_PATH). Inherited by the nxc subprocess, so it sets where nxc writes (nxc.conf, workspaces/*.db) and where the MCP reads — both sides agree on one home.~/.nxc

Per-run isolation (one lab per run). Give each run a unique NXC_PATH (e.g. NXC_PATH=/runs/lab-x) and that run gets its own nxc home: nxc writes its workspaces/ there and the workspace_* readers read from the same place, so reads and writes always coincide with zero shared state. Separate homes never collide, so runs may execute concurrently without racing on nxc.conf. Confirm the active home at any time via nxc_health (nxc_home + workspace fields). Tear a run down by deleting its directory. A fresh home is initialised by nxc on first use (it creates nxc.conf and the per-protocol DBs).

Dynamic mode needs a bigger client-side step budget. max_steps (how many tool calls the agent may make) is not an MCP setting — the server can't see or set it. It lives in your client's agent loop. In dynamic mode each action costs ~2 calls (nxc_find_tool → nxc_call), so a chain that needs 4 calls in full needs ~10 in dynamic. Set the budget high enough there, e.g. mcp-use:

python
MCPAgent(llm=ChatOllama(model="qwen3:14b"), client=client, max_steps=30)  # default is 5 — too low

Other clients (Claude Desktop, Cursor, Cline, …) have their own max-iterations setting. The MCP can only hint this via its startup instructions; it can't enforce it.

Resources

The server publishes cheatsheets as MCP resources so an agent can ground itself:

  • netexec://guide/operating-modes
  • netexec://guide/auth
  • netexec://guide/workflows (incl. the cross-protocol gMSA chain)
  • netexec://guide/workspace (cached recall vs. live — when to use which)
  • netexec://guide/safety
  • netexec://catalog/tools (live, auto-generated tool inventory)
  • netexec://workspace/credentials, /admins, /loggedin, /hosts (workspace DB data, same source as the workspace_* tools, filterless)

Safety & guardrails

Enforced at a single choke point before any command runs:

  • Scope allowlist (NXC_SCOPE) — every target checked; fail-closed.
  • Mode gating (NXC_MODE) — offensive actions refused outside full.
  • Target cap + per-call timeout.
  • Audit log — every command (executed / dry-run / rejected) appended as JSON.
  • No shell — nxc is invoked as an argv list; nothing is shell-interpreted.

Example: the gMSA credential chain

smb_lsa (full)            -> secrets[] incl. { type: "gmsa_id", gmsa_id, ntlm }
ldap_gmsa_convert_id      -> resolves the gmsa_id to an account name (gmsa-robin$)
<any tool>                -> replay with username="gmsa-robin$", ntlm_hash=<nt>

Development

bash
uv run pytest -q          # mocked-subprocess unit tests (no nxc/network needed)

Architecture and milestone history live in PLAN.md. Tools/flags are verified against the nxc source (nxc/protocols/<proto>/proto_args.py) — --help lists args the handlers reject.

nxc version

This MCP is a subprocess wrapper and pins no nxc dependency, but its tools/flags are verified against a specific nxc build:

nxc 1.5.1 "Yippie-Ki-Yay", commit 9ec65be0 (9ec65be0…, 2026-10-11, build 990)

Check your local build with nxc --version (it prints version - codename - commit - build). nxc moves fast and occasionally moves/removes flags, so when you bump nxc, re-verify the affected protocol's proto_args.py + handler and re-run the tests.

NetExec MCP MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal NetExec MCP verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

NetExec MCP als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu NetExec MCP an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "netexec-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu NetExec MCP. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu NetExec MCP.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat NetExec MCP?
NetExec MCP
Jo. Ech hunn et gelies.
Dat hunn ech mat NetExec MCP fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server NetExec MCP benotzt?

NetExec MCP ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech NetExec MCP MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir NetExec MCP mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat NetExec MCP MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann NetExec MCP verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech NetExec MCP MCP mat TypingMind?

NetExec MCP leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt NetExec MCP MCP an TypingMind zur Verfügung?

NetExec MCP stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir NetExec MCP MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann NetExec MCP eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇