Enables AI assistants to detect, filter, and interact with BLE and Classic Bluetooth devices across Windows, macOS, and Linux via a robust Model Context Protocol interface with enhanced device recognition and detailed information.
Unlock the full potential of Bluetooth MCP Server through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.
Free tier available • No credit card required
Discover shared experiences
Model Context Protocol Server for Bluetooth Device Detection
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.
# 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
# Start the Bluetooth API server python run.py # In another terminal, start the MCP server python bluetooth_mcp_server.py
Expose your server to the internet using ngrok or deploy it to a server:
ngrok http 8000
Configure Claude to use your MCP server:
npx @anthropic-ai/sdk install-model-context-protocol
Ask Claude to scan for Bluetooth devices:
Could you scan for nearby Bluetooth devices?
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
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.
services.msc
)Contributions are welcome! Please follow these steps:
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!