This is a modernized FastAPI application that provides IxNetwork chassis inventory and metrics through a REST API with Model Context Protocol (MCP) integration.
- FastAPI-based REST API
- MCP integration for AI assistant compatibility
- Real-time chassis information retrieval
- Comprehensive API documentation
- Error handling and fallbacks
- Install dependencies:
pip install -r requirements.txt- Run the application:
python app.pyThe server will start at http://localhost:8000
Once running, you can access:
- REST API docs: http://localhost:8000/docs
- MCP endpoint: http://localhost:8000/mcp
Add the following to your Claude Desktop configuration file (claude_desktop_config.json):
{
"mcpServers": {
"ixnetwork-inventory": {
"command": "/path/to/mcp-proxy",
"args": ["http://localhost:8000/mcp"]
}
}
}Replace /path/to/mcp-proxy with the actual path to your mcp-proxy executable (find it using which mcp-proxy).
-
GET
/chassis/summary- Get chassis summary information
- Operation ID: mcp_get_chassis_summary
-
GET
/chassis/cards- Get chassis cards information
- Operation ID: mcp_get_chassis_cards
-
GET
/chassis/ports- Get chassis ports information
- Operation ID: mcp_get_chassis_ports
The API includes graceful error handling:
- Connection failures return "NA" values instead of errors
- All endpoints include proper error responses
- Timestamps are included in responses
- Credentials are passed per-request for security
- No credentials are stored in the application
- HTTPS is recommended for production deployment