Quick Start
import { Steps, Aside } from ‘@astrojs/starlight/components’;
This guide walks you through basic Bluetooth operations with mcbluetooth.
Prerequisites
Section titled “Prerequisites”- mcbluetooth installed and added to Claude Code
- A Bluetooth adapter (built-in or USB dongle)
- A Bluetooth device to test with (headphones, phone, etc.)
Basic Operations
Section titled “Basic Operations”-
Check your adapter
bt_list_adaptersYou should see your Bluetooth adapter:
[{"name": "hci0", "address": "...", "powered": true, ...}] -
Power on Bluetooth (if needed)
bt_adapter_power adapter="hci0" on=true -
Scan for devices
bt_scan adapter="hci0" timeout=10 mode="both"This scans for 10 seconds and returns all discovered devices.
-
Pair with a device
Put your device in pairing mode, then:
bt_pair adapter="hci0" address="AA:BB:CC:DD:EE:FF"The agent handles PIN/passkey automatically for most devices.
-
Connect to the paired device
bt_connect adapter="hci0" address="AA:BB:CC:DD:EE:FF"
Common Workflows
Section titled “Common Workflows”Connect Headphones
Section titled “Connect Headphones”# Scan for devicesbt_scan adapter="hci0"
# Pair (first time only)bt_pair adapter="hci0" address="C8:7B:23:55:68:E8"
# Connectbt_connect adapter="hci0" address="C8:7B:23:55:68:E8"
# Set as default audio and adjust volumebt_audio_set_default address="C8:7B:23:55:68:E8"bt_audio_volume address="C8:7B:23:55:68:E8" volume=75Read a BLE Sensor
Section titled “Read a BLE Sensor”# Scan for BLE devicesbt_ble_scan adapter="hci0" timeout=10
# Connect and discover servicesbt_connect adapter="hci0" address="AA:BB:CC:DD:EE:FF"bt_ble_services adapter="hci0" address="AA:BB:CC:DD:EE:FF"
# Read battery level (standard BLE service)bt_ble_battery adapter="hci0" address="AA:BB:CC:DD:EE:FF"
# Read a specific characteristicbt_ble_read adapter="hci0" address="AA:BB:CC:DD:EE:FF" char_uuid="00002a19-0000-1000-8000-00805f9b34fb"Send a File to Your Phone
Section titled “Send a File to Your Phone”# Check OBEX is readybt_obex_status
# Send file (phone will show accept prompt)bt_obex_send_file address="AA:BB:CC:DD:EE:FF" file_path="~/Documents/report.pdf"Download Contacts from Phone
Section titled “Download Contacts from Phone”# Pull entire phonebookbt_phonebook_pull address="AA:BB:CC:DD:EE:FF" save_path="~/contacts.vcf"
# Or search for specific contactbt_phonebook_search address="AA:BB:CC:DD:EE:FF" field="name" value="John"Using MCP Resources
Section titled “Using MCP Resources”Resources provide live state without tool calls:
# In your MCP client, read these URIs:bluetooth://adapters # All adaptersbluetooth://paired # Paired devicesbluetooth://connected # Connected devicesbluetooth://device/AA:BB:... # Specific device detailsNext Steps
Section titled “Next Steps”- Adapter Management — Control Bluetooth hardware
- Device Pairing — Deep dive into pairing modes
- Audio Control — Master Bluetooth audio
- Tool Reference — Complete tool documentation