Skip to main content
Glama

Bluetooth MCP サーバー

Bluetoothロゴ ライセンス: MIT Pythonバージョン ファストAPI TDD

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

🔍 概要

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

Related MCP server: API Tester MCP Server

✨ 特徴

  • 📡マルチプロトコルスキャン: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

Latest Blog Posts

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