Search Android Vehicle Hardware Abstraction Layer (vHAL) documentation and source code from a local repository clone.
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.
The vHAL MCP Server helps Android Automotive developers by providing:
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
summarize_vhal(question)
lookup_android_source_code(keyword, category)
discover_related_properties(property_or_category)
analyze_vhal_implementation(property_name)
generate_vhal_implementation_code(...)
generate_vhal_pr_message(...)
validate_vhal_sources_and_enhance_summary(question, include_source_validation, max_sources_to_check)
validate_vhal_property_request(property_name, property_description, ...)
Clone the repository
Using HTTPS:
git clone https://github.com/feevlic/vhal-mcp-server.git
Using SSH:
git clone git@github.com:feevlic/vhal-mcp-server.git
Navigate to the project directory
cd vhal-mcp-server
Install dependencies
pip install -e .
Find your uv
installation path
which uv
Locate your Claude Desktop configuration file
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%/Claude/claude_desktop_config.json
Add the server configuration
Edit the configuration file and add the following (replace the paths with your actual paths):
{
"mcpServers": {
"vhal-mcp-server": {
"command": "/Users/[]/.local/bin/uv",
"args": ["run", "--directory", "/Users/[]/vhal-mcp-server", "python", "main.py"],
"env": {
"PYTHONPATH": "/Users/[]/vhal-mcp-server"
}
}
}
}
You can find an example in the config folder.
Important:
/path/to/your/uv
with the output from step 1 (e.g., /Users/yourusername/.local/bin/uv
)/path/to/vhal-mcp-server
with the actual path where you cloned the repositoryRestart Claude Desktop
After saving the configuration file, completely quit and restart Claude Desktop for the MCP server to be loaded.
Allow MCP server access
When you first ask a question that requires the vHAL tools, Claude will prompt you to allow the MCP server to use its tools. Click "Allow" to enable the vHAL analysis capabilities.
The server exposes MCP tools that can be used through compatible clients. Each tool accepts specific parameters and returns structured information about vHAL properties and implementations.
Start with these simple prompts to explore vHAL capabilities:
Basic Property Discovery
Show me all HVAC-related properties and their IDs
Simple Implementation Questions
How do I control the fan speed in Android Automotive?
Property Lookup
Find Android source code for seat heating properties
Basic Temperature Control
What properties do I need to set the cabin temperature?
Understanding Property Types
Explain the HVAC_POWER_ON property and how to use it
Once familiar with basic concepts, try these comprehensive prompts:
Complete System Implementation
I need to implement a climate control system. Can you:
1. Find all HVAC-related properties
2. Explain their relationships and dependencies
3. Show me the Android source code implementation
4. Provide a step-by-step implementation guide
Please give me a complete analysis for building this system.
Multi-Zone Climate Control
Analyze the implementation requirements for a dual-zone HVAC system. Include:
- Property relationships between driver and passenger zones
- Dependencies and implementation order
- Source code examples from Android
- Best practices for zone management
Seat Memory System
Design a comprehensive seat memory system that includes:
- Position storage and recall (8-way adjustment)
- Heating and cooling integration
- Memory profile management
- Safety considerations and dependencies
Show me the vHAL properties needed and implementation approach.
Safety-Critical Features
I'm implementing defrost and safety features. Analyze:
- Priority systems for defrost override
- Integration with HVAC main system
- Emergency defrost activation
- Window clearing effectiveness
Provide source code examples and safety considerations.
Performance Optimization
Optimize my HVAC implementation for energy efficiency:
- Auto mode algorithms
- Fan speed optimization
- AC compressor management
- Integration with vehicle power management
Include Android source examples and power consumption strategies.
Custom Property Development
I want to add a new custom HVAC feature for air quality monitoring. Help me:
- Understand the property definition process
- Find similar existing properties for reference
- Design the property specification
- Plan the HAL implementation approach
Use the generate_vhal_implementation_code
tool to create complete VHAL implementations:
Smart Dashboard Lighting System
Generate a complete VHAL implementation for a smart dashboard lighting system with the following specifications:
- Property Name: DASHBOARD_SMART_LIGHTING_MODE
- Property ID: 0x15400B01
- Type: INT32 (enumerated values)
- Group: LIGHTS
- Access: READ_WRITE
- Change Mode: ON_CHANGE
- Description: Smart dashboard lighting control with adaptive brightness and color temperature
- Enum Values: OFF=0, AUTO=1, DAY=2, NIGHT=3, CUSTOM=4
- Dependencies: NIGHT_MODE, CABIN_LIGHTS_STATE
Please use the generate_vhal_implementation_code tool.
Electric Vehicle Charging Management
I need to implement a comprehensive EV charging management system. Create a VHAL property with these requirements:
- Property Name: EV_CHARGING_PORT_STATUS
- Property ID: 0x15400C01
- Type: INT32 (enum)
- Group: POWER
- Access: READ (status monitoring only)
- Change Mode: ON_CHANGE
- Description: Electric vehicle charging port status and connection state
- Enum Values: DISCONNECTED=0, CONNECTED=1, CHARGING=2, ERROR=3, COMPLETE=4, SCHEDULED=5
- Dependencies: EV_BATTERY_LEVEL, EV_CHARGING_RATE
- Areas: GLOBAL
Generate the complete implementation using generate_vhal_implementation_code.
Advanced HVAC Zone Control
Implement an advanced HVAC zone control system for precise temperature management:
- Property Name: HVAC_ZONE_CLIMATE_PROFILE
- Property ID: 0x15400D01
- Type: FLOAT
- Group: HVAC
- Access: READ_WRITE
- Change Mode: CONTINUOUS
- Description: Advanced HVAC zone climate profile with precise temperature control
- Units: celsius
- Min Value: 16.0
- Max Value: 32.0
- Areas: ["SEAT_ROW_1_LEFT", "SEAT_ROW_1_RIGHT", "SEAT_ROW_2_LEFT", "SEAT_ROW_2_RIGHT"]
- Dependencies: HVAC_TEMPERATURE_SET, HVAC_FAN_SPEED
- Sample Rate: 0.5 Hz (update every 2 seconds)
Use generate_vhal_implementation_code to create the full implementation.
Biometric Seat Adjustment
Create a biometric-based seat adjustment system:
- Property Name: SEAT_BIOMETRIC_PROFILE
- Property ID: 0x15400E01
- Type: STRING
- Group: SEAT
- Access: READ_WRITE
- Change Mode: ON_CHANGE
- Description: Biometric-based automatic seat adjustment with user recognition
- Areas: ["SEAT_ROW_1_LEFT", "SEAT_ROW_1_RIGHT"]
- Dependencies: SEAT_HEIGHT_POS, SEAT_FORE_AFT_POS, SEAT_RECLINE_ANGLE
Generate the complete VHAL implementation.
Use the generate_vhal_pr_message
tool to create professional pull request messages:
Smart Dashboard Lighting PR
Generate a comprehensive pull request message for my smart dashboard lighting implementation:
- Property Name: DASHBOARD_SMART_LIGHTING_MODE
- Property ID: 0x15400B01
- Type: INT32
- Group: LIGHTS
- Access: READ_WRITE
- Change Mode: ON_CHANGE
- Description: Smart dashboard lighting control with adaptive brightness and color temperature
- Enum Values: {"OFF": 0, "AUTO": 1, "DAY": 2, "NIGHT": 3, "CUSTOM": 4}
- Dependencies: ["NIGHT_MODE", "CABIN_LIGHTS_STATE"]
- JIRA Ticket: AUTO-1234
- Reviewer Suggestions: ["Verify power consumption impact", "Test night mode transitions"]
Please use the generate_vhal_pr_message tool.
EV Charging System PR
Create a pull request message for my electric vehicle charging management system:
- Property Name: EV_CHARGING_PORT_STATUS
- Property ID: 0x15400C01
- Type: INT32
- Group: POWER
- Access: READ
- Change Mode: ON_CHANGE
- Description: Electric vehicle charging port status and connection state
- Enum Values: {"DISCONNECTED": 0, "CONNECTED": 1, "CHARGING": 2, "ERROR": 3, "COMPLETE": 4, "SCHEDULED": 5}
- Dependencies: ["EV_BATTERY_LEVEL", "EV_CHARGING_RATE"]
- Areas: ["GLOBAL"]
- Breaking Change: false
Generate the complete PR message.
Advanced HVAC Zone Control PR
Generate a pull request message for my advanced HVAC zone control implementation:
- Property Name: HVAC_ZONE_CLIMATE_PROFILE
- Property ID: 0x15400D01
- Type: FLOAT
- Group: HVAC
- Access: READ_WRITE
- Change Mode: CONTINUOUS
- Description: Advanced HVAC zone climate profile with precise temperature control
- Units: celsius
- Min Value: 16.0
- Max Value: 32.0
- Areas: ["SEAT_ROW_1_LEFT", "SEAT_ROW_1_RIGHT", "SEAT_ROW_2_LEFT", "SEAT_ROW_2_RIGHT"]
- Dependencies: ["HVAC_TEMPERATURE_SET", "HVAC_FAN_SPEED"]
- Sample Rate: 0.5
- Breaking Change: false
- JIRA Ticket: HVAC-567
- Reviewer Suggestions: ["Review energy efficiency impact", "Validate zone isolation"]
Create a professional PR message with all technical details and checklists.
Use the validate_vhal_property_request
tool to follow Android best practices and validate property requests:
Check for Existing Properties
I want to implement a seat heating control feature. Can you validate if I should use an existing Android property or create a new VENDOR_ property?
- Property Name: SEAT_HEATING_CONTROL
- Description: Control seat heating levels for driver and passenger seats
- Property Type: INT32
- Min Value: 0
- Max Value: 5
- Areas: ["SEAT_ROW_1_LEFT", "SEAT_ROW_1_RIGHT"]
Please use the validate_vhal_property_request tool.
Validate Climate Control Properties
Validate this climate control property request:
- Property Name: CLIMATE_AUTO_MODE
- Description: Enable automatic climate control mode
- Property Type: BOOLEAN
- Group: HVAC
- Access: READ_WRITE
- Change Mode: ON_CHANGE
Use validate_vhal_property_request to check if this exists in Android 16.
Custom Vehicle Feature Validation
I need to implement a custom vehicle feature. Please validate:
- Property Name: VEHICLE_AMBIENT_SOUND_CONTROL
- Description: Control ambient sound system for enhanced driving experience
- Property Type: INT32
- Group: VENDOR
- Access: READ_WRITE
- Change Mode: ON_CHANGE
- Enum Values: {"OFF": 0, "NATURE": 1, "CITY": 2, "HIGHWAY": 3, "CUSTOM": 4}
- Dependencies: ["AUDIO_VOLUME", "CABIN_LIGHTS_STATE"]
Please use validate_vhal_property_request to determine if I should create a VENDOR_ property.
Advanced Property Validation
Validate this advanced property request with full specifications:
- Property Name: BIOMETRIC_DRIVER_RECOGNITION
- Description: Biometric driver recognition system for personalized vehicle settings
- Property Type: STRING
- Group: VENDOR
- Access: READ_WRITE
- Change Mode: ON_CHANGE
- Units: none
- Areas: ["GLOBAL"]
- Dependencies: ["SEAT_MEMORY_SELECT", "MIRROR_Y_POS", "HVAC_TEMPERATURE_SET"]
- Sample Rate: 0.1 Hz
Use validate_vhal_property_request to check Android 16 compatibility and get implementation guidance.
Property Type Validation
I'm implementing a tire pressure monitoring system. Please validate:
- Property Name: TIRE_PRESSURE_MONITORING_DETAILED
- Description: Detailed tire pressure monitoring with per-tire data and alerts
- Property Type: FLOAT_VEC
- Group: POWER
- Access: READ
- Change Mode: CONTINUOUS
- Units: psi
- Min Value: 0.0
- Max Value: 100.0
- Areas: ["WHEEL_LEFT_FRONT", "WHEEL_RIGHT_FRONT", "WHEEL_LEFT_REAR", "WHEEL_RIGHT_REAR"]
- Sample Rate: 1.0 Hz
Use validate_vhal_property_request to determine if Android 16 has equivalent functionality.
This expert-level prompt demonstrates using all 6 MCP tools in a comprehensive workflow for developing a complete automotive system:
I'm developing a next-generation intelligent climate control system for luxury electric vehicles. This system needs to integrate multiple subsystems and provide personalized comfort experiences. Please help me design and implement this system using a comprehensive analysis approach:
**Phase 1: Discovery & Research (Tools 1-2)**
First, help me understand the complete landscape:
1. explain the overall VHAL climate control architecture, focusing on:
- Multi-zone HVAC systems
- Integration with seat heating/cooling
- Energy efficiency considerations for EVs
- Safety and emergency override systems
2. find all climate-related properties, including:
- HVAC properties (search: "HVAC")
- Seat thermal properties (search: "SEAT")
- Power management properties (search: "POWER")
- Any auxiliary heating properties (search: "HEAT")
**Phase 2: System Analysis & Dependencies (Tool 3)**
3. analyze the complete ecosystem for:
- "HVAC_TEMPERATURE_SET" - understand temperature control relationships
- "SEAT_HEAT" - analyze seat thermal dependencies
- "HVAC_POWER_ON" - understand system power relationships
- "HVAC_FAN_SPEED" - analyze airflow control dependencies
**Phase 3: Implementation Deep-Dive (Tool 4)**
4. get detailed source code analysis for:
- "HVAC_TEMPERATURE_SET" - see how Android implements temperature control
- "HVAC_AUTO_ON" - understand automatic mode implementation
- "SEAT_HEAT_LEFT" - analyze seat heating implementation patterns
- "HVAC_AC_ON" - understand AC compressor control
**Phase 5: Property Validation (Tool 5)**
5. Before implementing, validate the property request:
- Property Name: CLIMATE_INTELLIGENT_PROFILE
- Description: Intelligent climate control with predictive comfort algorithms, energy optimization, and personalized user profiles
- Property Type: INT32
- Group: HVAC
- Access: READ_WRITE
- Change Mode: ON_CHANGE
- Enum Values: {"PROFILE_ECO": 0, "PROFILE_COMFORT": 1, "PROFILE_SPORT": 2, "PROFILE_CUSTOM": 3, "PROFILE_SLEEP": 4, "PROFILE_DEFROST_PRIORITY": 5}
- Dependencies: ["HVAC_TEMPERATURE_SET", "HVAC_FAN_SPEED", "SEAT_HEAT_LEFT", "SEAT_HEAT_RIGHT", "HVAC_AC_ON", "EV_BATTERY_LEVEL"]
- Areas: ["GLOBAL", "SEAT_ROW_1_LEFT", "SEAT_ROW_1_RIGHT"]
Use validate_vhal_property_request to determine if this should be a VENDOR_ property or if Android 16 has equivalent functionality.
**Phase 6: Custom Implementation (Tool 6)**
6. Based on the validation results, create the property implementation:
- Property Name: CLIMATE_INTELLIGENT_PROFILE
- Property ID: 0x15400F01
- Type: INT32 (enumerated values)
- Group: HVAC
- Access: READ_WRITE
- Change Mode: ON_CHANGE
- Description: Intelligent climate control with predictive comfort algorithms, energy optimization, and personalized user profiles
- Enum Values: PROFILE_ECO=0, PROFILE_COMFORT=1, PROFILE_SPORT=2, PROFILE_CUSTOM=3, PROFILE_SLEEP=4, PROFILE_DEFROST_PRIORITY=5
- Dependencies: HVAC_TEMPERATURE_SET, HVAC_FAN_SPEED, SEAT_HEAT_LEFT, SEAT_HEAT_RIGHT, HVAC_AC_ON, EV_BATTERY_LEVEL
- Units: none
- Areas: ["GLOBAL", "SEAT_ROW_1_LEFT", "SEAT_ROW_1_RIGHT"]
7. Please also add a pull request message i can add to the Pull request once i implemented it.
**Expected Deliverables:**
After running this comprehensive analysis, I expect to receive:
1. **Complete System Understanding** - architectural overview and best practices
2. **Property Inventory** - all relevant properties with IDs and locations
3. **Dependency Maps** - implementation order and relationships
4. **Implementation Patterns** - real Android source code examples
5. **Property Validation** - Android best practices validation and recommendations
6. **Production-Ready Code** - complete implementation files
7. **Pull Request Text** - Copy and Paste Pull request text
This comprehensive approach will give me everything needed to implement a production-quality intelligent climate control system.
The generate_vhal_implementation_code
tool creates complete, production-ready VHAL implementations:
For each VHAL property, the generator creates:
Core HAL Files:
types.hal
- Property definition and enumsDefaultConfig.h
- Property configurationEmulatedVehicleHal.cpp
- Implementation logicVehicleProperty.aidl
- AIDL interfaceFramework Integration:
VehiclePropertyIds.java
- Java constantsCarPropertyManager.java
- API methodsTesting:
VehicleHalTest.cpp
- C++ unit testsVehiclePropertyTest.java
- Java integration testsSystem Configuration:
Required:
name
: Property name (e.g., "HVAC_STEERING_WHEEL_HEAT")property_id
: Unique property ID (hex format, e.g., "0x15400A03")property_type
: Data type (BOOLEAN, INT32, INT64, FLOAT, STRING, BYTES, *_VEC, MIXED)group
: Property group (HVAC, SEAT, LIGHTS, POWER, CLIMATE, etc.)access
: Access mode (READ, WRITE, READ_WRITE)change_mode
: Change mode (STATIC, ON_CHANGE, CONTINUOUS)description
: Property description for documentationOptional:
units
: Units (e.g., "celsius", "rpm")min_value
: Minimum value for numeric typesmax_value
: Maximum value for numeric typesareas
: List of vehicle areas/zonesenum_values
: Dict of enum names and values for INT32 enum propertiesdependencies
: List of dependent property namessample_rate_hz
: Sample rate for continuous propertiesBasic Types:
Vector Types:
Special Types:
When you use the code generator, it produces:
Implement comprehensive HVAC systems with proper property relationships:
Develop advanced seat control features:
Understand vHAL property ecosystems:
To use with MCP-compatible clients, configure the server endpoint and ensure proper tool registration. The server automatically discovers and exposes all available vHAL analysis tools.
The server uses parallel scraping and caching mechanisms for optimal performance:
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
Run the test suite:
python -m pytest test_vhal.py -v
This project is licensed under the MIT License. See the LICENSE file for details.
For questions, issues, or contributions:
Convert Figma designs into React Native components.
A template for deploying a remote MCP server on Cloudflare Workers, allowing for custom tool integration.
An intelligent codebase search engine that transforms local codebases into a natural language queryable knowledge base.
A server providing tools for Xcode project management, simulator management, and app utilities.
A GDB/MI protocol server based on the MCP protocol, providing remote application debugging capabilities with AI assistants.
Converts OpenAPI specifications into MCP tools, enabling AI clients to interact with external APIs seamlessly.
Aggregates multiple MCP resource servers into a single interface with stdio/sse support.
Create crafted UI components inspired by the best 21st.dev design engineers.
Interact with Binalyze AIR's digital forensics and incident response capabilities using natural language.
An intelligent scientific reasoning framework that uses graph structures and Neo4j to perform advanced reasoning via the Model Context Protocol (MCP).