Skip to content
Conduit

mcp server

YANA

RAG-powered troubleshooting assistant for multi-vendor networks. When something fails, YANA investigates - it queries live devices, searches protocol specs, follows diagnostic decision trees, and tell

pdudotdev/YANAcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 23, 2026

YANA • Yet Another Network Agent

Version License Last Commit

PlatformsCisco IOS Cisco IOS-XE Arista EOS Juniper JunOS Aruba AOS Vyatta VyOS MikroTik RouterOS FRR
TransportSSH Scrapli
IntegrationsMCP ChromaDB JUnit XML

Overview

RAG-powered network QA investigation tool for multi-vendor networks.

Run your tests with any framework. When something fails, YANA investigates - it queries live devices, searches protocol specs, follows diagnostic decision trees, and tells you why it failed and what to fix.

Recommended models:

  • Opus 4.6+ (1M)

Documentation:

What's new:

Tech Stack

TechnologyRole
PythonCore language
FastMCPMCP server exposing 8 tools
ClaudeReasoning, context, investigation
LangChainRAG pipeline (chunking, embedding, retrieval)
ChromaDBVector database for knowledge base
ScrapliMulti-vendor SSH transport
JUnit XMLTest results format

Scope

ProtocolWhat's Checked
OSPFAdjacencies, area and area types, config, LSDB
RoutingTable, route maps, prefix lists, PBR, ACLs, ECMP
InterfacesUp/down state, expected operational status

Test Network Topology

Network diagram:

Lab environment:

  • 16 devices defined in TOPOLOGY.yml
  • 5 x Cisco IOS, 3 x Cisco IOS-XE, 4 x Arista cEOS, 2 x MikroTik CHR, 1 x Juniper JunOS, 1 x Aruba AOS-CX
  • See lab_configs for my test network's configuration

Installation

Prerequisites: Python 3.11+

Step 1 - Install and ingest:

sudo apt install git make python3.12-venv -y
cd ~ && git clone https://github.com/pdudotdev/YANA
cd YANA && make setup

Step 2 - Configure credentials:

cp .env.example .env
# Edit .env with your device credentials

Step 3 - Authenticate with Claude:

claude auth login

Step 4 - Register the MCP server:

claude mcp add yana -s user -- /home/<user>/YANA/yana/bin/python /home/<user>/YANA/server/MCPServer.py

MCP Tools

ToolDescription
get_statusReport active data sources (inventory, intent, KB)
list_devicesList inventory devices, optionally filtered by CLI style
get_ospfQuery OSPF state (neighbors, LSDB, process config) on a live device
get_interfacesQuery interface up/down status on a live device
get_routingQuery routing table, route maps, prefix lists, PBR, and ACLs on a live device
query_intentRetrieve network design intent from local JSON
tracerouteTrace the forwarding path from a device to a destination IP
search_knowledge_baseSearch network knowledge base (RFCs, vendor guides) with protocol/vendor/topic filters

Customization

YANA is designed to work with your own test topology. Bring your own:

WhatWhereFormat
Device inventorydata/NETWORK.jsonJSON dict: device name -> host, platform, cli_style
Design intentdata/INTENT.jsonJSON: router roles, OSPF areas, links, neighbors
Protocol docsdocs/*.mdProtocol data (re-ingest with make ingest)
Test resultsresults/*.xmlJUnit XML from any test runner
Credentials.envROUTER_USERNAME and ROUTER_PASSWORD

QA Workflow

  1. Run your tests with any framework (pytest, pyATS, Ansible, etc.)
  2. Place JUnit XML results in results/
  3. Investigate failures with the /qa skill:
claude
> /qa

The /qa skill loads the latest JUnit XML, lists all failures, and investigates each one using live device queries, network intent, and RFC context.

Knowledge Base

Protocol documentation lives in docs/ as Markdown files. Each file is tagged with vendor, topic, and protocol metadata during ingestion.

To update after editing docs:

make ingest

RAG optimizations in place:

  • protocol metadata field - filters search by protocol (ospf, bgp, eigrp), eliminating cross-protocol noise
  • Contextual chunk headers - source and protocol prepended to each chunk for better embedding quality
  • Compound filtering - combine vendor, topic, and protocol filters in a single query

See OPTIMIZATIONS.md for the full optimization roadmap.

Project Structure

YANA/
├── server/
│   └── MCPServer.py              # FastMCP server (8 tools)
├── tools/                        # MCP tool implementations
│   ├── ospf.py                   # get_ospf
│   ├── operational.py            # get_interfaces, traceroute
│   ├── routing.py                # get_routing
│   ├── intent.py                 # query_intent
│   ├── status.py                 # get_status
│   ├── inventory_tool.py         # list_devices
│   └── rag.py                    # search_knowledge_base
├── core/                         # Infrastructure
│   ├── inventory.py              # Device dict (from data/NETWORK.json)
│   └── settings.py               # Credentials + SSH config
├── data/                         # Data files
│   ├── NETWORK.json              # Device inventory
│   ├── INTENT.json               # Network design intent
│   └── chroma/                   # ChromaDB vector store (generated)
├── transport/                    # SSH execution (Scrapli)
│   ├── __init__.py               # Command dispatcher + semaphore
│   └── ssh.py                    # Multi-vendor SSH executor
├── platforms/                    # Vendor CLI command mapping
│   ├── platform_map.py           # OSPF, routing, interface + traceroute commands (6 vendors)
│   └── definitions/              # Custom Scrapli definitions
├── input_models/
│   └── models.py                 # Pydantic validation (OspfQuery, KBQuery, etc.)
├── docs/                         # Knowledge base (RFCs + vendor guides)
├── results/                      # QA test results (JUnit XML)
├── skills/
│   ├── ospf/                     # OSPF diagnostic decision tree
│   └── routing/                  # Routing diagnostic decision tree
├── testing/
│   ├── automated/                # Unit + integration tests
│   ├── live/                     # Live lab tests
│   └── run_tests.sh              # Test runner (--live for lab tests)
├── metadata/
│   ├── guardrails/               # Security controls documentation
│   ├── scalability/              # RAG optimization roadmap
│   ├── topology/                 # Test network diagram
│   └── workflow/                 # RAG pipeline walkthrough
├── ingest.py                     # RAG ingestion pipeline
├── Makefile                      # Setup automation (make setup)
├── CLAUDE.md                     # Investigation workflow + tool reference
├── TOPOLOGY.yml                  # Containerlab topology definition
├── .env.example                  # Credential template
├── CHANGELOG.md                  # Version history
├── LICENSE
├── requirements.txt
└── README.md

Planned Upgrades

  • EIGRP and BGP support (tools, skills, knowledge base docs)

Disclaimer

You are responsible for defining your own network inventory and design intent, building your test environment, and meeting the necessary prerequisites (Python 3.11+, Claude CLI/API, network device access).

License

Licensed under GNUv3.0.

Hi

Wanna say hello? Send me a DM at LinkedIn

↑↓ navigate openesc close