Token导航 LogoToken导航TokenDH.com
Bluetooth MCP Server logo
AI代理stdio官方级别未说明来源级核验

Bluetooth MCP Server

MCP Server

bluetooth-mcp-server for Claude AI

工具数

0

提示词数

0

GitHub Stars

21

资源数

0
多平台支持PythonClaudeClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Hypijump31

提供方

Hypijump31

最后核验

2026/5/18 02:52

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python -m venv venv

详细介绍

蓝牙MCP服务器

Bluetooth Logo ![License: MIT](https://opensource.org/licenses/MIT) ](https://www.python.org/) ![FastAPI](https://fastapi.tiangolo.com/) ![TDD](https://en.wikipedia.org/wiki/Test-driven_development)

蓝牙设备检测的模型上下文协议服务器

🔍 概述

该项目实现了一个模型上下文协议(MCP)服务器,使Claude和其他AI助手能够扫描您附近的蓝牙设备并与之交互。它采用测试驱动开发方法构建,为跨多个平台的蓝牙操作提供了一个强大的、经过测试的接口。

✨ 特性

  • 📡 多协议扫描:检测BLE和经典蓝牙设备
  • 🔎 灵活的过滤:按名称、类型或其他属性筛选设备
  • 🔄 自动设备识别:识别和分类常见设备(如Freebox、电视等)
  • 📱 增强的设备信息:获取制造商信息、设备类型和详细特性
  • 🖥️ 与跨平台支持:适用于Windows、macOS和Linux
  • 平台特定优化:增强了Windows上的检测功能
  • 🤖 MCP集成:与Claude和兼容的AI助手无缝集成

📋 需求

  • Python 3.7+
  • 蓝牙适配器 (内置或外置)
  • 管理员/sudo权限 (某些蓝牙操作需要)
  • Internet连接 (用于包装安装)

🚀 快速开始

安装

# 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

与克劳德一起使用

  1. 使用ngrok将您的服务器暴露在互联网上或将其部署到服务器上:
   ngrok http 8000
  1. 配置Claude以使用您的MCP服务器:
   npx @anthropic-ai/sdk install-model-context-protocol 
  1. 让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.

🔧 故障排除

蓝牙问题

  • “拒绝访问”错误:使用admin/sudo权限运行服务器
  • 未检测到适配器:确保在系统设置中启用了蓝牙
  • 未找到设备:确保附近有可发现的蓝牙设备
  • Windows特定问题:检查蓝牙服务是否处于活动状态(services.msc)

MCP问题

  • Claude未检测到工具:验证您的MCP服务器URL是否正确且可访问
  • 执行错误:检查服务器日志以获取详细的错误信息

👥 贡献

欢迎投稿!请按照以下步骤操作:

  1. 分叉存储库
  2. 创建要素分支(git checkout -b feature/amazing-feature)
  3. 为您的功能编写测试
  4. 实现您的功能
  5. 确保所有测试通过
  6. 提交您的更改(git commit -m 'Add amazing feature')
  7. 推到分支(git push origin feature/amazing-feature)
  8. 打开拉取请求

📄 许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

🙏 致谢

目录标签

目录标签

多平台支持PythonClaudedeveloper-toolsbluetoothmcpserverAI蓝牙检测本地部署设备交互MCP集成AI助手

支持客户端

Claude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP