ONOS MCP Server

ONOS MCP Server

By davidlin2k GitHub

A Model Context Protocol (MCP) server implementation that provides network control and management capabilities through the ONOS SDN controller.

Overview

what is ONOS MCP Server?

The ONOS MCP Server is a Model Context Protocol (MCP) server implementation that provides network control and management capabilities through the ONOS SDN controller, enabling programmatic access to ONOS network management, OpenFlow device control, and comprehensive analytics via ONOS's REST API.

how to use ONOS MCP Server?

To use the ONOS MCP Server, configure it with the ONOS API base URL and authentication credentials, then run the server. You can interact with the server using various tools and prompts to manage network devices, flows, and applications.

key features of ONOS MCP Server?

  • Provides over 30 dynamic resources for network management.
  • Offers specialized prompts for diagnosing network issues, designing flows, and configuring intent-based networking.
  • Includes powerful tools for network and application management, such as flow addition and removal, application installation, and system health checks.

use cases of ONOS MCP Server?

  1. Educational environments for learning about SDN and network management.
  2. Prototyping network configurations and flows.
  3. Conducting research on software-defined networking (SDN) technologies.

FAQ from ONOS MCP Server?

  • What programming language is ONOS MCP Server written in?

The server is written in Python.

  • Is there a license for using ONOS MCP Server?

Yes, it is licensed under the MIT License, allowing free use, modification, and distribution.

  • What are the requirements to run ONOS MCP Server?

You need Python 3.7+, an accessible ONOS controller, and the httpx and mcp libraries.

Content

ONOS MCP Server

Overview

A Model Context Protocol (MCP) server implementation that provides network control and management capabilities through the ONOS SDN controller. This server enables AI assistants to access ONOS network management, OpenFlow device control, and comprehensive analytics through a structured API interface. The server is ideal for educational environments, network operations, SDN research, and AI-assisted network management.

Features

Network Resources

The server provides access to ONOS REST API endpoints, including:

  • Network devices, links, and hosts
  • Topology information
  • Flow rules and intents
  • Applications and services
  • Statistics and metrics
  • System and cluster health

Analytics Tools

  • Network Summary: Get a comprehensive overview of devices, links, hosts, and clusters with detailed device information
  • Network Analytics: Analyze performance metrics, traffic patterns, and utilization statistics
  • System Health: Monitor memory usage, cluster status, and component health
  • Application Management: Install, activate, deactivate, and uninstall ONOS applications
  • Flow Configuration: Create and manage flow rules and intents
  • Path Computation: Find optimal paths between network endpoints

Specialized Prompts

  • Network Diagnostics: Troubleshoot connectivity issues and service degradation
  • Intent-Based Configuration: Implement connectivity objectives and policies
  • Network Health Analysis: Generate comprehensive status reports
  • QoS Configuration: Set up traffic prioritization and service levels
  • Performance Optimization: Improve resource allocation and scalability

Requirements

  • Python 3.7+
  • uv for dependency management
  • Running ONOS controller
  • httpx library
  • mcp library

Configuration

Configure the server using environment variables:

  • ONOS_API_BASE: Base URL for ONOS API (default: http://localhost:8181/onos/v1)
  • ONOS_USERNAME: Username for ONOS API authentication (default: onos)
  • ONOS_PASSWORD: Password for ONOS API authentication (default: rocks)

Usage with Claude Desktop

{
  "mcpServers": {
    "onos": {
      "command": "uv",
      "args": [
        "--directory",
        "parent_of_servers_repo/servers/src/onos-mcp-server",
        "run",
        "server.py"
      ],
      "env": {
        "ONOS_API_BASE": "http://localhost:8181/onos/v1",
        "ONOS_USERNAME": "onos",
        "ONOS_PASSWORD": "rocks"
      }
    }
  }
}

Contributing

Contributions are welcome! Please feel free to submit pull requests, report bugs, or suggest new features.

No tools information available.
No content found.