sonic-net-debugger
Provides tools for querying SONiC Redis databases (APPL_DB, ASIC_DB, STATE_DB, etc.) to inspect internal switch state, including listing keys and retrieving hash field values.
sonic-net-debugger
An MCP (Model Context Protocol) server for debugging and interacting with SONiC (Software for Open Networking in the Cloud) network devices (DUTs).
Features
CLI Command Execution: Execute SONiC utility commands (like
show pfc wd stats,show interfaces status, etc.) directly on the device via SSH.Redis Querying: Access the SONiC Redis databases (APPL_DB, ASIC_DB, STATE_DB, etc.) to inspect internal switch states.
Documentation Retrieval: Built-in access to the SONiC Command Reference, allowing AI to lookup exact syntaxes for complex commands. The server will automatically download the documentation from the official GitHub repository on its first run.
Dynamic Device Targeting & Smart Authentication:
Supports passing target IP, username, and password dynamically per request.
Auto-Fallback Credential Testing: If no credentials are provided during the request, the server will automatically cycle through a list of default lab passwords (loaded from
config.json) using a Cartesian product (matching every username with every password) until it successfully connects.Smart Credential Caching: Successfully authenticated IP, Username, and Password combinations are temporarily cached locally (
.ssh_cache.json). Subsequent commands to the same device will instantly use the cached credentials, bypassing the credential permutations to significantly speed up execution.
Related MCP server: debugpy-mcp
Requirements
Python 3.10+
fastmcpparamiko
Installation
pip install -r requirements.txtConfiguration
This MCP server communicates over standard input/output (stdio) and uses SSH to connect to the SONiC switch.
1. Environment Variables (Primary Device)
You can provide default environment variables. These will be attempted first before falling back to common default passwords.
SONIC_HOST: The default IP address or hostname of the switch (e.g.,10.110.199.18).SONIC_USER: Your specific SSH username.SONIC_PASS: Your specific SSH password.
2. Credential Permutations (config.json)
To avoid hardcoding lab passwords into the script, the tool will automatically generate a config.json file in its root directory upon first execution. You can populate this file with common usernames and passwords used in your network lab:
{
"usernames": [
"admin",
"root"
],
"passwords": [
"YourPassword",
"admin",
"password",
"123456",
"root"
]
}Note: config.json, .ssh_cache.json and downloaded .md files are added to .gitignore to prevent accidental credential leaks.
Example configuration for Claude Desktop or Cursor:
{
"mcpServers": {
"sonic-net-debugger": {
"command": "python",
"args": ["/path/to/sonic-net-debugger/sonic_net_debugger.py"],
"env": {
"SONIC_HOST": "10.110.199.18"
}
}
}
}Available Tools
sonic_exec_cmd(command, host, username, password): Execute a CLI command on the device via SSH.sonic_lookup_doc(keyword): Search the local SONiC command reference markdown file.sonic_query_redis(db_index, pattern, host, username, password): Query Redis keys usingredis-cli KEYS.sonic_get_redis_hash(db_index, key, host, username, password): Get all fields and values of a specific Redis HASH key.
(Note: host, username, and password are optional parameters. If omitted, the server handles connection and authentication automatically using environment variables, cache, and config.json.)
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for building and testing AI agents with multi-model experimentation and insights.
MCP server for Product Management
MCP server for Vonage API documentation, code snippets, tutorials, and troubleshooting.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceAn MCP server that enables programmatic management and monitoring of development servers through a unified interface and interactive TUI. It provides tools for process control, log streaming, and experimental browser automation via Playwright.1MIT
- FlicenseDqualityDmaintenanceAn MCP server that enables agents to attach debugpy to running Python processes inside Docker containers for enhanced debugging and inspection. It provides tools for container autodiscovery, process injection, and generating breakpoint plans based on logs and metadata.8
- AlicenseAqualityAmaintenanceA Model Context Protocol (MCP) server that provides tools for interacting with OpenROAD and ORFS (OpenROAD Flow Scripts).1016BSD 3-Clause
- FlicenseNot gradedqualityDmaintenanceMCP server for managing Nokia SR OS devices via gNMI (gRPC) from Claude Desktop.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/chrisma113/sonic-net-debugger'
If you have feedback or need assistance with the MCP directory API, please join our Discord server