Skip to content
localsend-mcp logo

LocalSend MCP Skill

localsend-mcp

LocalSend-based P2P transfer with MCP server design for NATS/Tailscale discovery and throughput tuning.

SKILL.md

Full skill instructions

LocalSend MCP Skill

Use This Skill When

  • The user mentions LocalSend, AirDrop-like transfer, or peer-to-peer file sharing.
  • The task asks for an MCP server or tool set around LocalSend.
  • Discovery/​advertising needs to use NATS or Tailscale before transferring data.

Reality Check (LocalSend in This Repo)

  • localsend (Flox package) launches a GUI and does not exit for --help.
  • Discovery uses UDP multicast 224.0.0.167:53317 (LAN only).
  • Transfer runs HTTPS on port 53317; direct IPs are required across subnets.
  • For headless automation, prefer a CLI client (e.g., jocalsend) or a small protocol wrapper.

Architecture: Advertise -> Negotiate -> Transfer -> Tune

  1. Advertise capabilities over NATS (or Tailscale if LAN multicast is blocked).
  2. Negotiate transport and parameters (LAN multicast vs direct IP).
  3. Transfer via LocalSend protocol/​CLI.
  4. Tune throughput until spectral gap <= 0.25 (>= 75% of target throughput).

MCP Tool Set (Draft)

Discovery / Advertising

  • localsend_advertise:
    • Inputs: agent_id, device_name, localsend_port, tailscale_ip?, capabilities, spectral_gap_target
  • localsend_list_peers:
    • Inputs: source = localsend_multicast | nats | tailscale

Session Negotiation

  • localsend_negotiate:
    • Inputs: peer_id, preferred_transport, max_chunk_bytes, max_parallel
    • Output: session_id, transport, target_ip, port

Transfer

  • localsend_send:
    • Inputs: session_id, file_path, chunk_bytes, parallelism
  • localsend_receive:
    • Inputs: session_id, dest_dir, accept

Throughput Tuning

  • localsend_probe:
    • Inputs: session_id, probe_bytes, probe_parallelism
    • Output: throughput_bps, rtt_ms, loss_rate
  • localsend_session_status:
    • Inputs: session_id
    • Output: bytes_sent, bytes_received, throughput_bps, spectral_gap

Spectral Gap Heuristic (Practical)

Define:

spectral_gap = 1.0 - (observed_throughput / target_throughput)

Stop tuning when spectral_gap <= 0.25.

Tuning Loop:

  1. Start chunk_bytes = 256KB, parallelism = 1
  2. Increase parallelism to 2, 4, 8 while loss < 1%
  3. Increase chunk size up to 1MB while RTT stable
  4. Recompute spectral gap each step

Integration Points in This Repo

  • NATS broadcast helpers: lib/​synadia_broadcast.rb
  • Tailscale patterns: lib/​tailscale_file_transfer_skill.rb
  • MCP server reference: mcp_unified_server.py

Implementation Notes

  • Avoid assuming LocalSend has a stable CLI; verify with jocalsend --help if installed.
  • If multicast discovery fails (Tailscale), use NATS to exchange target_ip + port.
  • Keep tool outputs structured; avoid dumping large blobs through MCP.

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View