iOS Web Bluetooth (WebBLE)
MCP server to ship Web Bluetooth on iPhone Safari via the WebBLE extension.
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
@ios-web-bluetooth/mcpclaude mcp add ios-web-bluetooth-webble -- npx -y @ios-web-bluetooth/mcp@0.1.1
{
"mcpServers": {
"ios-web-bluetooth-webble": {
"command": "npx",
"args": [
"-y",
"@ios-web-bluetooth/mcp@0.1.1"
]
}
}
}
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
beacio SDK
Web Bluetooth SDK for iOS Safari. Scan, connect, and talk to BLE devices from any web app.
Packages
| Package | Purpose | Size |
|---|---|---|
@beacio/core | BLE scanning, connecting, GATT read/write/subscribe | ~4KB gzip |
@beacio/core/detect | iOS extension detection + install banner | ~2KB gzip |
@beacio/core/profiles | Typed BLE profiles (heart rate, battery, etc.) | Optional |
@beacio/react | React hooks (useDevice, useCharacteristic) | Optional |
@beacio/mcp | MCP server for AI coding agents + the beacio scaffolding CLI (npx beacio init) | Optional |
Quick Start
npm install @beacio/core
import { initBeacio, isIOSSafari } from '@beacio/core/detect';
import { beacio, BeacioError } from '@beacio/core';
// 1. On iOS Safari, detect the extension and prompt install if missing
if (isIOSSafari()) {
await initBeacio({
operatorName: 'MyApp',
banner: { mode: 'sheet' },
onReady: () => console.log('Extension ready'),
});
}
// 2. Scan and connect (works on iOS Safari + Chrome + Edge)
const ble = new beacio();
const device = await ble.requestDevice({
filters: [{ services: ['heart_rate'] }],
});
await device.connect();
// 3. Read a value
const value = await device.read('heart_rate', 'heart_rate_measurement');
console.log('Heart rate:', value.getUint8(1));
// 4. Subscribe to notifications
const unsub = device.subscribe('heart_rate', 'heart_rate_measurement', (v) => {
console.log('Heart rate:', v.getUint8(1));
});
// 5. Clean up
unsub();
await device.disconnect();
For plain HTML (no bundler):
<script src="https://beacio.com/beacio.js"></script>
الأسئلة الشائعة
ما هو iOS Web Bluetooth (WebBLE)؟
MCP server to ship Web Bluetooth on iPhone Safari via the WebBLE extension.
كيف أثبّت iOS Web Bluetooth (WebBLE)؟
يعمل على جهازك. في Claude Code: claude mcp add ios-web-bluetooth-webble -- npx -y @ios-web-bluetooth/mcp@0.1.1. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج iOS Web Bluetooth (WebBLE) إلى مفتاح API؟
لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.
هل iOS Web Bluetooth (WebBLE) مفتوح المصدر؟
شيفرته علنية على GitHub، لكن المستودع لا يعلن ترخيصًا قياسيًا.
من يصون iOS Web Bluetooth (WebBLE)؟
ينشره wklm. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.