NetPulse

NetPulse

An MCP server that exposes live network monitoring data as Resources and diagnostic capabilities as Tools, letting AI assistants query network health conversationally.

Category
访问服务器

README

NetPulse 🌐

Python 3.11+ License: MIT Tests MCP

An MCP server that exposes live network monitoring data as Resources and diagnostic capabilities as Tools, letting AI assistants query network health conversationally.

NetPulse bridges the gap between traditional network monitoring and AI-powered operations. It implements the Model Context Protocol (MCP) to give AI assistants like Claude real-time access to network telemetry — device status, interface metrics, latency measurements, bandwidth utilization, and active alerts — all through a clean, structured API.


Architecture

graph TB
    subgraph "AI Layer"
        Claude["Claude Desktop / MCP Client"]
    end

    subgraph "NetPulse MCP Server"
        Server["server.py<br/>FastMCP"]
        Resources["Resources<br/>6 data endpoints"]
        Tools["Tools<br/>6 diagnostic actions"]
        Prompts["Prompts<br/>3 workflow templates"]
        Sim["Network Simulator<br/>7 virtual devices"]
        Metrics["Prometheus Exporter<br/>/metrics"]
    end

    subgraph "Observability Stack"
        Prom["Prometheus"]
        Graf["Grafana"]
    end

    Claude <-->|MCP Protocol| Server
    Server --> Resources
    Server --> Tools
    Server --> Prompts
    Resources --> Sim
    Tools --> Sim
    Sim --> Metrics
    Metrics --> Prom
    Prom --> Graf

    style Claude fill:#6B48FF,color:#fff
    style Server fill:#0EA5E9,color:#fff
    style Sim fill:#10B981,color:#fff
    style Graf fill:#F59E0B,color:#fff

Data Flow

  1. Network Simulator generates realistic, time-varying metrics for 7 virtual devices
  2. MCP Resources expose read-only telemetry data (device status, interfaces, latency, bandwidth, topology, alerts)
  3. MCP Tools provide executable diagnostics (ping, traceroute, interface check, config viewer, baseline comparison, interface restart)
  4. MCP Prompts offer guided workflows (health briefing, troubleshooting, capacity planning)
  5. Prometheus + Grafana provide visual dashboards alongside the AI interface

Quick Start

1. Clone the repository

git clone https://github.com/yourusername/netpulse.git
cd netpulse

2. Launch the full stack

docker compose up -d

This starts:

  • NetPulse MCP Server on port 8080 (SSE transport)
  • Prometheus on port 9091
  • Grafana on port 3000 (login: admin / netpulse)

3. Connect Claude Desktop

Add to your Claude Desktop MCP configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "netpulse": {
      "command": "python",
      "args": ["-m", "netpulse.server"],
      "cwd": "/path/to/netpulse"
    }
  }
}

Or for SSE transport:

{
  "mcpServers": {
    "netpulse": {
      "url": "http://localhost:8080/sse"
    }
  }
}

Now ask Claude: "Give me a network health summary" — and watch it query real telemetry!


MCP Interface Reference

Resources (Read-Only Data)

URI Description
netpulse://devices/status Status of all 7 monitored devices with CPU, memory, temperature
netpulse://interfaces/{device} Interface metrics for a specific device
netpulse://latency/report Latency matrix between all connected endpoints
netpulse://bandwidth/top-talkers Top 10 bandwidth consumers
netpulse://topology/map Network topology as nodes + edges with health status
netpulse://alerts/active Currently firing alerts with severity

Tools (Executable Actions)

Tool Description Key Parameters
ping_device Ping a device and get RTT stats target, count
run_traceroute Trace network path to destination target, max_hops
check_interface Detailed interface diagnostics device, interface
get_device_config View device running configuration device, section
compare_baseline Compare current vs historical baseline device, metric, window
restart_interface Bounce an interface (requires confirmation) device, interface, confirm

Prompts (Workflow Templates)

Prompt Description Arguments
network_health_summary NOC morning briefing workflow None
troubleshoot_connectivity Guided connectivity diagnosis source, destination
capacity_planning Bandwidth analysis and projections None

Configuration

Environment Variables

Variable Default Description
NETPULSE_HOST 0.0.0.0 Server bind address
NETPULSE_PORT 8080 MCP server port
NETPULSE_TRANSPORT stdio Transport mode (stdio or sse)
NETPULSE_LOG_LEVEL INFO Logging level
NETPULSE_POLL_INTERVAL 30 Metric polling interval (seconds)

Device Inventory

Edit src/netpulse/config/devices.yaml to customize the simulated network topology. The default includes 7 devices across 2 data centers and a branch office.

Thresholds

Edit src/netpulse/config/thresholds.yaml to adjust alerting thresholds for CPU, memory, latency, packet loss, bandwidth, and temperature.


Fault Injection (Demo)

Inject faults to demonstrate AI-driven incident detection:

# Take down the WAN link
python -m netpulse.simulators.fault_injector --scenario link_down

# Spike CPU on the core router
python -m netpulse.simulators.fault_injector --scenario cpu_spike

# Simulate interface flapping
python -m netpulse.simulators.fault_injector --scenario interface_flap

# Take down a device
python -m netpulse.simulators.fault_injector --scenario device_down

# Saturate bandwidth
python -m netpulse.simulators.fault_injector --scenario bandwidth_saturation

Then ask Claude: "Are there any network issues right now?"


Development

Local Setup

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows

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

# Run the server locally (stdio mode)
python -m netpulse.server

Running Tests

pytest --cov=netpulse --cov-report=term-missing

Code Quality

# Linting
ruff check src/ tests/

# Type checking
mypy src/netpulse/

Simulated Network Topology

          ┌─────────────┐          ┌─────────────┐
          │ core-rtr-01  │◄────────►│ core-rtr-02  │
          │  10.0.0.1    │ 10Gbps  │  10.0.0.2    │
          │  Data Ctr A  │backbone │  Data Ctr B  │
          └──┬──────┬────┘          └──────┬───────┘
             │      │                      │
        10G  │      │ 100M            10G  │
             │      │                      │
     ┌───────┴──┐   │              ┌───────┴──┐
     │dist-sw-01│   │              │dist-sw-02│
     │ 10.0.1.1 │   │              │ 10.0.1.2 │
     └─────┬────┘   │              └──────────┘
           │        │
      1G   │        │
           │        │
     ┌─────┴────┐   │         ┌───────────┐
     │edge-fw-01│   └────────►│ wan-rtr-01 │
     │ 10.0.2.1 │     WAN    │  10.0.4.1  │
     └──────────┘             └──────┬─────┘
                                     │ 1G
                              ┌──────┴──────┐
                              │access-sw-01 │
                              │  10.0.3.1   │
                              │ Branch Off 1│
                              └─────────────┘

Author

Hind Boukhairat — IoT dev specializing in network monitoring and AIOps, transitioning into AI Integration Engineering. Holder of two MCP certifications from Anthropic/Skilljar (Introduction + Advanced Topics).

NetPulse is part of a portfolio showcasing the intersection of telecom/network operations and AI orchestration.


License

MIT — see LICENSE for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选