mcp-server-sros

mcp-server-sros

Provides tools to view operational state and change configuration of Nokia SR OS devices using pySROS SDK and FastMCP.

Category
Visit Server

README

SROS MCP Server (mcp-server-sros)

Overview

The mcp-server-sros project provides MCP tools for viewing the operational state and changing the configuration of Nokia SR OS devices. It uses Nokia's pySROS Python SDK and FastMCP.

This project was inspired by https://github.com/dpajin/mcp-server-junos.

Tools

  • get_fact: Retrieve basic information about the SR OS device, such as system name, software version, and platform.
  • show_command: Execute any MD-CLI command on the device and return the output.
  • apply_config: Modify configuration by setting a value at a specified YANG path.
  • list_devices: Retrieve the list of locally configured devices on the MCP server. The list include device name and IP address for remote access.

Installation

  1. Clone the repository:
     git clone <repository-url>
     cd mcp-server-sros
    
    

Running as a standalone application

  1. Install the required dependencies:

    pip install -r requirements.txt
    
  2. Rename example config file config.example.yml to config.yml

    cp config.example.yml config.yml
    

Running as a docker container

NOTE: If you want to include the configuration file in the docker image, please configure it in advance before building the container image. Otherwise, you can provide global access parameters into the container using Environment Variables (example in Usage section)

  1. Rename example config file config.example.yml to config.yml and configure it accordingly, before

    mv config.example.yml config.yml
    
  2. Build docker container image

    docker build -t mcp-server-sros .
    

Configuration

The expected configuration file is named config.yml and it should be located in the root directory.

If environment variables are set, they will override the configuration file values.

Global server configuration

Using config file:

global:
  server_host: 127.0.0.1
  server_port: 10008
  server_transport: "sse"  # or "streamable-http"

Using Environment variables:

MCP_SERVER_SROS_HOST="127.0.0.1"
MCP_SERVER_SROS_PORT=10008
MCP_SERVER_SROS_TRANSPORT="sse"
LOG_LEVEL="INFO"

Devices inventory

Using config file:

Configuration file key devices contains the dictionary of the device names with their respective access configuration.

  • device_name: Name of the device
    • host: IP address for access
    • user: Username for access
    • passwd: Password for access
    • port: TCP port for NETCONF/SSH access

Example:

access:
  default:
    user: "admin"
    passwd: "admin"
    port: 830

devices:
  sros1:
    host: 10.10.10.1
    user: "admin"
    passwd: "mysecurepassword"
    port: 830

  sros2:
    host: 10.10.10.2
    <<: *default

Using environment variables:

MCP_SERVER_SROS_ACCESS_DEFAULT_USER="admin"
MCP_SERVER_SROS_ACCESS_DEFAULT_PASSWD="admin"
MCP_SERVER_SROS_ACCESS_DEFAULT_PORT=830

Usage

To use the MCP server, run the command:

python mcp_server_sros.py

To use the docker, run the command:

docker run -it -p 10008:10008 \
  --name mcp-server-sros \
  -e MCP_SERVER_SROS_ACCESS_DEFAULT_USER="admin" \
  -e MCP_SERVER_SROS_ACCESS_DEFAULT_PASSWD="admin" \
  -e MCP_SERVER_SROS_ACCESS_DEFAULT_PORT=830 \
  -e MCP_SERVER_SROS_HOST="0.0.0.0" \
  -e MCP_SERVER_SROS_PORT=10008 \
  -e MCP_SERVER_SROS_TRANSPORT="sse" \
  mcp-server-sros:latest

  • The MCP server exposes HTTP SSE interface on configurable port (default 10008) and IPs
  • The URL for connecting to MCP SSE server locally would be: http://127.0.0.1:10008/sse

You can test tools using curl:

curl -X POST http://localhost:10008/set_config \
  -H "Content-Type: application/json" \
  -d '{"device_name": "sros1", "path": "/nokia-conf:system/name", "value": "SROS-MCP"}'

Tests

Tested with Github Copilot and VS Code as MCP client using HTTP SSE.

License

The project is licensed under the MIT License.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured