Bluetooth MCP Server
蓝牙 MCP 服务器
用于蓝牙设备检测的模型上下文协议服务器
🔍 概述
该项目实现了一个模型上下文协议 (MCP) 服务器,使 Claude 和其他 AI 助手能够扫描您附近的蓝牙设备并与之交互。它采用测试驱动开发方法构建,为跨多个平台的蓝牙操作提供了强大且经过测试的接口。
Related MCP server: my-mcp-server
✨ 特点
📡多协议扫描:检测 BLE 和传统蓝牙设备
🔎灵活过滤:按名称、类型或其他属性过滤设备
🔄自动设备识别:识别和分类常见设备(如 Freebox、电视等)
📱增强的设备信息:获取制造商信息、设备类型和详细特性
🖥️跨平台支持:适用于 Windows、macOS 和 Linux
⚡平台特定优化:增强 Windows 上的检测功能
🤖 MCP 集成:与 Claude 和兼容的 AI 助手无缝集成
📋 要求
Python 3.7+
蓝牙适配器(内置或外置)
管理员/sudo 权限(某些蓝牙操作需要)
互联网连接(用于包安装)
🚀 快速入门
安装
# 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与 Claude 一起使用
使用 ngrok 将您的服务器暴露到互联网或将其部署到服务器:
ngrok http 8000配置 Claude 以使用您的 MCP 服务器:
npx @anthropic-ai/sdk install-model-context-protocol <YOUR_SERVER_URL>要求 Claude 扫描蓝牙设备:
Could you scan for nearby Bluetooth devices?
🧪 测试
该项目采用测试驱动开发(TDD)方法,具有全面的测试覆盖范围:
# 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🏗️ 建筑
该项目采用模块化架构,关注点明确分离:
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有关架构的详细信息,请参阅architecture.md 。
🔧 故障排除
蓝牙问题
“访问被拒绝”错误:使用管理员/sudo 权限运行服务器
未检测到适配器:确保系统设置中已启用蓝牙
未找到设备:确保附近有可发现的蓝牙设备
Windows 特定问题:检查蓝牙服务是否处于活动状态(
services.msc)
MCP 问题
Claude 未检测到该工具:请验证您的 MCP 服务器 URL 是否正确且可访问
执行错误:检查服务器日志以获取详细的错误信息
👥 贡献
欢迎贡献!请按以下步骤操作:
分叉存储库
创建功能分支(
git checkout -b feature/amazing-feature)为你的功能编写测试
实现你的功能
确保所有测试通过
提交您的更改(
git commit -m 'Add amazing feature')推送到分支(
git push origin feature/amazing-feature)打开拉取请求
📄 许可证
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
🙏 致谢
用于 API 框架的FastAPI
跨平台蓝牙功能尚不完善
Anthropic Claude用于 MCP 集成支持
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Real-time planetary signal engine and Model Context Protocol (MCP) server for autonomous AI agents.
Enable secure connectivity between Sentry issues and debugging data, and LLM clients, using a Model Context Protocol (MCP) server.
Related MCP Servers
- FlicenseBqualityDmaintenanceA macOS-native bridge server that enables communication between different AI clients like Claude and Cline, allowing them to interact with each other through the Model Context Protocol.23
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows integration with Claude Desktop by creating and managing custom tools that can be executed through the MCP framework.88
- FlicenseNot gradedqualityNot gradedmaintenanceEnables Claude to control Nordic Thingy:52 IoT devices via Bluetooth LE, allowing users to manage LED colors, play sounds, and read environmental sensors through natural language conversations.
- AlicenseNot gradedqualityDmaintenanceBluetooth Low Energy (BLE) MCP server that allows AI agents to scan, connect to and communicated with BLE devices, as well as simulate BLE perhipherals.16BSD 2-Clause "Simplified"
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Hypijump31/bluetooth-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server