Skip to main content

MCP server for network device queries (Palo Alto, Cisco IOS via SSH; F5 BIG-IP via iControl REST)

Project description

MCP Network JCD

MCP server for querying network devices via SSH. Supports Palo Alto firewalls and Cisco IOS devices.

Installation

pip install mcp-network-jcd

Or from source:

python3.12 -m venv .venv
source .venv/bin/activate
pip install -e .

Configuration

Set environment variables for credentials:

# Palo Alto
export PALOALTO_USERNAME="readonly_user"
export PALOALTO_PASSWORD="your_password"

# Cisco IOS
export CISCO_USERNAME="readonly_user"
export CISCO_PASSWORD="your_password"
export CISCO_ENABLE_PASSWORD="enable_secret"  # Optional

Claude Desktop

Add to ~/.config/claude/claude_desktop_config.json:

{
  "mcpServers": {
    "mcp-network-jcd": {
      "command": "python",
      "args": ["-m", "mcp_network_jcd.server"],
      "env": {
        "PALOALTO_USERNAME": "readonly_user",
        "PALOALTO_PASSWORD": "your_password",
        "CISCO_USERNAME": "cisco_user",
        "CISCO_PASSWORD": "cisco_password",
        "CISCO_ENABLE_PASSWORD": "enable_secret"
      }
    }
  }
}

Tools

paloalto_query

Query Palo Alto firewall via SSH.

Input: host*, commands* (1-10), port (22), timeout (30s)

Output: {success, device, results[], total_duration_ms, timestamp}

Usage Tips

Use filtered commands to avoid large outputs:

# Good
show routing route | match 10.14
test security-policy-match from ZONE1 to ZONE2 source IP destination IP protocol 6 destination-port 443
show interface logical
show system info

# Avoid (output too large)
show running security-policy
show session all
show routing route  # without filter

cisco_ios_query

Query Cisco IOS devices via SSH.

Input: host*, commands* (1-10), port (22), timeout (30s)

Output: {success, device, results[], total_duration_ms, timestamp}

Usage Tips

Use filtered commands to avoid large outputs:

# Good
show version
show ip interface brief
show ip route | include 10.0
show running-config | section interface
show interfaces status

# Avoid (output too large)
show running-config  # full config
show ip route  # without filter on large routing tables
show tech-support

Enable Mode

If CISCO_ENABLE_PASSWORD is set, the tool automatically enters privileged EXEC mode before running commands.

Error Codes

Both tools return structured error responses:

Code Description
CONFIG_ERROR Missing credentials in environment
AUTH_FAILED Invalid username/password or enable password
CONNECTION_TIMEOUT Device unreachable
CONNECTION_REFUSED SSH connection rejected
UNKNOWN_ERROR Unexpected error

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check .

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_network_jcd-0.3.2.tar.gz (91.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_network_jcd-0.3.2-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file mcp_network_jcd-0.3.2.tar.gz.

File metadata

  • Download URL: mcp_network_jcd-0.3.2.tar.gz
  • Upload date:
  • Size: 91.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for mcp_network_jcd-0.3.2.tar.gz
Algorithm Hash digest
SHA256 32a65fe5f0e05f97dc6ebfc9d9a6f7c9d7144af52cd0e9df6bfbbde518deaa04
MD5 946f780eadcaa02d4c11f55aa6832de9
BLAKE2b-256 3749052d835ed84cad0d8d4c761a461837dc76fe85d6cda470eb4d48ca82a441

See more details on using hashes here.

File details

Details for the file mcp_network_jcd-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_network_jcd-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4eaa58f8e4eb50d84aa6725d8683b769890a93ea60930f5daa80d36622ed2098
MD5 de7cedba624993eb016e052be6ada87e
BLAKE2b-256 542ded990d8c5631ecf19008a6b39b25bfe3646483e08d4ea903b40ada40236c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page