Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

No arguments

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

ghostlan spins up 1..N isolated Linux virtual PCs ("ghosts") on a named virtual LAN (netns + bridge + tc netem + headless Xvfb + isolated PipeWire).

Quick Guide (no tool call needed):

  1. Always run ghostlan_doctor first on a new host or when any tool fails—it checks capabilities (setcap), ip_forward, Xvfb/xauth/xdotool/import, openbox, and pipewire/pactl. If base tools are missing, tell the user which packages/setup step to run instead of retrying blindly.

  2. Storage mode: Before calling ghostlan_up on a new LAN when unspecified, ask the user if they want default (/tmp/ghostlan, fast tmpfs), private=true ($XDG_RUNTIME_DIR/ghostlan, 0700 per-user), or dir="" (disk-backed for multi-GB files).

  3. Paths & Env: Each ghost isolates HOME, TMPDIR, XDG_CONFIG_HOME (<home_dir>/config), and XDG_DATA_HOME (<home_dir>/data). Write app configs to xdg_config_home (from ghostlan_up/status), NOT <home_dir>/.config.

  4. GUI (--gui): Each ghost gets its own headless Xvfb (:99+) with xauth + auto-started openbox/fluxbox if installed. If wm_ready=false or a popup ignores keys, take ghostlan_gui_screenshot and click coordinates directly.

  5. Audio (audio_null=true): Isolated per-ghost PipeWire + null sinks (ghostlan_sink, ghostlan_mic), zero host mic/speaker bleed. No virtual /dev/video* webcam exists; use OBS color_source/xshm_input or ffmpeg testsrc.

  6. Logs & Waiting: Prefer ghostlan_wait_log and ghostlan_logs (supports filter + since_line) over exec sleep/grep.

  7. Quirks & Cleanup: Child processes run as $USER with PR_SET_NO_NEW_PRIVS (unprivileged ping works; tcpdump inside a ghost does not—use ghostlan_capture + ghostlan_capture_inspect on the host veth, or ghostlan_status counters). Always call ghostlan_down when finished (or ghostlan clean on CLI if a previous run crashed).

Full docs are also in MCP resource ghostlan://readme.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
ghostlan_audio_checkA

Sample ghostlan_sink.monitor via ffmpeg volumedetect to measure dB levels and detect silence

ghostlan_captureA

Capture live packets on a ghost's host-side veth into a .pcap file (requires CAP_NET_RAW)

ghostlan_capture_inspectA

Summarize a saved .pcap file (packet/byte/TCP/UDP/ICMP counts + decoded lines via tcpdump -r)

ghostlan_doctorA

Check host capabilities, kernel forwarding, and optional GUI/audio tools readiness

ghostlan_downA

Stop all processes and displays and tear down a virtual LAN

ghostlan_execC

Run a one-shot command inside a ghost and capture stdout, stderr, and exit_code

ghostlan_gui_clickC

Click at coordinates inside a ghost's virtual display

ghostlan_gui_keyB

Send a key or key combo (e.g. Return, ctrl+s, Escape) to a ghost's virtual display

ghostlan_gui_motionA

Compare two spaced frames on a ghost's virtual display to verify video motion vs frozen screen

ghostlan_gui_recordC

Record a short MP4 video clip (and audio if audio_null=true) of a ghost's virtual display

ghostlan_gui_screenshotA

Capture a PNG screenshot of a ghost's virtual display (or specific window) and return it as an image

ghostlan_gui_typeC

Type text into a ghost's virtual display

ghostlan_gui_wait_windowA

Wait until a visible window matching title appears in a ghost's virtual display

ghostlan_gui_windowsB

List visible X11 windows inside a ghost's virtual display

ghostlan_linkA

Simulate Ethernet cable plug/unplug (link up/down) on a ghost

ghostlan_logsA

Read stdout/stderr log lines from a background process in a ghost (supports tail, since_line, and regex/substring filter)

ghostlan_lsC

List all active virtual LANs and their ghosts

ghostlan_netem_clearB

Clear active netem impairments from a ghost

ghostlan_netem_setB

Apply live tc netem packet loss, delay, jitter, corruption, duplication, or bandwidth cap to a ghost

ghostlan_startC

Start a detached background process inside a ghost

ghostlan_statusB

Get live status, IPs, displays, netem rules, interface counters, and process states for a LAN

ghostlan_stopC

Stop a background process inside a ghost

ghostlan_upB

Create a named virtual LAN with 1..N isolated ghosts, optional --nat, --gui (Xvfb), and default netem

ghostlan_wait_logB

Poll a ghost's background process log until a line matches pattern or timeout expires

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription
ghostlan-readmeComplete ghostlan documentation, command reference, and FAQs

TDQS

B3.3/5.0

Scored across 24 tools

Disambiguation5/5

Each tool has a distinct resource and action: LAN lifecycle, process control, GUI input, GUI observation, audio, packet capture, and network impairment are cleanly separated. Adjacent tools like screenshot/record/motion and logs/wait_log are distinguishable by their descriptions and intended use.

Naming Consistency3/5

All tools use the ghostlan_ prefix and snake_case, which is readable, but the suffixes mix bare verbs, nouns, abbreviations, and compound action names. There is no uniform verb_noun convention across the set.

Tool Count3/5

24 tools is heavy for an MCP server, though the broad domain of virtual LANs, GUI automation, process control, and packet capture supports substantial surface area. Some niche tools could be consolidated, but most earn their place.

Completeness4/5

The set covers LAN lifecycle, process execution, GUI interaction, network impairment, capture inspection, audio checks, and diagnostics with few dead ends. Minor gaps exist around individual ghost management, file transfer, and richer GUI gestures.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues