radio-faf
v0.1.1
Published
Radio Protocol client for RadioFAF — AI Context Broadcasting via WebSocket. Built for Bun.
Maintainers
Readme
radio-faf
Radio Protocol client for RadioFAF — AI Context Broadcasting via WebSocket.
Broadcast once, every AI receives. Zero drift.
Install
npm install radio-fafQuick Start
import { Radio } from 'radio-faf';
const radio = new Radio('wss://mcpaas.live/beacon/radio');
await radio.connect();
// Tune to your project's frequency
await radio.tune('91.0');
// Your context arrives — from any AI, any session
radio.onBroadcast((frequency, context) => {
console.log(`Context update on ${frequency} FM:`, context);
});That's it. Your context persists. Zero drift.
How It Works
MCPaaS uses the Radio Protocol — broadcast once, every AI receives.
Traditional (the tax):
You → Claude (send 50KB context)
You → Grok (send 50KB again)
You → Gemini (send 50KB again)
= 3x cost, 3x latency, context drift
Radio Protocol (the fix):
You → Broadcast to 91.0 FM (send once)
Claude ← tuned to 91.0
Grok ← tuned to 91.0
Gemini ← tuned to 91.0
= 1x cost, instant, zero driftMulti-AI Example
import { Radio } from 'radio-faf';
const claude = new Radio('wss://mcpaas.live/beacon/radio');
const grok = new Radio('wss://mcpaas.live/beacon/radio');
const gemini = new Radio('wss://mcpaas.live/beacon/radio');
await Promise.all([claude.connect(), grok.connect(), gemini.connect()]);
await Promise.all([claude.tune('91.0'), grok.tune('91.0'), gemini.tune('91.0')]);
// All three AIs now share the same context, in real time
claude.onBroadcast((f, ctx) => console.log('Claude:', ctx));
grok.onBroadcast((f, ctx) => console.log('Grok:', ctx));
gemini.onBroadcast((f, ctx) => console.log('Gemini:', ctx));API
Constructor
const radio = new Radio(url: string, options?: {
reconnect?: boolean; // Auto-reconnect (default: true)
maxReconnectAttempts?: number; // Max attempts (default: 5)
reconnectDelay?: number; // Delay in ms (default: 1000)
heartbeatInterval?: number; // Ping interval (default: 30000)
debug?: boolean; // Debug logging (default: false)
});Methods
| Method | Description |
|--------|-------------|
| connect() | Connect to MCPaaS |
| tune(frequency) | Subscribe to a frequency |
| untune(frequency) | Unsubscribe from a frequency |
| disconnect() | Disconnect |
| getState() | 'DISCONNECTED' | 'CONNECTING' | 'CONNECTED' | 'RECONNECTING' | 'CLOSED' |
| getTunedFrequencies() | Set of tuned frequencies |
Events
| Event | Callback |
|-------|----------|
| onBroadcast(fn) | (frequency, context) => void |
| onConnect(fn) | () => void |
| onDisconnect(fn) | (code?, reason?) => void |
| onError(fn) | (error) => void |
| onTuned(fn) | (frequency) => void |
| onUntuned(fn) | (frequency) => void |
Why Bun?
Anthropic acquired Bun in December 2025. Bun now powers Claude Code. This library is built for Bun first — native TypeScript, 7x faster WebSockets, zero config.
Namepoints
Every frequency maps to a namepoint on MCPaaS — your permanent AI identity.
Free namepoints work. But yourname.mcpaas.live hits different than user-38291.mcpaas.live.
Claim yours before someone else does: mcpaas.live/claim
If radio-faf has been useful, consider starring the repo — it helps others find it.
License
MIT
Built by Wolfe James | Powered by MCPaaS | Format: FAF
