Skip to main content
Glama

network_services

List configured network services on macOS systems using networksetup command to view current network configurations and settings.

Instructions

List configured network services as reported by networksetup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the MCP tool 'network_services' with FastMCP @app.tool decorator, providing name and description.
    @app.tool( name="network_services", description="List configured network services as reported by `networksetup`.", )
  • MCP tool handler for 'network_services', converts output of tools.available_network_services() to list.
    def network_services(_: Context | None = None) -> list[str]: return list(tools.available_network_services())
  • Helper function that executes the shell command 'networksetup -listallnetworkservices' to list all network services.
    def network_services() -> str: """Return all configured network services via ``networksetup``.""" return _run_command(["networksetup", "-listallnetworkservices"])
  • Helper function that parses 'network_services()' output to yield clean list of available network service names.
    def available_network_services() -> Iterable[str]: """Helper that returns the list of network services, skipping blank lines.""" output = network_services() for line in output.splitlines(): line = line.strip() if not line or line.startswith("An asterisk"): continue sanitized = line.lstrip('* ').strip() if sanitized: yield sanitized

Latest Blog Posts

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/Zhuoli/mcp101'

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