Interfaces with linuxptp daemon to monitor logs, track synchronization status, and analyze PTP configuration on Linux systems
PTP MCP Server
A Model Context Protocol (MCP) server for monitoring and analyzing Precision Time Protocol (PTP) systems in OpenShift clusters.
🚀 Features
- PTP Configuration Analysis: Parse and validate PTP configurations from OpenShift
- Real-time Log Monitoring: Access linuxptp daemon logs with intelligent parsing
- Natural Language Queries: Ask questions about PTP status in plain English
- Health Monitoring: Comprehensive PTP system health checks
- Synchronization Analysis: Monitor sync status, offsets, and BMCA state
- Clock Hierarchy: Track grandmaster and clock hierarchy information
- ITU-T Compliance: Validate configurations against ITU-T G.8275.1 standards
📋 Prerequisites
- Python 3.8 or higher
- OpenShift CLI (
oc
) installed and configured - Access to OpenShift cluster with PTP operator installed
- PTP namespace (
openshift-ptp
) exists
🛠️ Installation
- Clone the repository:
- Install dependencies:
- Verify OpenShift access:
🧪 Quick Testing
Run the comprehensive test suite:
Expected output:
📚 API Endpoints
1. Configuration API
2. Logs API
3. Search API
4. Health API
5. Natural Language API
6. Grandmaster Status API
7. Sync Status API
8. Clock Hierarchy API
🚀 Usage Examples
Basic Health Check
Natural Language Query
Log Analysis
🔧 MCP Server
Start the MCP server for integration with MCP-compatible clients:
The server provides the following MCP tools:
get_ptp_config
- Get PTP configurationget_ptp_logs
- Get linuxptp daemon logssearch_logs
- Search logs for patternsget_grandmaster_status
- Get grandmaster infoanalyze_sync_status
- Analyze sync statusget_clock_hierarchy
- Get clock hierarchycheck_ptp_health
- Comprehensive health checkquery_ptp
- Natural language interface
📊 Performance
- Average Response Time: 0.78s
- Fastest API: Configuration API (0.22s)
- Concurrent Operations: 4/4 successful in 2.45s
- Success Rate: 100% (8/8 endpoints)
🏗️ Architecture
🔍 PTP Concepts Supported
- BMCA (Best Master Clock Algorithm): Clock selection and hierarchy
- Clock Types: OC (Ordinary Clock), BC (Boundary Clock), TC (Transparent Clock)
- ITU-T G.8275.1: Profile compliance and validation
- Synchronization: Offset tracking, frequency adjustment, sync status
- Grandmaster: Primary time source identification and status
- Clock Class: Quality and traceability indicators
- Domain Numbers: PTP domain configuration (24-43 for ITU-T)
🧪 Testing
Run All Tests
Performance Testing
Individual Component Testing
📖 Documentation
- Testing Guide - Comprehensive testing instructions
- Agent Integration Guide - Integration examples for agents
- Testing Steps - Step-by-step testing process
- Testing Results - Complete test results
🤝 Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- OpenShift PTP Operator team
- Linuxptp project
- Model Context Protocol (MCP) community
📞 Support
For issues and questions:
- Create an issue on GitHub
- Check the testing documentation
- Review the agent integration guide
Status: ✅ Production Ready
Last Updated: January 2025
Version: 1.0.0
This server cannot be installed
A Model Context Protocol server that enables monitoring and analysis of Precision Time Protocol systems in OpenShift clusters through configuration parsing, log monitoring, and natural language queries.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server providing comprehensive task management capabilities with support for project organization, task tracking, and automatic PRD parsing into actionable items.Last updated -16PythonMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server for time manipulation tasks, enabling AI models to get the current date/time and calculate duration between timestamps.Last updated -2TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that provides access to Observe API functionality, enabling LLMs to execute OPAL queries, manage datasets/monitors, and leverage vector search for documentation and troubleshooting runbooks.Last updated -1PythonGPL 3.0
- -securityFlicense-qualityA Model Context Protocol server that provides tools to get the current date and time in various formats, supporting different timezones and custom formatting options.Last updated -9JavaScript