npm @beacio/mcpstdioupdated 14d ago
Web Bluetooth SDK for iOS Safari. Scan, connect, and talk to BLE devices from any web app.
What can you do with beacio?
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>
Error Handling
All errors are BeacioError instances with a typed code and a human-readable suggestion:
try {
const device = await ble.requestDevice({
filters: [{ services: ['heart_rate'] }],
});
await device.connect();
} catch (err) {
if (err instanceof BeacioError) {
console.log(err.code); // e.g. 'DEVICE_NOT_FOUND'
console.log(err.suggestion); // 'No matching devices in range'
}
}
AI Agent Integration
MCP server for coding agents (Claude Code, Cursor, Copilot):
npx -y @beacio/mcp
Full SDK reference for LLM context: https://beacio.com/llms-full.txt
Documentation
Each package has its own README with full API reference:
- SDK wiki -- curated getting-started guides, troubleshooting, and background sync usage
@beacio/coreREADME -- scanning, connecting, GATT operations, error codes@beacio/core/detectREADME -- extension detection, install banners, React provider@beacio/reactREADME -- React hooks, provider setup, and UI components
Wiki
Versioning
Every package here is released in lockstep with the beacio iOS app: the npm version is always identical to the App Store release version.
@beacio/core@2.1.0 is the JavaScript for beacio 2.1.0 on the App Store —
there is no compatibility matrix to consult. The packages are the JS half of a
native product (they talk to the Safari Web Extension over a wire whose shape is
fixed by the shipped app), so a single number describes both halves.
A consequence worth knowing: SDK-only fixes ship with the next app release rather than on their own.
Agent Skills
This repo also serves the beacio agent skills, indexed in SKILLS.md:
npx skills add https://github.com/wklm/beacio-sdk
License
Proprietary. See individual package licenses.
Install
Add beacio to your client. Pick the one you use.
claude mcp add mcp -- npx -y @beacio/mcpcodex mcp add mcp -- npx -y @beacio/mcpamp mcp add mcp -- npx -y @beacio/mcp{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@beacio/mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@beacio/mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp","command":"npx","args":["-y","@beacio/mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@beacio/mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@beacio/mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp": {
"command": "npx",
"args": [
"-y",
"@beacio/mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@beacio/mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"@beacio/mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @beacio/mcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation16/25
- Maintenance19/25
- Trust6/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 6 days ago
- Has a release history
- Repository is not archived
- No licence detected
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 1.0.1Latest | Jun 14, 2026 |