Skip to main content
Glama

portgraph

ci npm JSR Rust license

One line: npx portgraph (or bunx portgraph): live local port topology (Docker + Ollama/LM Studio/vLLM) as a terminal TUI and stdio MCP server.

Install

Bun / npm:

bunx portgraph
npx portgraph

# or install in your project / globally
bun add -d portgraph
npm i -D portgraph

JSR:

bunx jsr add @kanchingyg/portgraph
npx jsr add @kanchingyg/portgraph

Cargo (Rust native binary):

cargo install --git https://github.com/kanchingyg/portgraph

The scan engine and MCP stdio server are written in Rust (src/lib.rs, src/main.rs, src/mcp.rs). TypeScript under src/*.ts is included for npx / bunx / JSR usage and MCP bridge helpers when no native binary is present.

Related MCP server: wharfy

CLI

npx portgraph
bunx portgraph
npx portgraph who :3000
npx portgraph kill :3000 --allow-write
npx portgraph --mcp
npx portgraph --mcp --allow-write
npx portgraph --mcp --dry-run   # blocks mutating tools only

MCP tools

Tool

Purpose

get_local_topology

Active listening ports, PIDs, Docker mappings, and local LLM signature tags

who_owns_port

Owning process and command line for a specific listening port

kill_port_owner

Terminate port owner (confirm: true; requires --allow-write, blocked under --dry-run)

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    MCP server for managing local dev ports on macOS. It enables AI agents to inspect listening ports, identify owning processes and parent chains, kill processes safely, wait for ports, and report LAN exposure.
    3 npm
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to deterministically discover which localhost ports and env URLs are actually running, resolving declared configs, OS listeners, and service connections into a machine-readable .portmap.json with actionable findings.
    1 npm
    MIT
  • F
    license
    C
    quality
    A
    maintenance
    Enables local TCP/UDP port and process inspection via MCP tools, including querying connections, checking port usage, listing processes, and terminating processes or process trees.
    30
    -