Nokia SR OS gNMI MCP Server
MCP server for managing Nokia SR OS devices via gNMI (gRPC) from Claude Desktop.
README
Nokia SR OS gNMI MCP Server
MCP server for managing Nokia SR OS devices via gNMI (gRPC) from Claude Desktop.
Features
- gNMI Get — retrieve configuration and operational state with YANG paths
- gNMI Set — update, replace, or delete configuration
- MD-CLI commands — via Nokia gNMI CLI extension
- gNMI Capabilities — discover supported models and encodings
- Runtime credentials — no passwords in config files
- Multi-device — manage multiple SR OS devices simultaneously
- JSON output — clean json_ietf encoding (easier to read than XML)
Installation
cd nokia-gnmi-mcp
# Option A: uv (recommended)
uv sync
# Option B: pip
pip install -e .
Claude Desktop Configuration
Edit %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"nokia-gnmi": {
"command": "uv",
"args": [
"--directory",
"C:\\Users\\YourUser\\nokia-gnmi-mcp",
"run",
"nokia-gnmi-mcp"
]
}
}
}
Usage
1. Connect to a device
"Connect to my SR OS router at 192.168.1.1 via gNMI, username admin, password Nokia123, call it pe1"
2. Get configuration
"Show me the router interfaces config on pe1"
Claude uses path: /configure/router[router-name=Base]/interface
3. Get operational state
"What's the BGP neighbor state on pe1?"
Claude uses path: /state/router[router-name=Base]/bgp/neighbor
4. Update configuration
"Create a loopback lo5 with IP 10.10.10.5/32 on pe1"
Claude uses gNMI Set update.
5. Delete configuration
"Remove interface test from pe1"
Claude uses gNMI Set delete.
Tools Reference
| Tool | gNMI Op | Description |
|---|---|---|
sros_connect |
— | Connect to device (host, port, credentials, TLS options) |
sros_disconnect |
— | Close gNMI session |
sros_get_config |
Get (CONFIG) | Retrieve configuration by YANG path |
sros_get_state |
Get (STATE) | Retrieve operational state by YANG path |
sros_set_update |
Set (update) | Merge configuration changes |
sros_set_replace |
Set (replace) | Replace configuration subtree |
sros_set_delete |
Set (delete) | Delete configuration elements |
sros_cli_command |
CLI ext | MD-CLI show commands via gNMI |
sros_capabilities |
Capabilities | List supported models and encodings |
sros_list_sessions |
— | List active sessions |
Nokia YANG Path Reference
Configuration paths (/configure/...)
/configure/router[router-name=Base]/interface
/configure/router[router-name=Base]/bgp
/configure/router[router-name=Base]/isis[isis-instance=0]
/configure/port[port-id=1/1/c2/1]
/configure/card[slot-number=1]
/configure/service/vprn[service-name=CUST-1]
/configure/service/vpls[service-name=L2-1]
/configure/system
State paths (/state/...)
/state/router[router-name=Base]/interface[interface-name=to-pe2]
/state/router[router-name=Base]/bgp/neighbor
/state/port[port-id=1/1/c2/1]
/state/card[slot-number=1]
/state/system/information
Differences from NETCONF MCP
| Feature | NETCONF MCP | gNMI MCP |
|---|---|---|
| Protocol | NETCONF/SSH | gRPC/HTTP2 |
| Port | 830 | 57400 |
| Encoding | XML | JSON (json_ietf) |
| Candidate datastore | Yes (commit/rollback) | No (direct apply) |
| Output readability | XML verbose | JSON clean |
| Streaming telemetry | No | Possible (future) |
Troubleshooting
Connection refused: Ensure gRPC is enabled on SR OS:
configure system grpc admin-state enable
configure system grpc allow-unsecure-connection
configure system grpc gnmi admin-state enable
configure system grpc gnmi auto-config-save true
TLS errors: Use skip_verify=true for lab or insecure=true for non-TLS connections.
Timeout: Increase timeout in sros_connect. Large state queries may need more time.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.