Bluetooth MCP Server

Integrations

  • Allows scanning and detecting nearby Bluetooth devices, with the ability to filter devices by name

Bluetooth MCP サーバー

Bluetoothデバイス検出用のモデルコンテキストプロトコルサーバー

🔍 概要

このプロジェクトは、ClaudeをはじめとするAIアシスタントが周囲のBluetoothデバイスをスキャンし、操作できるようにするModel Context Protocol(MCP)サーバーを実装します。テスト駆動開発アプローチに基づいて構築されており、複数のプラットフォーム間でBluetoothを操作するための堅牢でテスト済みのインターフェースを提供します。

✨ 特徴

  • 📡マルチプロトコルスキャン:BLEとClassic Bluetoothデバイスの両方を検出
  • 🔎柔軟なフィルタリング:デバイスを名前、タイプ、その他の属性でフィルタリングします
  • 🔄自動デバイス認識:一般的なデバイス(Freebox、テレビなど)を識別して分類します。
  • 📱強化されたデバイス情報:メーカー情報、デバイスの種類、詳細な特性を取得します
  • 🖥️クロスプラットフォームサポート:Windows、macOS、Linuxで動作します
  • プラットフォーム固有の最適化: Windowsでの検出機能が強化されました
  • 🤖 MCP 統合: Claude および互換性のある AI アシスタントとのシームレスな統合

📋 要件

  • Python 3.7以上
  • Bluetoothアダプタ(内蔵または外付け)
  • 管理者/sudo 権限(一部の Bluetooth 操作に必要)
  • インターネット接続(パッケージインストール用)

🚀 クイックスタート

インストール

# 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
  2. Claude が MCP サーバーを使用するように設定します。
    npx @anthropic-ai/sdk install-model-context-protocol <YOUR_SERVER_URL>
  3. Claude に Bluetooth デバイスをスキャンするよう依頼します。
    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 を参照してください。

🔧 トラブルシューティング

Bluetoothの問題

  • 「アクセスが拒否されました」エラー: admin/sudo権限でサーバーを実行してください
  • アダプタが検出されません: システム設定で Bluetooth が有効になっていることを確認してください
  • デバイスが見つかりません: 近くに検出可能な Bluetooth デバイスがあることを確認してください
  • Windows 固有の問題: Bluetooth サービスがアクティブであることを確認してください ( 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 ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

🙏 謝辞

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

Claude AI が近くの Bluetooth デバイスを検出してスキャンし、互換性のある MCP インターフェースを通じて Claude に Bluetooth センシング機能を提供できる ModelContextProtocol サーバー。

  1. 🔍 概要
    1. ✨ 特徴
      1. 📋 要件
        1. 🚀 クイックスタート
          1. インストール
          2. サーバーの実行
          3. クロードと一緒に使う
        2. 🧪 テスト
          1. 🏗️ 建築
            1. 🔧 トラブルシューティング
              1. Bluetoothの問題
              2. MCPの問題
            2. 👥 貢献する
              1. 📄 ライセンス
                1. 🙏 謝辞

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    Model Context Protocol (MCP) server implementation that enables Claude Desktop to interact with Google's Gemini AI models.
                    Last updated -
                    53
                    TypeScript
                    MIT License
                    • Apple
                    • Linux
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server that enables AI assistants like Claude to interact directly with Home Assistant, allowing them to query device states, control smart home entities, and perform automation tasks.
                    Last updated -
                    15
                    Python
                    MIT License
                    • Apple
                    • Linux
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A Model Context Protocol server that automatically reads the Claude Desktop configuration file and presents all available MCP services in an easy-to-copy format at the top of the tools list.
                    Last updated -
                    1
                    8
                    2
                    JavaScript
                    MIT License
                    • Apple
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A Model Context Protocol server that enables AI assistants like Claude to interact with Spotify, allowing them to search for tracks, control playback, and manage playlists.
                    Last updated -
                    TypeScript
                    • Apple

                  View all related MCP servers

                  ID: 5axo6uhdx2