README.md
May 8, 2026 · View on GitHub
SwiftMTP
SwiftMTP is a light-weight, modern, Swift-based utility for interacting with MTP (Media Transfer Protocol) devices on macOS. It allows users to browse, manage, and transfer files between a Mac and external devices like Android phones.
Inspired by OpenMTP, SwiftMTP uses the enhanced backend to provide a consistently high-performance transfer experience while maintaining a compact footprint.
AI Features (Upcoming)
Overview
SwiftMTP is now supercharged by AI, bringing an efficient and innovative intelligence experience to your MTP file management:
- Natural Language Search: Find your files naturally like a conversation. Just type what you're looking for, e.g., "Photos of last week" or "Work documents from 2024".
- Device Info Analysis: Get smart insights about your device hardware, connectivity status, and potential performance optimizations.
| Natural Language Search | Device Info Analysis |
|---|---|
![]() | ![]() |
Details
SwiftMTP currently supports two modes for AI: Apple Foundation Models and AI API.
Apple Foundation Models are on-device models provided by Apple that run entirely locally on your Mac. They feature a fixed 4096-token context window and require macOS 26 or later with Apple Intelligence enabled.
AI API Integration mode supports both OpenAI and Anthropic API formats. When configuring, ensure the API Endpoint includes the full path (e.g., including v1/messages or similar). You must explicitly specify the model in Model Name (recommended to use flash or similar high-speed models).
Privacy and Security
- Onboarding Notice: When you first switch the AI Mode from
Noneto any other option in Settings, a disclosure notice will appear explaining the terms of use. You must read and agree to all terms before activating AI features. - On-Device Local Processing: All inference using Apple Foundation Models is performed entirely on your local hardware.
- Manual Trigger Only: AI features must be manually triggered by the user.
- Metadata Handling: In API mode, item metadata (such as names, types, and modification dates) and device information (model, USB status) may be sent to the provider to build context for your requests. The actual contents of your files will never be uploaded or shared.
Features
- Device Management: Easily connect/disconnect MTP devices and select specific storage devices.
- File Browsing: Deeply navigate through device directories with a native macOS feel with Quick Look preview supported.
- Bi-directional Transfer: Import and export files with support for Drag-and-Drop.
- File Operations: Create new folders, rename and delete files directly on the device.
- Progress Tracking: Real-time transfer progress bars and status indicators.
- Safe and secure: No ADB or USB debugging required.
- Localization: Multilingual support via
Localizable.xcstrings.
Screenshot

| File menu with Keyboard Shortcuts | Go menu with Keyboard Shortcuts |
|---|---|
![]() | ![]() |
Architecture
The project is structured to bridge high-level Swift with low-level MTP kernel interactions:
SwiftMTP/
├──SwiftMTP/ # Main App Source
│ ├── SwiftMTPApp.swift # Entry point
│ ├── Views/ # SwiftUI UI Layer
│ ├── Models/ # Data models
│ └── Services/ # KalamMTPManager (Connection & Transfer logic)
├──KalamShim/ # C shim bridging Swift and the MTP kernel
├──ffi/ # Kalam backend source
├──CKalam/ # Module map for C headers
└──lib/ # Runtime dependencies (kalam.dylib, libusb.dylib)
Getting Started
Download
Build
Prerequisites
- Xcode 15.0+
- macOS 12.0+
Build & Run
Please build Kalam backend first. Refer toPre-compiled dylibs have been added. You can also compile them by yourself.ffi/kalam/native/README.md. This step will build necessary dynamic libraries (kalam.dylib&libusb.dylib) and will place them underlib.- Open
SwiftMTP.xcodeprojin Xcode. - Select your target platform (macOS).
- Press Run.
Realized
- Drag-and-Drop
- Automatic device connect detection
- Transfer progress bar and status indicators
- Multi selections and export
- "Go" and "File" menu
- Favorites
- Finder-like quick look preview (press spacebar)
- File list font size adjustment
- Paste to import
- Multiple device connections (v1.1)
- Cancel a transfer (v1.1)
FAQ
I got "OpenSession after reset: LIBUSB_ERROR_NOT_FOUND"
This could be due to other software occupying MTP sessions or a device connection issue. Please ensure software like Preview, Image Capture, or Android File Transfer is not running. For Android File Transfer, even if it's not running in the foreground, there is an Android File Transfer Agent in the system background to detect USB MTP device connections in real time and automatically launch the main app. You can exit Android File Transfer Agent in Activity Monitor. After that, please reconnect or restart your device.
macOS cannot verify this app?
This is because the app was not released in the way Apple prefers. Apple requires developers to pay $99 annually for a so-called "security signature". Please go to System Settings > Privacy & Security, scroll down and allow the app to run. If the problem still exists, please execute the following command in Terminal and try opening the app once again.
sudo xattr -rd com.apple.quarantine /Applications/SwiftMTP.app
License
About AI: AI assistance involved; each code segment has undergone manual review and testing.
Need help? If you encounter any issues, please open an Issue.
Contributing: SwiftMTP is always looking for contributions. Just simply fork this repo and make pull requests. You can also improve the translation or add your new language freely.
Support project: ☕️ Buy Me a Coffee



