About Onos Mcp Server
An MCP server for the ONOS SDN controller, intended for AI agents that inspect and manage network infrastructure. It provides application, device, host, and flow operations, including adding flow rules.
Key features
- 01Inspect and manage ONOS applications
- 02Query network device details
- 03Discover hosts and address associations
- 04List and filter network flows
- 05Add network flow rules
Use cases
- 01Monitor ONOS devices and hosts
- 02Inspect flows on a specific device
- 03Activate or deactivate ONOS applications
- 04Add flow rules to a device
MCP support
The server exposes operations for ONOS applications, devices, hosts, and flows as tools for MCP clients.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEONOS MCP Server
ONOS MCP Server is a powerful bridge between the Model Context Protocol (MCP) and the Open Network Operating System (ONOS). It enables AI models to interact directly with your SDN (Software-Defined Networking) infrastructure, allowing for intelligent network management, monitoring, and automation.
Features
- Application Management: List, inspect, activate, and deactivate ONOS applications.
- Device Inventory: Detailed views of switches, routers, and other network entities.
- Host Discovery: Track end-nodes, their locations, and IP/MAC associations.
- Flow Control: Full visibility and control over network flows (list, filter by device, and add new flows).
- Seamless Integration: Built with Spring Boot and Spring AI MCP for robust, production-ready performance.
Prerequisites
- Java 21 or higher.
- Maven 3.9+ (or use the included
./mvnw). - A running instance of ONOS Controller (v2.x or higher recommended).
Configuration
The server connects to ONOS via its REST API. You can configure the connection details in src/main/resources/application.yaml or via environment variables.
onos:
controller:
host: ${ONOS_CONTROLLER_HOST:http://localhost:8181}
username: ${ONOS_CONTROLLER_USERNAME:onos}
password: ${ONOS_CONTROLLER_PASSWORD:rocks}
Environment Variables
| Variable | Description | Default |
|---|---|---|
ONOS_CONTROLLER_HOST | URL of the ONOS controller | http://localhost:8181 |
ONOS_CONTROLLER_USERNAME | ONOS user (requires REST access) | onos |
ONOS_CONTROLLER_PASSWORD | ONOS password | rocks |
Getting Started
1. Build the project
./mvnw clean install
2. Run the server
./mvnw spring-boot:run
Connecting to MCP Clients
To use this server with an MCP client (such as Claude Desktop or Antigravity), add the following configuration to your mcp_config.json (or equivalent configuration file):
{
"mcpServers": {
"onos-mcp-server": {
"command": "java",
"args": [
"-jar",
"/path/to/onos-mcp-server.jar"
],
"env": {
"ONOS_CONTROLLER_HOST": "http://localhost:8181",
"ONOS_CONTROLLER_USERNAME": "onos",
"ONOS_CONTROLLER_PASSWORD": "rocks"
}
}
}
}
Note
Make sure to build the project first with
./mvnw clean installto generate the JAR file in thetarget/directory.
Available MCP Tools
The server exposes several tools to the AI model:
Applications
list-applications: List all installed applications and their status.get-application: Get details about a specific application.activate-application: Activate a specific application by name.deactivate-application: Deactivate a specific application.
Devices
list-devices: Get a list of all devices (switches, routers).get-device: Get detailed info on a specific device.
Hosts
list-hosts: List all discovered end-node hosts.get-host: Get details on a specific host.
Flows
list-flows: List all network flows.list-device-flows: List flows for a specific device.add-flow: Push a new flow rule to a device.
Tech Stack
- Core: Java 21, Spring Boot 3.5.9
- AI/MCP: Spring AI Starter MCP Server
- REST Client: Spring Cloud OpenFeign
- Utilities: Lombok
Created with ❤️ by ortega-kb
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.