Skip to content

Introduction

mcbluetooth is a Model Context Protocol (MCP) server that gives LLMs full control over the Linux Bluetooth stack via BlueZ.

Ask Claude (or any MCP-compatible LLM) to:

  • “Turn on Bluetooth and make my computer discoverable”
  • “Scan for devices and pair with my Sony headphones”
  • “Connect my headphones and set volume to 80%”
  • “Read the battery level from my fitness tracker”
  • “Send this PDF to my phone via Bluetooth”
  • “Download my phone’s contacts”
  • “Enable HFP Audio Gateway and simulate an incoming call”
  • “Start capturing Bluetooth traffic for debugging”

Instead of memorizing bluetoothctl commands or navigating GUI menus, just describe what you want:

"My headphones disconnected, reconnect them and set them as the default audio output"

mcbluetooth exposes the full power of BlueZ:

  • Adapters — Power, discovery, pairing acceptance
  • Devices — Scanning, pairing, connection management
  • Audio — A2DP/HFP profiles, volume, routing
  • HFP Audio Gateway — Phone simulation, call control, indicators
  • BLE/GATT — Services, characteristics, notifications
  • OBEX — File transfer, phonebook, messages
  • Monitoring — HCI packet capture and analysis

The built-in pairing agent handles all Bluetooth pairing methods:

MethodDescriptionAgent Response
Just WorksNo user interactionAuto-accept
Numeric ComparisonConfirm 6-digit codeInteractive or auto
Passkey EntryEnter code from devicePIN prompt
Legacy PIN4-6 digit PINPIN prompt

Live state queries without tool calls:

bluetooth://adapters → All Bluetooth adapters
bluetooth://paired → Paired devices
bluetooth://connected → Connected devices
bluetooth://device/AA:BB:CC:DD:EE:FF → Specific device
┌─────────────────────────────────────────────────────────────┐
│ Claude / LLM │
├─────────────────────────────────────────────────────────────┤
│ MCP Protocol (stdio) │
├─────────────────────────────────────────────────────────────┤
│ mcbluetooth (FastMCP) │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ Adapter │ │ Device │ │ Audio │ │ OBEX │ ... │
│ │ Tools │ │ Tools │ │ Tools │ │ Tools │ │
│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘ │
│ └──────────┬┴──────────┬┴───────────┘ │
│ ┌────────┴────────┐ │ │
│ │ BlueZ D-Bus │ │ PipeWire/Pulse │
│ │ (dbus-fast) │ │ (pulsectl-asyncio) │
│ └────────┬────────┘ └──────────────────────────────┤
├──────────────────┼──────────────────────────────────────────┤
│ │ │
│ BlueZ (bluetoothd) obexd │
│ │ │
│ Linux Kernel (Bluetooth subsystem) │
└─────────────────────────────────────────────────────────────┘
RequirementVersionNotes
LinuxAnyBlueZ is Linux-only
Python3.11+Async/await, type hints
BlueZ5.xBluetooth daemon
PipeWire or PulseAudioAnyFor audio features
bluez-obexAnyFor OBEX features (optional)
  1. Install mcbluetooth
  2. Try the quick start guide
  3. Explore the tool reference