Skip to main content
Glama
tplink-sg1016-mcp

tplink-sg1016-mcp

by daniel-k

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
TPLINK_HOSTNoSwitch IP address192.168.0.1
TPLINK_PORTNoWeb interface port80
TPLINK_USE_SSLNoUse HTTPSfalse
TPLINK_PASSWORDNoLogin password
TPLINK_USERNAMENoLogin usernameadmin
TPLINK_VERIFY_SSLNoVerify SSL certificatefalse

Instructions

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

MCP server for managing a TP-Link SG1016PE Easy Smart managed switch. All port numbers are 1-based (1-16). The switch has 16 Gigabit Ethernet ports, the first 8 of which support PoE+. Tools are grouped into: system info, port management, PoE, 802.1Q VLANs, QoS, security (IGMP/DHCP snooping, loop prevention), diagnostics, and LAG/mirroring.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
get_device_infoA

Get basic switch identity: model name, MAC, IP, firmware and hardware version.

get_ip_settingsA

Get the switch management IP config: DHCP/static mode, IP, subnet mask, gateway.

get_led_statusA

Check whether the switch's front-panel port LEDs are turned on or off.

set_device_nameB

Change the switch's system name (shown in the web UI and device info).

Args: name: New device name/description.

set_ip_settingsB

Change the switch management IP configuration.

WARNING: This may make the switch unreachable if misconfigured.

Args: dhcp: True for DHCP (auto), False for static IP. ip: Static IP address (only used when dhcp=False). netmask: Subnet mask (only used when dhcp=False). gateway: Default gateway (only used when dhcp=False).

set_ledB

Turn the switch's front-panel port LEDs on or off.

Args: on: True to turn LEDs on, False to turn them off.

reboot_switchA

Reboot the switch. Running configuration is saved to flash before rebooting.

The switch will be unreachable for approximately 30 seconds.

get_port_statesA

Get configuration and link status for all 16 switch ports.

Per port: enabled (admin state), speed_config (configured speed), speed_actual (negotiated link speed, LINK_DOWN if no link), flow_control_config/actual. Speed values: LINK_DOWN, AUTO, HALF_10M, FULL_10M, HALF_100M, FULL_100M, FULL_1000M.

get_port_statisticsB

Get per-port packet counters (TX/RX good and bad packets).

Counters are cumulative since last reboot and wrap at 2^32 (4 billion). Also includes each port's enabled state and link_status (negotiated speed).

set_port_stateA

Enable or disable a switch port, and optionally set its speed and flow control.

Args: port: Port number (1-16). enabled: True to enable the port, False to administratively shut it down. speed: Link speed. One of: AUTO, HALF_10M, FULL_10M, HALF_100M, FULL_100M, FULL_1000M. flow_control: True to enable 802.3x flow control (pause frames).

get_poe_port_statesA

Get PoE status for all PoE-capable ports (ports 1-8 on the SG1016PE).

Per port: enabled, priority (HIGH/MIDDLE/LOW), power_limit (AUTO or CLASS_1-4), power_watts (current draw), current_ma, voltage_v, pd_class (detected device class, NO_PD if nothing connected), power_status (OFF/TURNING_ON/ON/OVERLOAD/SHORT/etc).

get_poe_global_stateA

Get the switch-wide PoE power budget in watts: limit, consumption, remaining.

get_poe_recoveryA

Get PoE auto-recovery (ping watchdog) configuration.

When enabled, the switch periodically pings the IP of a PoE-powered device and automatically power-cycles the port if the device stops responding.

set_poe_global_limitA

Set the switch-wide PoE power budget limit in watts.

The switch enforces a maximum total power draw across all PoE ports.

Args: limit: Power budget in watts. Must be within the device's supported range.

set_poe_portA

Configure PoE on a specific port.

Args: port: Port number (1-8 on the SG1016PE). enabled: True to supply power, False to cut PoE power. priority: Power allocation priority when budget is constrained. HIGH, MIDDLE, or LOW. power_limit: Max power class. AUTO (negotiated), CLASS_1 (4W), CLASS_2 (7W), CLASS_3 (15.4W), CLASS_4 (30W), or a float 0.1-30.0 for custom wattage.

repower_poe_portA

Power-cycle a PoE port: briefly cuts and restores power without changing config.

Useful for remotely rebooting a PoE-powered device (AP, camera, etc).

Args: port: Port number (1-8 on the SG1016PE).

get_vlan_configA

Get the full 802.1Q VLAN configuration.

Returns: enabled (whether 802.1Q mode is active), max_vlans (device limit, typically 32), and a list of VLANs each with vid, name, tagged_ports, and untagged_ports. VLAN 1 ('Default') always exists with all ports as untagged members by default.

get_pvid_configA

Get the per-port PVID (Port VLAN ID / native VLAN) assignments.

Each port has a PVID that determines which VLAN incoming untagged frames are classified into. Defaults to VLAN 1 for all ports.

set_vlan_enabledA

Enable or disable 802.1Q VLAN mode on the switch.

WARNING: Disabling 802.1Q removes all VLAN separation. Only one VLAN mode (802.1Q, MTU, or port-based) can be active at a time.

Args: enabled: True to enable 802.1Q VLANs, False to disable.

create_vlanA

Create a new 802.1Q VLAN with optional initial port memberships.

Ports not listed become non-members. Use add_vlan_members / remove_vlan_members to modify port memberships on existing VLANs.

Args: vid: VLAN ID (2-4094). VLAN 1 already exists as the default. name: VLAN name (alphanumeric only, max 10 characters). tagged_ports: Ports that send/receive frames with an 802.1Q VLAN tag. untagged_ports: Ports that send frames without a VLAN tag (access ports).

add_vlan_membersA

Add ports to an existing 802.1Q VLAN.

Reads the current VLAN state and adds the specified ports without affecting other existing members. A port can be changed from tagged to untagged (or vice versa) by including it in the desired list.

Args: vid: VLAN ID of the existing VLAN to modify. tagged_ports: Ports to add as tagged members. untagged_ports: Ports to add as untagged (access) members.

remove_vlan_membersA

Remove ports from an existing 802.1Q VLAN.

Reads the current VLAN state and removes the specified ports (sets them to non-member) without affecting other existing members.

Args: vid: VLAN ID of the existing VLAN to modify. ports: Port numbers to remove from the VLAN.

delete_vlanA

Delete an 802.1Q VLAN. VLAN 1 (Default) cannot be deleted.

Args: vid: VLAN ID to delete (2-4094).

set_port_pvidA

Set a port's PVID (native VLAN for untagged ingress traffic).

All untagged frames arriving on this port will be assigned to this VLAN. The port must be an untagged or tagged member of the target VLAN.

Args: port: Port number (1-16). pvid: VLAN ID to assign as the port's native VLAN.

get_qos_configA

Get the QoS configuration: scheduling mode and per-port priority queues.

mode: PORT_BASED (priority set per port), DOT1P_BASED (from 802.1p VLAN tag), or DSCP_BASED (from IP header DSCP field). Per-port priority (PORT_BASED only): LOWEST, NORMAL, MEDIUM, HIGHEST.

get_bandwidth_limitsA

Get per-port ingress and egress bandwidth rate limits in kbps.

A value of 0 means no rate limit (unlimited).

get_storm_controlA

Get per-port storm control settings.

Storm control rate-limits broadcast, multicast, and/or unknown unicast traffic to prevent network flooding. Shows rate (kbps) and which traffic types are controlled per port.

set_qos_modeB

Set the global QoS scheduling mode.

Args: mode: PORT_BASED (manual per-port priority), DOT1P_BASED (from 802.1p tag), or DSCP_BASED (from IP header).

set_port_qos_priorityA

Set a port's QoS priority queue. Only effective when QoS mode is PORT_BASED.

Args: port: Port number (1-16). priority: LOWEST (queue 0), NORMAL (queue 1), MEDIUM (queue 2), or HIGHEST (queue 3).

set_bandwidth_limitB

Set per-port ingress and egress bandwidth rate limits.

Args: port: Port number (1-16). ingress_rate: Max incoming traffic rate in kbps. 0 for unlimited. egress_rate: Max outgoing traffic rate in kbps. 0 for unlimited.

set_storm_controlA

Configure storm control on a port to rate-limit flooding traffic.

Args: port: Port number (1-16). enabled: True to activate storm control on this port. rate: Maximum allowed rate in kbps for controlled traffic types. broadcast: Rate-limit broadcast traffic (e.g. ARP storms). multicast: Rate-limit multicast traffic. unknown_unicast: Rate-limit unknown unicast traffic (flooded frames).

get_igmp_snoopingB

Get IGMP snooping configuration and the current multicast group table.

IGMP snooping constrains multicast traffic to only the ports with interested receivers, instead of flooding it to all ports.

get_loop_preventionB

Check whether loop prevention is enabled.

Loop prevention detects and blocks Layer 2 loops caused by incorrect cabling or misconfiguration.

set_igmp_snoopingA

Enable or disable IGMP snooping.

Args: enabled: True to enable IGMP snooping. report_suppression: True to suppress duplicate IGMP membership reports (reduces multicast control traffic on the uplink).

set_loop_preventionB

Enable or disable loop prevention.

Args: enabled: True to enable loop detection and blocking.

run_cable_testA

Start cable diagnostics (TDR test) on specified ports and return results.

Tests cable quality and estimates length. Returns per-port results immediately: status (NOT_TESTED, NO_CABLE, NORMAL, OPEN, SHORT, OPEN_SHORT, CROSSTALK) and length_m (estimated cable length in meters).

Args: ports: Port numbers to test (1-16).

get_lag_configB

Get link aggregation (LAG / port trunking) configuration.

LAGs bond multiple physical ports into a single logical link for increased bandwidth and redundancy. Up to 8 groups supported.

get_port_mirror_configA

Get port mirroring configuration.

Port mirroring copies traffic from source ports to a destination (monitoring) port for packet capture or analysis. Shows which ports are mirrored for ingress (incoming) and/or egress (outgoing) traffic.

create_lagB

Create or modify a link aggregation group (LAG / port trunk).

Member ports are bonded into a single logical link. Ports in a LAG must have identical speed and duplex settings.

Args: group_id: LAG group ID (1-8). ports: Member port numbers to bond together.

delete_lagA

Delete a link aggregation group, releasing its member ports.

Args: group_id: LAG group ID to delete (1-8).

set_port_mirrorA

Configure port mirroring for traffic analysis.

Copies traffic from source ports to a destination port where a packet sniffer or analyzer can be connected.

Args: enabled: True to enable mirroring. destination_port: The monitoring port that receives copied traffic. ingress_ports: Source ports to mirror incoming traffic from. egress_ports: Source ports to mirror outgoing traffic from.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.6/5.0

Scored across 41 tools

Disambiguation4/5

Tools are organized by distinct sub-domain (ports, PoE, VLAN, QoS, LAG, mirroring, storm control), and descriptions make the boundaries clear, e.g. set_bandwidth_limit vs. set_storm_control vs. set_port_state. Minor potential confusion exists between get_port_states and get_port_statistics, and between create_vlan and add_vlan_members, but the descriptions resolve these.

Naming Consistency4/5

Predominantly consistent snake_case with verb_noun structure (get_*, set_*, create_*, delete_*, add_*, remove_*). A few deviations like repower_poe_port and create_lag (no _config suffix while its getter is get_lag_config) slightly break the pattern but remain readable and predictable.

Tool Count3/5

41 tools is heavy for a single 16-port switch and pushes beyond comfortable agent selection, though the device genuinely spans many feature areas (PoE, VLAN, QoS, LAG, mirroring, diagnostics). Each tool mostly earns its place as a natural get/set pair, but consolidation (e.g. combined config getters) would help.

Completeness4/5

Coverage is broad and largely lifecycle-complete: CRUD for VLANs, LAGs, PoE, QoS, mirroring, plus diagnostics (cable test) and system ops (reboot, IP config). Gaps exist for firmware upgrade, config backup/restore, factory reset, and the non-802.1Q VLAN modes referenced in descriptions but not exposed.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues