S2 Sdk Typescript logo

S2 Sdk Typescript

by s2-streamstore

Connects TypeScript applications and agents to S2.dev for durable stream storage, appends, reads, and ordered session-based processing.

Install S2 Sdk Typescript

Pick your client, then add it in one click or paste the config.

No confirmed install command yet

We only publish a config when the install details come from the project itself — its README, its docs, or a verified owner. We haven’t found those for s2-streamstore/s2-sdk-typescript, and we’d rather show nothing than a guess you’d paste into your client.

Open setup steps on GitHub

Overview

s2-streamstore/s2-sdk-typescript provides the official TypeScript integration for S2.dev, a managed service for durable streams. It wraps S2's REST API with basin and stream clients for creating streams, appending string or binary records, reading by sequence number or timestamp, and following live updates. Reach for it when an application or agent needs durable event-style storage with batching, append sessions, or producer-based throughput controls.

Use cases

  • Store durable application events in named streams
  • Append ordered batches with backpressure
  • Read records from a sequence number or timestamp
  • Batch high-throughput writes with a producer

Key features

  • Basin and stream management
  • String and binary record appends
  • Sequence- and timestamp-based reads
  • Ordered append sessions
  • Configurable producer batching
  • Read sessions and live stream following

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

96/96 checks healthy over the last 15d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars35Stargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Directory activity51 viewsConfig copies, upvotes, and views on AllMCPs.

How S2 Sdk Typescript works

What s2-streamstore/s2-sdk-typescript does

The repository contains S2's official TypeScript SDK for its serverless stream platform. S2 organizes streams inside basins, which act as namespaces for stream-level and account-level operations. Applications can create and manage basins and streams, then use stream clients to write and read records.

Records are durable, ordered entries with assigned sequence numbers and timestamps. The SDK accepts both text and binary payloads, along with optional headers. Reads can begin at a sequence number or timestamp and can be bounded by limits such as a record count. Stream consumers can also follow new data as it arrives.

The package is published as @s2-dev/streamstore and provides higher-level abstractions over the S2 REST API.

How it works

Create an S2 client with the S2 environment configuration and an access token. Selecting a basin produces a basin client for namespace-level operations; selecting a stream from that basin produces a stream client for data-plane work.

A direct append accepts an AppendInput containing one or more AppendRecord values. The append acknowledgement identifies the range of records and resolves once the data is durable. Records can be constructed from strings or byte arrays, so a single batch may contain mixed payload types.

For ordered, pipelined writes, an AppendSession keeps submitted batches in order while allowing multiple pending submissions. Its inflight-byte limit provides backpressure, and returned tickets can be used to wait for durability. The Producer API combines an append session with a configurable batch transform that collects records before submission. This is intended for writers that need larger batches and higher throughput.

Read operations can be issued individually or through read sessions when consuming more than one response batch.

Setup and configuration

Install the package with npm, Yarn, or Bun:

Terminal
npm add @s2-dev/streamstore

Create an S2 account, obtain an access key from the dashboard, and create a basin. Set the credentials before running an application:

server.ts
export S2_ACCESS_TOKEN="<token>"
export S2_BASIN="<basin>"

Examples may also use S2_STREAM to select a stream. The repository includes runnable examples and a browser example for experimenting with the SDK directly from a web page. Tests run with bun run test.

Tools and capabilities

  • Create and manage basins, streams, and granular access tokens through account and basin APIs.
  • Append batches containing text or binary records with optional headers.
  • Read records using sequence-number or timestamp coordinates.
  • Follow stream updates and consume data through read sessions.
  • Preserve append ordering with pipelined append sessions.
  • Batch records automatically with configurable linger time and maximum record counts.
  • Inspect durability acknowledgements, sequence numbers, and append ranges.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about S2 Sdk Typescript

s2-streamstore/s2-sdk-typescript is an MCP server that connects agent workflows to S2.dev, a managed serverless platform for durable streams. Its main operations cover basin and stream management, appending string or binary records, reading by sequence number or timestamp, following live updates, and using ordered append or read sessions.

Install it as the `@s2-dev/streamstore` package with `npm add @s2-dev/streamstore`, or use the equivalent Yarn or Bun command. The repository also includes runnable TypeScript examples and a browser example.

Set `S2_ACCESS_TOKEN` to an S2 access key and `S2_BASIN` to an existing basin name before running the application. Examples can additionally set `S2_STREAM` when they need a specific stream.

Use `Producer` with an `AppendSession` and `BatchTransform` to accumulate records into configurable batches. Append sessions preserve submission order, allow pipelining, and apply backpressure through a maximum inflight-byte setting.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewS2 Sdk Typescript AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/s2-streamstore-s2-sdk-typescript?style=directory)](https://allmcps.com/mcp/s2-streamstore-s2-sdk-typescript)
HTML Embed
<a href="https://allmcps.com/mcp/s2-streamstore-s2-sdk-typescript"><img src="https://allmcps.com/api/badge/s2-streamstore-s2-sdk-typescript?style=directory" alt="S2 Sdk Typescript on AllMCPs" /></a>