Provides device information tools for Android devices via Termux, including battery status, storage details, memory stats, and system specifications.
Provides device information tools for Linux systems, including battery status, storage details, memory stats, and system specifications.
Provides device information tools for macOS systems, including battery status, storage details, memory stats, and system specifications.
DeviceMCP
A cross-platform Model Context Protocol (MCP) server that provides device information including system specs, battery status, storage, and memory details for Windows, macOS, Linux, and Android.
Features
š„ļø Cross-Platform Support: Works on Windows, macOS, Linux, and Android (via Termux)
š Battery Information: Get real-time battery level, charging status, and time remaining
š¾ Storage Details: Monitor disk usage across all drives and partitions
š§ Memory Stats: Track RAM and swap memory usage
š System Info: Access OS version, hostname, architecture, and processor details
šļø Modular Architecture: Clean, maintainable code with platform-specific implementations
Installation
Prerequisites
Python 3.8 or higher
pip or uv package manager
Install Dependencies
Or using uv:
For Android (Termux)
Usage
Run Locally (stdio transport)
Or using FastMCP CLI:
Run with HTTP Transport
Or using FastMCP CLI:
Install in Claude Desktop
Generate the configuration file:
Then follow the prompts to install it in Claude Desktop.
Available Tools
1. get_device_info
Get comprehensive device information.
Returns:
2. get_battery_level
Get battery information and charging status.
Returns:
3. get_storage_info
Get storage information for all drives/partitions.
Returns:
4. get_memory_info
Get RAM and swap memory information.
Returns:
5. get_system_summary
Get all device information in one comprehensive call.
Returns: Combined output of all the above tools plus platform detection.
Project Structure
Architecture
The project follows a modular architecture with clear separation of concerns:
Core Layer: Abstract base classes and data models
Platform Layer: Platform-specific implementations
Utils Layer: Helper functions for detection and formatting
Server Layer: FastMCP server with tool definitions
Each platform provider implements the DeviceInfoProvider interface, ensuring consistent behavior across all platforms.
Extending the Server
Adding a New Platform
Create a new file in
platforms/(e.g.,bsd.py)Implement the
DeviceInfoProviderinterfaceAdd platform detection logic in
utils/platform_detector.pyImport and register in the factory function
Adding New Metrics
Add new models in
core/models.pyAdd abstract methods in
core/base.pyImplement in each platform provider
Add tool function in
server.py
Development
Running Tests
Code Style
The project follows PEP 8 style guidelines. Format code with:
Troubleshooting
Battery Information Not Available
Some desktop systems don't have batteries. The server will return has_battery: false in such cases.
Permission Errors on Storage Info
Some drives/partitions may require elevated permissions. The server silently skips inaccessible drives.
Android Battery Info
For best results on Android, install termux-api:
License
MIT License - feel free to use this in your own projects!
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues and questions, please open an issue on the GitHub repository.