Back to MCP directory
publicPublicdnsLocal runtime

netsensei

NetSensei是一个基于MCP协议的网络管理工具服务器,提供ping测试、路由追踪、Nmap扫描、数据包嗅探和SSH连接等功能,帮助网络管理员高效管理网络。

article

README

🚀 网络先知 — 网络管理的MCP服务器

网络先知 是一款基于Model Context Protocol (MCP) 的服务器,专为网络管理员打造。它集成了多种网络实用工具和功能,像ping测试、路由跟踪、Nmap扫描、包嗅探以及SSH连接等,可通过MCP协议进行通信,高效处理各类网络相关命令,极大提升网络管理效率。

🚀 快速开始

您可以通过Claude Desktop或结合mcpo使用OpenWebUI来使用本服务。

✨ 主要特性

  • ping测试:能快速测试网络连通性,并提供详细输出。
  • 路由跟踪:可精准识别到达目标的网络路径。
  • Nmap扫描:支持执行自定义参数的网络扫描,助力发现设备和服务。
  • 包嗅探:借助tshark捕获和分析网络数据包,还能根据自定义标准(如DNS、HTTP、ICMP)进行过滤。
  • SSH连接:可通过ssh连接到设备,并执行基于设备平台的命令(例如Ubuntu服务器、Cisco、Aruba等)。
  • AI助手:借助人工智能自动化常规网络任务,提供更深入的洞察。

📦 安装指南

环境要求

  • Python 3.x
  • MCP Python SDK - https://github.com/modelcontextprotocol/python-sdk
  • uvicorn - 用于运行FastAPI服务器的ASGI服务器。
  • tshark(Wireshark的命令行工具):必须安装并能从系统PATH访问。
  • nmap - 用于网络扫描。
  • netmiko - 用于ssh连接和命令执行。
  • 支持的网络接口(例如,Wi-Fi、以太网),用于数据包嗅探。

安装步骤

  1. 克隆此仓库:
    git clone https://github.com/yourusername/netsensei.git
    cd netsensei
    
  2. 将其添加到您的Claude Desktop配置文件中。
    {
        "mcpServers": {
            "NetSensei": {
                "command": "uv",
                "args": [
                    "run",
                    "--with",
                    "mcp[cli]",
                    "mcp",
                    "run",
                    "C:\\path\\to\\cloned\\repo\\main.py"
                ]
            }
        }
    }
    
  3. 与OpenWebUI集成
    uvx mcpo --port 9003 -- mcp run main.py    
    

💻 使用示例

基础用法

指示Claude AI发现网络中的活跃主机。

▶️ 观看演示视频

alt text

🤝 贡献

欢迎贡献!您可以随意叉取仓库,创建问题或提交拉取请求。

📄 许可证

此项目根据MIT许可证授权 - 有关详细信息,请参阅LICENSE文件。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client