Skip to main content
Glama

IT-MCP

by acampkin95
network.ts949 B
import { CommandRunner } from "../utils/commandRunner.js"; export class NetworkService { public constructor(private readonly runner: CommandRunner) {} public async listActiveConnections() { return this.runner.run("netstat -anv"); } public async listListeningSockets() { return this.runner.run("lsof -iTCP -sTCP:LISTEN -Pn"); } public async analyzeFirewall() { return this.runner.run( "/usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate", { requiresSudo: true }, ); } public async scanWirelessNetworks() { const command = "/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s"; return this.runner.run(command, { requiresSudo: true }); } public async sampleBandwidth(seconds = 10) { const duration = Math.max(1, seconds); return this.runner.run(`nettop -P -L 1 -x -J bytes_in,bytes_out -t wifi -n -l ${duration}`); } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/acampkin95/MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server