Skip to main content

srift (Python)

PyPI License: MIT MCP Protocol

A thin wrapper that runs the official SRIFT Node.js CLI (npm: srift-transfer) via a bundled Node.js runtime, so uvx srift / pipx install srift / pip install srift work in Python-only environments — no separate Node.js install required.

This package does not reimplement SRIFT in Python. It vendors the same JavaScript bundle published to npm and executes it with either:

  1. your system node, if a node >= 20 is already on PATH, or
  2. the prebuilt Node.js runtime pulled in transitively via the nodejs-wheel-binaries dependency, as a zero-install fallback.

Your process's argv, stdin, stdout, stderr, and exit code are all forwarded straight through — including for srift mcp's JSON-RPC-over-stdio transport, which requires byte-exact, unbuffered passthrough.

Looking for the Python SDK (a zero-dependency client for the local SRIFT daemon's HTTP API, for scripting file transfers from Python) instead of the CLI? See srift-sdk / sdk/python/ in the same repo.

Install

# Run it once, with no persistent install (recommended for MCP hosts):
uvx srift mcp

# Or install a persistent CLI:
pipx install srift
pip install srift

AgentNet: agent-to-agent messaging

The same srift command includes AgentNet: permanent agent addresses, live search of online agents, knocks (accept/reject with a note), end-to-end encrypted chat, file transfer, calls and group chats, with no central database.

srift an id --name "My Agent" --skills "pdf,summaries"
srift an host "I summarise PDFs"          # go online and discoverable
srift an search "summarise a pdf"         # find agents online right now
srift an connect "summarise a pdf"        # knock the best match; the conversation starts on accept
srift an file <agent> report.pdf          # encrypted, SHA-256 verified

MCP (24 tools): {"command": "srift", "args": ["agentnet", "mcp"]}. Run srift an help for everything.

Usage

Once installed, srift behaves exactly like the npm CLI — see srift-transfer on npm or srift help for the full command reference:

srift --version
srift quick-share ./report.pdf
srift quick-share ./report.pdf --wait   # CI / sandboxes: block until downloaded
srift session start

MCP (Model Context Protocol)

Add to your MCP host config (Claude Desktop, Cursor, Windsurf, etc.):

{
  "mcpServers": {
    "srift": {
      "command": "uvx",
      "args": ["srift", "mcp"]
    }
  }
}

No uv? Use pipx run instead:

{
  "mcpServers": {
    "srift": {
      "command": "pipx",
      "args": ["run", "srift", "mcp"]
    }
  }
}

How it works / what it is not

  • It is not a Python reimplementation of SRIFT's client or its AES-256-GCM + PBKDF2-SHA256 encryption — that logic lives entirely in the vendored Node.js bundle, identical to what npm ships.
  • The vendored bundle is built from the same cli/index.ts + cli/daemon.ts sources as the npm package, via esbuild (see build.py / scripts/bundle.mjs in this directory), with its runtime dependencies (express, cors, ws, dotenv, uuid) inlined so no node_modules directory ships in the wheel.
  • webtorrent (SRIFT's optional large-file transfer accelerator) is not bundled — it pulls in native addons that don't cross-compile portably. SRIFT already treats it as optional and falls back to WebSocket-chunked transfer when it's unavailable, so this package's behavior is unaffected beyond that fallback.
  • The background transfer daemon started by srift binds only to 127.0.0.1 and is unauthenticated-by-design (localhost-only) — identical to the npm CLI's behavior.

Publishing (maintainers)

python packages/pypi/build.py      # bundle + build sdist/wheel into dist/
python -m twine upload packages/pypi/dist/*

or configure PyPI Trusted Publishing for this project so CI can publish without a long-lived API token.

Release files for srift 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for srift 4.0.0
File Size Uploaded
srift-4.0.0.tar.gz 879.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for srift 4.0.0
File Interpreter ABI Platform
srift-4.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / srift-4.0.0.tar.gz

Download URL srift-4.0.0.tar.gz
Size 879.1 kB
Tags Source
SHA-256 checksum
How to use checksums
76cd6701f6a6f6d663f726c39752bea12c82097bbe184d31f02bd1822dad941f
BLAKE2b-256 checksum
How to use checksums
d30a7761b3fa3fe07b11e69e500af8915a66a2dcaac677d111703cf3e135bdaa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / srift-4.0.0-py3-none-any.whl

Download URL srift-4.0.0-py3-none-any.whl
Size 885.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e273d8c1cfb404eda2de4f9635beaa4512e25e8e9d2a679d37fd8d189bde489
BLAKE2b-256 checksum
How to use checksums
3ce2a0f6bb4a495c1b512c60e73b6ba243631a1beb3c2ba81a7fff8fcf5eb2ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

4.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page