modelscope·@Hypijump31/bluetooth-mcp-server
一个ModelContextProtocol服务器,它使Claude AI能够检测和扫描附近的蓝牙设备,通过兼容的MCP接口为Claude提供蓝牙感知功能。
用于蓝牙设备检测的模型上下文协议服务器
</div>此项目实现了一个模型上下文协议(MCP)服务器,使 Claude 和其他 AI 助手能够扫描并与其附近的蓝牙设备进行交互。通过测试驱动开发方法构建,它为跨多个平台的蓝牙操作提供了一个强大且经过测试的接口。
# 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
使用 ngrok 或将其部署到服务器上将您的服务器暴露到互联网:
ngrok http 8000
配置 Claude 以使用您的 MCP 服务器:
npx @anthropic-ai/sdk install-model-context-protocol <YOUR_SERVER_URL>
让 Claude 扫描附近的蓝牙设备:
你能扫描一下附近的蓝牙设备吗?
该项目遵循测试驱动开发(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。
services.msc)欢迎贡献!请遵循以下步骤:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)本项目采用 MIT 许可证 - 详情请参阅 LICENSE 文件。
一座通过串行通信将物理硬件设备与人工智能大语言模型连接起来的桥梁,允许用户使用自然语言命令控制硬件。
一种多功能的模型上下文协议服务器,使人工智能助手能够管理日历、跟踪任务、处理电子邮件、搜索网络以及控制智能家居设备。
暂无描述。
暂无描述。
暂无描述。
暂无描述。