Skip to main content
Glama
dbono711

Cisco NSO MCP Server

by dbono711
sample_client.py1.4 kB
#!/usr/bin/env python3 """ Sample client for Cisco NSO MCP Server This script demonstrates how to connect to the MCP server and list available tools. """ import asyncio import os from fastmcp import Client from fastmcp.client.transports import PythonStdioTransport async def main(): print("Connecting to MCP server...") # create server parameters server_params = PythonStdioTransport( python_cmd="python3", script_path="cisco_nso_mcp_server/server.py", args=[ "--nso-scheme=https", "--nso-address=127.0.0.1", "--nso-port=8888", "--nso-username=admin", "--nso-password=admin", "--no-nso-verify" ], env={**os.environ} ) # create and enter the context managers directly in this task # Use 'Client(server_params)' to use stdio transport # Use 'Client("http://127.0.0.1:8000/mcp")' to use HTTP transport async with Client(server_params) as client: # list available tools tools = await client.list_tools() print("\nAvailable tools:") for tool in tools: print(f"- {tool.name}: {tool.description}") # call a tool ned_response = await client.call_tool("get_device_ned_ids") print("\nNED IDs:") print(ned_response.content[0].text) if __name__ == "__main__": asyncio.run(main())

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dbono711/cisco-nso-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server