Routing Director MCP Server
An MCP server that integrates with Juniper's Routing Director platform, providing intelligent access to network routing, assurance, optimization, and intelligence capabilities.
README
<!-- mcp-name: io.github.Juniper/routing-director-mcp-server -->
Routing Director MCP Server
An MCP (Model Context Protocol) server that integrates with Juniper's Routing Director platform, providing intelligent access to network routing, assurance, optimization, and intelligence capabilities.
Features
- Flexible Authentication: Supports both basic and token-based authentication
- Multiple Transport Options: HTTP and stdio transport protocols
- Device management and monitoring
- Configuration template deployment
- VPN service management
- Network topology visualization
- KPI monitoring and observability
- Customer and organization management
Prerequisites
- Python 3.10 or 3.11
- Juniper Routing Director instance
- Network connectivity to Routing Director API
- Valid Routing Director credentials (username/password or API token)
Installation
From Source
git clone https://github.com/Juniper/routing-director-mcp-server.git
cd routing-director-mcp-server
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
From MCP Registry
TBD
Configuration
Configuration File (config.json)
Create a config.json file with the following structure:
Basic Authentication:
{
"http_url": "https://your-routing-director-host/",
"org_id": "your-organization-id",
"auth": {
"type": "basic",
"username": "your-username@example.com",
"password": "your-password"
}
}
Token Authentication:
{
"http_url": "https://your-routing-director-host/",
"org_id": "your-organization-id",
"auth": {
"type": "token",
"token": "your-api-token"
}
}
Note: This authentication is between the MCP server and the Routing Director instance. The MCP server will handle authentication with Routing Director on behalf of clients connecting to it.
Configuration Parameters
- http_url (required): URL of your Routing Director instance
- org_id (required): Your organization ID in Routing Director
- auth (required): Authentication configuration
- type: Either
basicortoken - username: Routing Director username (for basic auth)
- password: Routing Director password (for basic auth)
- token: API token (for token auth)
- type: Either
- components (optional): Additional component configuration to filter tools and capabilities exposed by the MCP server. If the user wishes to filter the openapi spec only for certain components, then the
componentsfield can be used to provide a list of components to filter the spec.
Components can be one of the following:
ems- For alarms related info (searching, ack and unack of alarms reported on Routing Director)juniper-resiliency-interface- For device syslog info (retrieving syslog messages collected on Routing Director)device-kpi- For fetching exception events related to Juniper Resiliency Interface (JRI) collected on Routing Director(forwarding, routing and os)
Usage
Starting the Server
python RoutingDirectorMCP.py --config config.json
Command Line Options
python RoutingDirectorMCP.py --help
Available options:
-H, --host: Server host (default: 127.0.0.1)-p, --port: Server port (default: 30030)-t, --transport: Transport type:streamable-httporstdio(default: streamable-http)-c, --config: Path to configuration file (required)-v, --verbose: Enable verbose logging
Example: Start with Custom Configuration
python RoutingDirectorMCP.py \
--config config.json \
--host localhost \
--port 8000 \
--transport streamable-http \
--verbose
Authentication between the MCP Server and the MCP Host(Claude/Copilot etc)
Token Management
The server supports token-based authentication through a token manager. If a tokens file exists, authentication is automatically enabled for HTTP transports.
For stdio transport, authentication is bypassed as it's typically used in secure local environments.
Enable authentication between MCP server and MCP client.
You can use file-based token authentication for communication between an MCP client and MCP
server. To generate a token, execute the following command in your local system:
python utils/mcp/token_cli.py generate --client-id sv@juniper.net --description "Token for SV"
Where,
client-id - is an ID that you use for generating the authentication token.
The following is a sample of the generated output:
Generated new token:
ID: my-client
Token: apa_CA98sH_VwEBd79aHA6O9NxbhXQN_RqaK
Description: Production API
Save the generated token in a .tokens file. By default, the token is saved in the root directory of the GitHub MCP repository.
Logging
Enable detailed logging for debugging:
LOG_LEVEL=DEBUG python RoutingDirectorMCP.py --config config.json --verbose
Connecting to the MCP Server
Users can use any MCP Host (like Claude, Copilot, Chatgpt, etc.) to connect to the MCP server. When configuring the MCP Host, use the same transport type, host, and port as specified when starting the MCP server.
Configure Claude
To configure Claude:
- Open the Claude configuration file in a text editor.
• On a macOS machine, run the following command in the Terminal:~/Library/Application Support/Claude/claude_desktop_config.json• On a Windows machine, open command prompt and enter:%APPDATA%\Claude\claude_desktop_config.json - Add your MCP server configuration as shown below:
{
"mcpServers": {
"RoutingDirector": {
"command": "/Users/username/path-to-virtual-environment/.mcp_venv/bin/python",
"args": [
"/Users/username/path-to-mcp-python-script/RoutingDirectorMCP.py",
"-c",
"/Users/username/path-to-config-json/config.json",
"-t",
"stdio"
]
}
}
}
- Save the file.
- Restart Claude.
- Verify the connection of Claude with MCP server.
Claude is connected to the MCP server if the MCP server tools are listed under + > Connectors.
Configure Copilot : To configure Copilot:
- Open Virtual Studio (VS) code.
Alternatively, you can use any other Integrated Development Environment (IDE) that supports
Copilot and MCP server, - Open the MCP settings file using one of the following methods:
• On a macOS, run the following command in the Terminal: Open~/Library/Application\ Support/Code/User/mcp.jsonWhere, user is your username on the macOS machine.
• On a Windows machine, open command prompt and enter:C:/Users/YourUserName/AppData/Roaming/Code/User/mcp.jsonWhere, user is your username on the Windows machine. - Add the MCP server configuration to the settings file as shown below:
{
"mcpServers": {
"RoutingDirector": {
"command": "/Users/username/path-to-virtual-environment/.mcp_venv/bin/python",
"args": [
"/Users/username/path-to-mcp-python-script/RoutingDirectorMCP.py",
"-c", "/Users/username/path-to-config-json/config.json",
"-t", "stdio"
]
}
}
}
- Save the file.
- Close and reopen VS code for the MCP configuration changes to take effect.
- Verify that Copilot is connected with the MCP server.
Copilot is connected to the MCP server if you find messages indicating successful connection to the
MCP server in the Output panel of VS code.
Alternatively, you can view MCP server tools (API calls) listed in VS code Extensions.
To ensure that the MCP server has started correctly, view the MCP server logs. The logs are
generated based on the type of communication with the AI agent:
• Starting MCP server 'Juniper Routing Directory' with transport 'stdio' if stdio is used.
• INFO Starting MCP server 'Juniper Routing Directory' with transport 'http' on http://127.0.0.1:30030/mcp if
streamable-http is used.
For more details on configuring the MCP Servers in the MCP Host Apps , please refer VScode Copilot: https://code.visualstudio.com/docs/copilot/customization/mcp-servers Claude: https://code.claude.com/docs/en/mcp
Troubleshooting
Issue: "Config file path is required"
Solution: Ensure you provide the --config flag with a valid path to your configuration file.
Issue: "Mandatory key missing in MCP config file"
Solution: Verify that your config.json includes all required keys: http_url, org_id, and auth.
Issue: "Failed to authenticate"
Solution:
- Verify your Routing Director credentials
- Ensure the Routing Director instance is accessible at the configured http_url
- Check that your username/password or API token is correct
- Verify network connectivity to the Routing Director host
Issue: Connection Refused
Solution:
- Verify the server is running with
--hostand--portmatching your client configuration - Check firewall rules allow traffic on the configured port
Issue: "No tokens file found. Authentication DISABLED"
Solution: For HTTP transports requiring authentication, ensure token files are properly initialized. For development/testing, this is typically acceptable.
Version
Current version: v2.8.0
Acknowledgments
This MCP server integrates with Juniper Networks' Routing Director platform, providing enterprise-grade network intelligence and optimization capabilities.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。