You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

fluxprotocol-sdk

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluxprotocol-sdk

Universal AI Connectivity - 4 lines, zero learning curve

latest
Source
npmnpm
Version
0.0.8
Version published
Maintainers
1
Created
Source

fluxprotocol-sdk

Universal AI Connectivity - Build connectors in 4 lines. 40% fewer tokens with TOON.

Install

npm install fluxprotocol-sdk

Quick Start

import { connector, method, FluxServer, StdioTransport } from 'fluxprotocol-sdk';

@connector('weather')
class WeatherConnector {
  @method()
  async getWeather(city: string) {
    return { city, temp: 22, desc: 'Sunny' };
  }
}

const server = new FluxServer(WeatherConnector);
server.setTransport(new StdioTransport(server));
server.start();

Transports

import { StdioTransport, HttpTransport, WebSocketTransport } from 'fluxprotocol-sdk';

new StdioTransport(server);                     // MCP (Claude Desktop)
new HttpTransport(server, { port: 3000 });      // REST API + TOON
new WebSocketTransport(server, { port: 3001 }); // Real-time

Decorators

import { cache, rateLimit, retry, config } from 'fluxprotocol-sdk';

@method()
@cache({ ttl: 60000, maxSize: 100 })          // LRU cache with 1min TTL
@rateLimit({ requests: 100, window: '1m' })   // 100 requests per minute
@retry({ attempts: 3, backoff: 'exponential' }) // Auto-retry with backoff
async myMethod() { ... }

TOON Format Support

HTTP transport supports TOON format for 40% token reduction:

  • Accept: application/toon → TOON response
  • Accept: application/json → JSON response (default)
  • fluxprotocol-cli - CLI tools
  • fluxprotocol-client - HTTP/WebSocket client

License

MIT

Keywords

ai

FAQs

Package last updated on 11 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts