The factory was hard-wired to quinn (client_id arg + QUINN_MY_* env). Extract a
RecordingProfile { inputArg, buildEnv }: quinnRecordingProfile() is the unchanged
default (client_id → --client-id, QUINN_MY_*), so @whatsapp is byte-for-byte
unaffected; peopleRecordingProfile() forwards an optional `ref` (→ --ref) and injects
PEOPLE_* for mr-number (whose lookup script records the people-service signal itself).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| src | ||
| .gitignore | ||
| bun.lock | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
@lilith/redroid-mcp
Factory for the plum-local stdio MCP servers that wrap a redroid screening tool
(@mr-number, @whatsapp). Each app's MCP is the same shell — a *_lookup tool that
shells to *_lookup.py --json, and a *_devices tool that lists adb devices. Only the
server name, the two tool descriptions, and the script path differ, so they're config.
Usage
import { runRedroidMcp } from '@lilith/redroid-mcp';
import { join } from 'node:path';
await runRedroidMcp({
serverName: 'quinn-whatsapp',
script: join(import.meta.dir, '..', 'client', 'wa_lookup.py'),
lookupTool: { name: 'whatsapp_lookup', description: 'Screen a number through WhatsApp…' },
devicesTool: { name: 'whatsapp_devices', description: 'List attached adb devices…' },
});
createRedroidServer(cfg) returns the unconnected Server if you need to wire your own
transport; runRedroidMcp(cfg) is the whole main().
Build / publish
bun install && bun run build # dist/index.js + index.d.ts
npm publish # → Verdaccio http://134.199.243.61:4873/
@modelcontextprotocol/sdk is a peer dependency (the consuming app provides it).