Provides an MCP server that monitors and analyzes PTP systems in OpenShift, including configuration, logs, health, and natural language queries.
Configuration
View docs{
"mcpServers": {
"aneeshkp-ptp-mcp-server": {
"command": "python",
"args": [
"ptp_mcp_server.py"
]
}
}
}You deploy the PTP MCP Server to monitor and analyze Precision Time Protocol systems within OpenShift clusters. It provides configuration analysis, real-time log access, natural language queries, health checks, synchronization insights, clock hierarchy, and ITU-T G.8275.1 compliance validation to help you diagnose and optimize PTP deployments.
Start the MCP server to expose tools you can access from MCP clients. The server supports configuration checks, log retrieval, search capabilities, health analysis, natural language questions, grandmaster information, sync analysis, and clock hierarchy data. Connect your MCP client to the local Python process and use the provided tools to gather configuration details, review logs, run health checks, and perform on-demand queries about the PTP system.
Prerequisites you need before running the MCP server include Python 3.8 or higher, the OpenShift CLI installed and configured, access to an OpenShift cluster with the PTP operator, and the PTP namespace openshift-ptp.
# 1) Clone the server repository
git clone https://github.com/aneeshkp/ptp-mcp-server.git
cd ptp-mcp-server
# 2) Install dependencies
pip install -r requirements.txt
# 3) Verify OpenShift access
oc whoami
oc get namespace openshift-ptpRun the MCP server from the projectβs entry point to start accepting MCP client connections. Use the Python runner to launch the server process and keep it running to serve requests from MCP clients.
python ptp_mcp_server.pyRetrieve the current PTP configuration for the specified namespace, enabling you to validate settings and ensure consistency.
Fetch recent linuxptp daemon logs to monitor activity, events, and potential issues.
Search the PTP logs for patterns or events of interest to quickly locate synchronization problems or misconfigurations.
Run comprehensive health checks on the PTP system, including configuration validity and synchronization status.
Ask natural language questions about PTP status and receive human-readable answers.
Provide detailed information about the current grandmaster, including status and topology.
Analyze synchronization status, including offsets, frequency adjustments, and BMCA state.
Return the clock hierarchy and grandmaster relationships, including port-level details if requested.