{"$schema":"https://wellknown.network/schemas/agent-record-v1.json","schemaVersion":"1","id":"ag_d4c44pka9ckf","handle":"lw-ble-mcp","url":"https://wellknown.network/agents/lw-ble-mcp","links":{"self":"https://wellknown.network/agents/lw-ble-mcp/record.json","html":"https://wellknown.network/agents/lw-ble-mcp","markdown":"https://wellknown.network/agents/lw-ble-mcp/record.md","api":"https://wellknown.network/api/v1/agents/lw-ble-mcp","status":"https://wellknown.network/api/v1/agents/lw-ble-mcp/status","claim":"https://wellknown.network/agents/lw-ble-mcp/claim","claimApi":"https://wellknown.network/api/v1/claims","claimDescriptor":"https://wellknown.network/agents/lw-ble-mcp/claim.json","badge":"https://wellknown.network/agents/lw-ble-mcp/badge.svg","openapi":"https://wellknown.network/openapi.json","history":"https://wellknown.network/api/v1/agents/lw-ble-mcp/history","tools":"https://wellknown.network/api/v1/agents/lw-ble-mcp/tools"},"ard":{"identifier":"urn:air::server:lw-ble-mcp","type":"application/mcp-server-card+json"},"kind":"mcp_server","declared":{"name":"lw-ble-mcp","summary":"A reliable Bluetooth Low Energy debug MCP server for AI agents","description":"# lw-ble-mcp — 轻量级蓝牙调试 MCP Server \n \n**lw-ble-mcp** 是一个面向 AI Agent 的轻量级蓝牙低功耗（BLE）调试 MCP 服务器。基于 MCP Python SDK（FastMCP）与 bleak 构建，以 `lw_ble_*` 前缀提供 21 个工具：扫描、连接、GATT 读写、描述符访问、MTU 查询、通知订阅、一键设备侦查（`lw_ble_dump`）与引擎诊断（`lw_ble_engine_status`）。 \n \n核心特性：连接永不挂死（全部原生调用在专用 I/O 事件循环上运行，带硬超时）· 下划线工具名兼容广泛 MCP 客户端 · 分层测试体系（76 个用例，含真机回环验证）。 \n \n>工具标识统一使用 `lw_ble_` 前缀与下划线风格：`lw`（lightweight，轻量级）沿用嵌入式领域惯例（如 lwIP），`ble` 明确标注协议为蓝牙低功耗。命名刻意保持独立命名空间，避免与常见 `ble_*` 工具名冲突。 \n \n**lw-ble-mcp** is a lightweight Bluetooth Low Energy (BLE) debug MCP server for AI agents. Built on the MCP Python SDK (FastMCP) and bleak, it exposes 21 tools under the `lw_ble_*` prefix: scan, connect, GATT read/write, descriptor access, MTU query, notification subscription, one-shot device recon (`lw_ble_dump`), and engine diagnostics (`lw_ble_engine_status`). \n \nKey features: connect never hangs (all native calls run on a dedicated I/O event loop with hard timeouts) · underscore tool names for broad MCP-client compatibility · a layered test suite (76 cases, including real-hardware echo-loop verification). \n \n## 设计要点 \n \n| 关注点 | 实现 | \n|---|---| \n| 连接边界保护 | 全部 bleak 调用跑在**独立线程的专用事件循环**上，外层用 `asyncio.wait_for` 包裹，卡死也能真正超时返回 | \n| 客户端兼容性 | 工具名一律用下划线（`lw_ble_scan`），避免点号工具名与部分 MCP 网关冲突 | \n| 错误可诊断 | 区分 `entity_not_found` / `operation_timeout` / `link_not_connected` / `internal_error` 等错误码 | \n| 依赖 | 使用最新的 bleak 3.x | \n \n## 安装 \n \n```powershell \npip install -r requirements.txt \n``` \n \n## 在 Cursor 中配置 \n \n编辑全局 `C:\\Users\\Administrator\\.cursor\\mcp.json`： \n \n```json \n{ \n  \"mcpServers\": { \n    \"ble\": { \n      \"type\": \"stdio\", \n      \"command\": \"D:/DevTools/Python/v314/python.exe\", \n      \"args\": [\"-m\", \"ble_mcp\"] \n    } \n  } \n} \n``` \n \n把 `command` 替换为你实际的 python 路径。配置后重启 Cursor。 \n \n## 工具列表 \n \n### 扫描 \n \n| 工具 | 说明 | \n|---|---| \n| `lw_ble_scan` | 启动后台扫描（支持 name_filter / service_uuid），返回 scan_id | \n| `lw_ble_scan_poll` | 非阻塞获取扫描结果 | \n| `lw_ble_scan_stop` | 提前停止扫描 | \n| `lw_ble_scan_list` | 列出所有扫描 | \n \n### 连接 \n \n| 工具 | 说明 | \n|---|---| \n| `…","publisher":null,"homepage":"https://github.com/zevonlin/lw-ble-mcp","repository":"https://github.com/zevonlin/lw-ble-mcp","version":"0.1.0","license":"Apache-2.0","protocols":["mcp"],"tags":["ble","bluetooth","mcp","gatt","debug"],"pricing":null,"endpoints":[{"url":"pypi:lw-ble-mcp","type":"package_pypi","auth":null,"probeable":false}],"skills":null,"tools":null,"extra":null,"attribution":{"kind":"pypi","name":"pypi","license":"pypi","repoUrl":"pypi","summary":"pypi","version":"pypi","description":"pypi","homepageUrl":"pypi"}},"derived":{"capabilities":[{"slug":"code.debugging","name":"Debugging","confidence":1,"provenance":"declared"},{"slug":"infra.devices","name":"Devices & IoT","confidence":0.802,"provenance":"derived"}],"categories":["code","infra"],"language":"en"},"observed":{"status":"unknown","statusReason":"Distributed as a package to run locally; no network endpoint to check.","lastOkAt":null,"lastProbedAt":null,"statusComputedAt":null,"reliability30d":null,"latestObservations":[],"tools":null,"package":{"name":"lw-ble-mcp","registry":"pypi","observedAt":"2026-11-03T11:24:47.357Z","publishedAt":"2026-08-10T03:01:02.630561Z","latestVersion":"0.1.0"},"toolSurface":null,"endpointFacts":[]},"verification":{"claimed":false,"claimedAt":null,"proofs":[]},"provenance":{"sources":[{"source":"pypi","key":"lw-ble-mcp","url":"https://pypi.org/project/lw-ble-mcp/","firstSeenAt":"2026-09-09T23:26:20.632Z","fetchedAt":"2026-11-03T11:23:32.041Z","normalizedAt":"2026-11-03T11:23:32.041Z"}]},"firstSeenAt":"2026-09-09T23:26:20.632Z","updatedAt":"2026-11-03T11:24:47.357Z"}