MCP Connector

Scan and detect nearby Bluetooth devices via MCP

MCP server for scanning nearby BLE and Classic Bluetooth devices, with filtering, auto-recognition, and cross-platform support.

Works with bluetoothfastapibleakclaudeanthropic

46
Spark score
out of 100
Updated Apr 2025
Source checked Sep 10, 2026
Version 1.0.0

Add to Favorites

Why it matters

Enable AI assistants like Claude to discover and interact with Bluetooth devices in your environment by providing a Model Context Protocol server that scans for both BLE and Classic Bluetooth devices with automatic device recognition and cross-platform support.

Outcomes

What it gets done

01

Scan for nearby Bluetooth Low Energy and Classic Bluetooth devices

02

Filter discovered devices by name, type, or other attributes

03

Identify and categorize common device types like TVs and routers

04

Extract manufacturer information and detailed device characteristics

Source

Get it from source

Spark does not host a copy of it.

Open source

Reports

Agent outcome reports

No reports yet

Overview

Bluetooth MCP Server

Bluetooth MCP Server scans for BLE and Classic Bluetooth devices nearby the host machine, filters by name or type, and returns manufacturer and device details, bridging a FastAPI Bluetooth API to Claude via a separate MCP process. Use it when an agent needs to scan or identify Bluetooth devices physically near the server host; scanning is limited to that host's own Bluetooth range.

What it does

Bluetooth MCP Server lets Claude and other AI assistants scan and interact with nearby Bluetooth devices, built with a test-driven development approach and cross-platform Bluetooth support via Bleak. It scans for both BLE and Classic Bluetooth devices, with flexible filtering by name, type, or other attributes, and automatically recognizes and categorizes common devices such as a Freebox or a TV. Scans return enhanced device information including manufacturer, device type, and detailed characteristics. It runs on Windows, macOS, and Linux, with platform-specific optimizations for improved detection on Windows. The project is built as two cooperating processes: a FastAPI-based Bluetooth API server (run.py) and a separate MCP server process (bluetooth_mcp_server.py) that bridges it to Claude, organized into a modular app package (api, core, data, models, services, utils) plus a dedicated mcp_sdk integration layer.

When to use - and when NOT to

Use it when an agent needs to discover and identify Bluetooth devices physically nearby the machine running the server, such as checking what's discoverable, filtering to a specific device type, or getting manufacturer and characteristic details for a detected device. It requires an actual Bluetooth adapter on the host, admin or sudo privileges for some Bluetooth operations, and, per the README's own setup, exposing the local server to the internet, for example via ngrok, so a cloud-hosted Claude can reach it, meaning the device-scanning host and the Bluetooth devices being scanned must be physically co-located. It is not useful for scanning devices remote from wherever the server process is actually running.

Capabilities

  • Multi-protocol scanning: both BLE and Classic Bluetooth devices
  • Flexible filtering by name, type, or other device attributes
  • Automatic device recognition and categorization for common device types
  • Enhanced device info: manufacturer, device type, detailed characteristics
  • Cross-platform support (Windows, macOS, Linux) with Windows-specific detection optimizations

How to install

git clone https://github.com/yourusername/bluetooth-mcp-server.git
cd bluetooth-mcp-server
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python run.py
python bluetooth_mcp_server.py

Requires Python 3.7+, a Bluetooth adapter, and admin or sudo privileges for some operations. To connect Claude to a locally run server, expose it publicly, for example with ngrok, and register the URL with Claude. Released under the MIT License.

Who it's for

Developers who want an AI assistant to scan for and identify nearby Bluetooth devices, on a machine physically near those devices, across Windows, macOS, or Linux.

Source README

Bluetooth MCP Server

Bluetooth Logo
License: MIT
Python Version
FastAPI
TDD

Model Context Protocol Server for Bluetooth Device Detection

🔍 Overview

This project implements a Model Context Protocol (MCP) server that enables Claude and other AI assistants to scan and interact with Bluetooth devices in your vicinity. Built with a Test-Driven Development approach, it provides a robust, tested interface for Bluetooth operations across multiple platforms.

✨ Features

  • 📡 Multi-protocol scanning: Detect both BLE and Classic Bluetooth devices
  • 🔎 Flexible filtering: Filter devices by name, type, or other attributes
  • 🔄 Automatic device recognition: Identify and categorize common devices (like Freebox, TVs, etc.)
  • 📱 Enhanced device information: Get manufacturer info, device type, and detailed characteristics
  • 🖥️ Cross-platform support: Works on Windows, macOS, and Linux
  • Platform-specific optimizations: Enhanced detection capabilities on Windows
  • 🤖 MCP Integration: Seamless integration with Claude and compatible AI assistants

📋 Requirements

  • Python 3.7+
  • Bluetooth adapter (built-in or external)
  • Admin/sudo privileges (required for some Bluetooth operations)
  • Internet connection (for package installation)

🚀 Quick Start

Installation

# Clone the repository
git clone https://github.com/yourusername/bluetooth-mcp-server.git
cd bluetooth-mcp-server

# Create and activate virtual environment
python -m venv venv

# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Configure environment variables
cp .env.example .env
# Edit the .env file as needed

Running the Server

# Start the Bluetooth API server
python run.py

# In another terminal, start the MCP server
python bluetooth_mcp_server.py

Using with Claude

  1. Expose your server to the internet using ngrok or deploy it to a server:

    ngrok http 8000
    
  2. Configure Claude to use your MCP server:

    npx @anthropic-ai/sdk install-model-context-protocol <YOUR_SERVER_URL>
    
  3. Ask Claude to scan for Bluetooth devices:

    Could you scan for nearby Bluetooth devices?
    

🧪 Testing

This project follows a Test-Driven Development (TDD) approach with comprehensive test coverage:

# Run all tests
pytest

# Run specific test categories
pytest tests/api/       # API tests
pytest tests/models/    # Data model tests
pytest tests/services/  # Service logic tests
pytest tests/utils/     # Utility function tests

🏗️ Architecture

The project follows a modular architecture with clear separation of concerns:

bluetooth-mcp-server/
├── app/                # Main application package
│   ├── api/            # FastAPI endpoints
│   ├── core/           # Core configuration
│   ├── data/           # Static data (Bluetooth identifiers, etc.)
│   ├── models/         # Data models
│   ├── services/       # Business logic
│   └── utils/          # Utility functions
├── mcp_sdk/            # MCP integration SDK
└── tests/              # Test suites

For detailed architecture information, see architecture.md.

🔧 Troubleshooting

Bluetooth Issues

  • "Access denied" errors: Run the server with admin/sudo privileges
  • Adapter not detected: Ensure Bluetooth is enabled in your system settings
  • No devices found: Make sure there are discoverable Bluetooth devices nearby
  • Windows-specific issues: Check that Bluetooth services are active (services.msc)

MCP Issues

  • Tool not detected by Claude: Verify your MCP server URL is correct and accessible
  • Execution errors: Check the server logs for detailed error information

👥 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Write tests for your feature
  4. Implement your feature
  5. Ensure all tests pass
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgements

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.