minhducand2
MCP Serverminhducand2public

project network

一个基于AI的网络配置和管理工具,支持多种AI模式和设备连接。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Python
Language
-
License

About This Server

一个基于AI的网络配置和管理工具,支持多种AI模式和设备连接。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

AI Network Engineer Agent (Upgraded)

Cách chạy

pip install -r requirements.txt
python run_agent.py

Yêu cầu

  • Thiết bị Cisco (GNS3, thật, Packet Tracer)
  • Đã cấu hình IP và có thể SSH từ máy bạn

Tính năng

  • AI hiểu đề bài tiếng Việt
  • Sinh kế hoạch hành động
  • Cấu hình OSPF, NAT, VLAN thật bằng Netmiko
  • Log từng bước thực thi

AI Network Agent - Phiên bản nâng cấp

Tính năng:

✅ AI reasoning: Gemini, Ollama local, fallback rule
✅ Kết nối nhiều thiết bị (Netmiko)
✅ Tự sửa lỗi nếu ping/neighbor fail
✅ Giao diện CLI gọn nhẹ
✅ Log từng bước thực hiện

Cách chạy:

pip install -r requirements.txt
python run_agent.py --mode ollama

Chọn --mode:

  • ollama: Dùng AI local Mistral
  • gemini: Dùng Google Gemini (nhập API key vào .env)
  • rule: Không AI, chỉ rule đơn giản test

B1. Tạo môi trường ảo

python -m venv venv venv\Scripts\activate

B2. Cài thư viện

pip install netmiko

B3. Chạy chương trình

python run_agent.py Bạn sẽ thấy giao diện chọn số xuất hiện: 🔥 Chọn chế độ hoạt động:

  1. AI Local (Ollama)
  2. Google Gemini
  3. Rule Matching (không dùng AI)

Nhập số:

🐳 Docker hỗ trợ đầy đủ: Python 3.10+

pyATS, Netmiko, Unicon

Langchain, Gemini SDK, Requests

Ollama CLI (tùy chọn cài nếu dùng local)

Build Docker Image

docker build -t ai-network-automator .

Chạy interactive

docker run -it --env-file .env ai-network-automator

🚀 TỔNG QUAN NÂNG CẤP (trên nền MCP_Network_automator gốc)

🧠 Tích hợp AI đa chế độ Cho phép chọn giữa 3 chế độ AI khi chạy: ① AI Local (Ollama Mistral) ② AI Cloud (Gemini API) ③ Rule Matching (nội suy đơn giản không cần AI) 🧱 Giữ nguyên cấu trúc cũ Mọi thư mục và phân chia như agent_local, agent_cloud, core, logger, config được giữ nguyên nhưng có bổ sung logic mới 🖥️ Cải tiến CLI dễ dùng Giao diện dòng lệnh với menu chọn số 1 / 2 / 3 giúp chọn chế độ AI dễ dàng ⚙️ Xử lý lệnh mạng thực Trong core/executor.py, lệnh OSPF, show ip ospf neighbor, ping, NAT... được gửi bằng Netmiko 📡 Kết nối nhiều thiết bị Cho phép gửi cấu hình qua nhiều thiết bị định nghĩa trong config/devices_config.py 🧪 Tự kiểm tra lỗi cấu hình Nếu OSPF neighbor chưa "FULL", sẽ tự động ping kiểm tra lại kết nối 📁 Tự ghi log cấu hình Kết quả được in ra màn hình và có thể lưu log (logger/print_log.py) 🧩 Tùy chọn AI Local Có thể chạy mà không cần mạng nếu dùng --mode ollama (khi cài Mistral qua Ollama) 🔐 Tùy chọn AI Gemini API Nếu dùng Google Gemini thì chỉ cần đặt key trong .env 🐳 Chuẩn bị Dockerfile & cấu trúc build Đã hỗ trợ project chạy được trong Docker (bản nâng cao sẽ cập nhật thêm pyATS sau) 📦 requirements.txt & khởi tạo môi trường Có đầy đủ hướng dẫn tạo venv, requirements.txt, khởi chạy đúng cách

AI Network Engineer Agent (Final Build)

Hướng dẫn chạy

  1. Cài đặt môi trường:
python -m venv venv
source venv/bin/activate  # hoặc .\venv\Scripts\activate trên Windows
pip install -r requirements.txt
  1. Chạy Agent:
python run_agent.py
  1. Chọn chế độ:
  • AI Local (Ollama)
  • Google Gemini
  • Rule (không dùng AI)

Quick Start

1

Clone the repository

git clone https://github.com/minhducand2/project-network
2

Install dependencies

cd project-network
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerminhducand2
Repoproject-network
LanguagePython
License-
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation