ble-mcp-test
Version:
Complete BLE testing stack: WebSocket bridge server, MCP observability layer, and Web Bluetooth API mock. Test real BLE devices in Playwright/E2E tests without browser support.
114 lines (113 loc) • 3.92 kB
JSON
{
"name": "ble-mcp-test",
"version": "0.5.7",
"description": "Complete BLE testing stack: WebSocket bridge server, MCP observability layer, and Web Bluetooth API mock. Test real BLE devices in Playwright/E2E tests without browser support.",
"keywords": [
"mcp",
"model-context-protocol",
"ble",
"bluetooth",
"bluetooth-low-energy",
"web-bluetooth",
"testing",
"mock",
"playwright",
"e2e",
"e2e-testing",
"bridge",
"websocket",
"noble",
"packet-inspection",
"ble-testing",
"web-bluetooth-mock",
"claude",
"ai",
"coding-assistant"
],
"author": "Mike Stankavich <mike@trakrf.id> (https://trakrf.id)",
"license": "MIT",
"homepage": "https://github.com/ble-mcp-test/ble-mcp-test",
"repository": {
"type": "git",
"url": "git+https://github.com/ble-mcp-test/ble-mcp-test.git"
},
"bugs": {
"url": "https://github.com/ble-mcp-test/ble-mcp-test/issues"
},
"engines": {
"node": ">=24.0.0"
},
"publishConfig": {
"access": "public"
},
"type": "module",
"main": "./dist/index.js",
"browser": "./dist/web-ble-mock.bundle.js",
"bin": {
"ble-mcp-test": "dist/start-server.js"
},
"exports": {
".": "./dist/index.js",
"./browser": "./dist/web-ble-mock.bundle.js"
},
"files": [
"dist",
"README.md",
"LICENSE"
],
"scripts": {
"build": "tsc && pnpm run build:browser",
"build:browser": "node scripts/build-browser-bundle.js",
"dev": "tsc --watch",
"start": "node dist/start-server.js",
"start:http": "node dist/start-server.js --mcp-http",
"start:ci": "BLE_MCP_HTTP_TOKEN=test-token node dist/start-server.js --mcp-http",
"start:bg": "nohup node dist/start-server.js > tmp/bridge-server.log 2>&1 & echo $! > tmp/bridge-server.pid",
"stop": "[ -f tmp/bridge-server.pid ] && kill $(cat tmp/bridge-server.pid) && rm tmp/bridge-server.pid || echo 'No server running'",
"restart": "pnpm run stop && pnpm run start:bg",
"status": "[ -f tmp/bridge-server.pid ] && ps -p $(cat tmp/bridge-server.pid) > /dev/null && echo 'Bridge server running (PID: '$(cat tmp/bridge-server.pid)')' || echo 'Bridge server not running'",
"logs": "tail -f tmp/bridge-server.log",
"check:device": "node scripts/check-device-available.js",
"check:health": "node scripts/check-device-available.js && echo '✅ Device is ready for use!'",
"pretest": "node scripts/pre-test-cleanup.js",
"test": "pnpm run pretest && vitest run tests/unit tests/integration",
"test:run": "pnpm run pretest && vitest run",
"test:watch": "vitest",
"test:e2e": "pnpm run pretest && pnpm exec playwright test",
"test:stress": "pnpm run pretest && vitest run tests/stress",
"test:integration": "CHECK_BLE_DEVICE=true pnpm run pretest && vitest run tests/integration",
"test:unit": "pnpm run pretest && vitest run tests/unit",
"test:all": "pnpm run pretest && vitest run && pnpm exec playwright test",
"lint": "eslint src --ext .ts",
"typecheck": "tsc --noEmit",
"clean": "rm -rf dist",
"prepublishOnly": "pnpm run clean && pnpm run build && pnpm exec playwright test"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.0.4",
"@stoprocent/noble": "^2.3.4",
"cors": "^2.8.5",
"express": "^4.18.2",
"ws": "^8.16.0",
"zod": "^3.25.76"
},
"devDependencies": {
"@playwright/test": "^1.40.0",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/jsdom": "^21.1.7",
"@types/node": "^20.11.0",
"@types/supertest": "^6.0.2",
"@types/ws": "^8.5.10",
"@typescript-eslint/eslint-plugin": "^8.37.0",
"@typescript-eslint/parser": "^8.37.0",
"dotenv": "^17.2.1",
"esbuild": "^0.25.8",
"eslint": "^8.56.0",
"jsdom": "^26.1.0",
"playwright": "^1.54.1",
"supertest": "^6.3.4",
"typescript": "^5.3.3",
"vitest": "^1.2.0"
}
}