Labsco
feevlic logo

vHAL MCP Server

β˜… 1

from feevlic

Search Android Vehicle Hardware Abstraction Layer (vHAL) documentation and source code from a local repository clone.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeAdvanced setup

vHal MCP Server

MCP server for Android Vehicle Hardware Abstraction Layer (vHAL) documentation and source code analysis. This server provides intelligent tools for exploring vHAL properties, understanding their relationships, and implementing automotive climate control systems.

Overview

The vHAL MCP Server helps Android Automotive developers by providing:

  • Property Analysis: Discover vHAL properties and their relationships
  • Source Code Lookup: Find Android source code implementations
  • Implementation Guidance: Get step-by-step implementation recommendations
  • Documentation Summarization: Access curated vHAL documentation insights

Demo

See the vHAL MCP Server in action:

https://github.com/user-attachments/assets/6fcdc5fb-6cbb-4c69-9528-fa3bdee4acb1

Example: Analyzing HVAC properties and implementation guidance using Claude Desktop with the vHAL MCP Server

Features

Core Tools

summarize_vhal(question)

  • Summarizes vHAL implementation based on specific questions
  • Analyzes Android automotive documentation
  • Provides contextual answers for vHAL development

lookup_android_source_code(keyword, category)

  • Searches Android source code for vHAL properties
  • Returns property definitions with IDs and categories
  • Provides direct links to source code locations

discover_related_properties(property_or_category)

  • Analyzes property relationships and dependencies
  • Suggests implementation order for complex features
  • Groups properties by functional categories

analyze_vhal_implementation(property_name)

  • Shows detailed source code analysis for specific properties
  • Provides implementation examples and usage patterns
  • Includes dependency analysis and best practices

generate_vhal_implementation_code(...)

  • Generates complete VHAL property implementation code for AAOS
  • Creates all necessary files, configurations, tests, and documentation
  • Supports all VHAL data types, property groups, and access modes
  • Includes HAL definitions, Java APIs, tests, and build configurations

generate_vhal_pr_message(...)

  • Generates comprehensive pull request messages for VHAL implementations
  • Creates structured PR descriptions with technical details and testing requirements
  • Includes professional titles, change summaries, and review checklists
  • Ready-to-copy-paste format for GitHub/GitLab integration

validate_vhal_sources_and_enhance_summary(question, include_source_validation, max_sources_to_check)

  • Enhanced vHAL summary with complete source transparency and validation
  • Validates URL accessibility to detect broken or moved documentation links
  • Provides confidence scoring based on source reliability and accessibility
  • Shows clear citations with response times and last-modified dates
  • Suggests alternative sources for failed URLs
  • Distinguishes between cached vs. live data for transparency

validate_vhal_property_request(property_name, property_description, ...)

  • Validates vHAL property requests following Android best practices
  • Checks if property already exists in latest Android release (Android 16)
  • Recommends using existing Android properties when available
  • Generates VENDOR_ properties with proper naming convention when needed
  • Provides comprehensive analysis with similarity scoring and recommendations
  • Supports all VHAL data types, property groups, and configurations
  • Integrates with existing code generation tools for complete implementation

Use Cases

Climate Control System Development

Implement comprehensive HVAC systems with proper property relationships:

  • Temperature Control: Multi-zone heating and cooling
  • Fan Management: Speed and direction control with feedback
  • Air Conditioning: AC compressor and recirculation control
  • Auxiliary Heating: Seat warmers, steering wheel, and mirror heating
  • Safety Features: Defrost and defogging capabilities

Seat Control Systems

Develop advanced seat control features:

  • Memory Systems: Position storage and recall
  • Comfort Features: Heating, cooling, and massage functions
  • Movement Control: Multi-axis positioning and adjustment
  • Safety Integration: Occupancy detection and airbag coordination

Property Discovery and Analysis

Understand vHAL property ecosystems:

  • Dependency Mapping: Identify property relationships
  • Implementation Planning: Get step-by-step development guidance
  • Source Code Analysis: Access real Android implementations
  • Best Practices: Learn from existing property patterns

Development

Project Structure

vhal-mcp-server/
β”œβ”€β”€ src/vhal_mcp_server/
β”‚   β”œβ”€β”€ server.py              # Main MCP server implementation
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ analyzers.py       # Source code analysis tools
β”‚   β”‚   β”œβ”€β”€ database.py        # Property database and lookups
β”‚   β”‚   β”œβ”€β”€ property_validator.py # Property validation and VENDOR_ generation
β”‚   β”‚   β”œβ”€β”€ scrapers.py        # Documentation scraping utilities
β”‚   β”‚   └── source_validator.py # Source validation utilities
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ relationships.py   # Property relationship analysis
β”‚   β”‚   └── summarizers.py     # Documentation summarization
β”‚   β”œβ”€β”€ generators/
β”‚   β”‚   β”œβ”€β”€ code_generator.py  # VHAL code generation
β”‚   β”‚   └── pr_generator.py    # Pull request generation
β”‚   └── models.py             # Data models and structures
└── tests/                    # Test suite

Testing

Run the test suite:

python -m pytest test_vhal.py -v

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Implement your changes with tests
  4. Submit a pull request

Support

For questions, issues, or contributions: