localsend-mcp
This MCP server lets AI assistants discover and securely exchange files, folders, and text snippets with devices on the local network using the LocalSend protocol.
Discover devices: Scan LAN for active LocalSend peers (alias, IP, model) with
localsend_devices.Send files/folders: Transfer files or directories to a target device by alias or IP via
localsend_send.Send text/clipboard: Push code snippets, notes, or commands directly without writing files.
Receive files: Accept incoming transfers from phones/devices and save them to a local inbox (
localsend_historylists received files).Check status: View local IPs, listening port, TLS fingerprint, and inbox stats (
localsend_status).Configure server: Change broadcast alias, download directory, or transport protocol (
localsend_setup).
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@localsend-mcp discover nearby devices and send the PDF to my phone"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
LocalSend MCP Server (localsend-mcp)
A high-performance, zero-external-dependency Model Context Protocol (MCP) server that connects AI assistants (Google Antigravity, Claude Desktop, Cursor) directly to physical devices across your local Wi-Fi / LAN using the LocalSend protocol.
⚡ Key Capabilities
Bidirectional Local P2P Sharing:
Outbound (AI Agent $\rightarrow$ Device): Deliver generated artifacts, code files, research papers, and images directly to smartphones, tablets, and laptops.
Inbound (Device $\rightarrow$ AI Agent): Send photos, voice memos, logs, or documents from your phone directly into the agent's download folder.
Recursive Folder Hierarchy Preservation: Automatically maps and retains directory trees using normalized relative paths (e.g.
Folder/sub/file.mp4), enabling destination devices (like Android and iOS) to recreate and nest the full folder structure upon receipt.Direct Text & Clipboard Push: Send code snippets, terminal commands, or notes straight to target devices without writing temporary files to disk.
LAN Auto-Discovery: Finds active LocalSend peers via UDP multicast (
224.0.0.167:53317) and catches HTTP registration handshakes.Desktop App Co-existence: Runs a persistent background listener on port
53318so both the official LocalSend desktop application (53317) and this MCP server run seamlessly together on the same machine.Clean LocalSend Favoriting: Actively responds to
POST /api/localsend/v2/registerwith200 OK, allowing mobile and desktop LocalSend apps to favorite/star the agent without connection errors.In-Process X.509 Cryptography: Generates TLS keys and ASN.1 DER certificates purely in-memory using Node.js crypto—no external
opensslbinary required on Windows, Linux, or macOS.
Related MCP server: filesystem-mcp
🛠️ MCP Tools Exposed
Tool | Parameters | Description |
|
| Scans the Wi-Fi/LAN for online LocalSend peers, returning their alias, IP, port, and device model. |
|
| Sends files, directories, or direct text snippets to a peer by alias or IP. |
| none | Displays local network IPs, active listening port, fingerprint, and inbox statistics. |
| none | Lists files received into the agent's download directory. |
|
| Configures the broadcast alias, auto-save directory, and transport protocol. |
🚀 Installation & Build
cd F:\Aaradhya-Dev-Tamrakar\localsend-mcp
# Install dependencies
npm install
# Compile TypeScript to dist/
npm run build🔄 Automated Git Synchronization (sync.ps1)
The repository includes a dedicated PowerShell synchronization script that enforces pre-commit secret scans, automatically recompiles TypeScript when source files change, and formats conventional commits:
# Routine build, commit, and push
.\sync.ps1
# Custom commit message
.\sync.ps1 -m "feat(localsend): add automatic clipboard sync"
# Safe rebase pull only
.\sync.ps1 -PullOnly
# Dry-run mode (preview without changing git state)
.\sync.ps1 -WhatIf⚙️ Configuration
Antigravity (mcp_servers configuration)
Add localsend-mcp to your Antigravity MCP settings:
{
"mcpServers": {
"localsend": {
"command": "node",
"args": ["F:\\Aaradhya-Dev-Tamrakar\\localsend-mcp\\dist\\index.js"]
}
}
}Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"localsend": {
"command": "node",
"args": ["F:\\Aaradhya-Dev-Tamrakar\\localsend-mcp\\dist\\index.js"]
}
}
}🧪 Usage Examples
1. Discover Devices on LAN
{
"name": "localsend_devices",
"arguments": {
"timeoutSeconds": 3
}
}2. Send an Artifact or Report to Your Phone
{
"name": "localsend_send",
"arguments": {
"to": "V2029",
"files": ["F:\\Aaradhya-Dev-Tamrakar\\brainstorm\\report\\main.pdf"]
}
}3. Push a Code Snippet Directly to Clipboard
{
"name": "localsend_send",
"arguments": {
"to": "SFG16",
"text": "Get-Process localsend_app | Select-Object Id, ProcessName",
"textFileName": "inspect.ps1"
}
}4. Check Inbox for Files Sent From Mobile
{
"name": "localsend_history",
"arguments": {}
}🔒 Security & Privacy
100% Local: No internet connection, cloud servers, or third-party relays are used. All network packets stay strictly within your local subnet.
Mutual TLS (mTLS): All transfers use TLS encryption with client certificate presentation matching the LocalSend v2 specification.
Path Traversal Protection: Remote file names are sanitized to prevent directory traversal attacks.
📄 License
MIT © Aaradhya Dev Tamrakar
Available Tools
5 toolslocalsend_devicesA
Scan the local Wi-Fi/LAN for active LocalSend devices and list their aliases, IPs, and models.
Inputs: timeoutSeconds.
localsend_historyA
List incoming files received by the LocalSend MCP server inbox.
Inputs: no named parameters.
localsend_sendA
Send files, folders, or direct text/clipboard snippets to a LocalSend device on LAN by alias or IP.
Inputs: to (required), pin, port, text, +4 more.
localsend_setupC
Update LocalSend MCP server configuration (alias, download directory, or transport).
Inputs: alias, downloadDir.
localsend_statusA
Inspect local network addresses, active MCP listening port, certificate fingerprint, and inbox status.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct concern: device discovery, sending, server status, receiving history, and configuration. There is no overlap or ambiguity between tools.
Names consistently use a localsend_ prefix and snake_case. However, not all follow a strict verb_noun pattern—devices, status, and history are nouns while send and setup are verbs—so it is mostly consistent with minor deviation.
Five tools is well-scoped for a focused LocalSend integration. Each tool covers a necessary capability without redundancy or bloat.
The set covers the full local workflow: discovering devices, sending content, checking server status, reviewing received files, and updating configuration. No major gaps are apparent for the stated purpose.
Maintenance
Related MCP Connectors
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Reach your own computers from any AI app: files, commands, screen and mouse, approvals and alerts.
Send encrypted files and secrets, collect files and get documents signed, from your AI.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with Anytype data through the local API, allowing search, creation, modification, and export of objects, spaces, and lists.1824MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to read, write, and manage files on the local system with security features like path restrictions and optional read-only mode.92MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to discover and control IoT devices on local networks and via Bluetooth LE.71MIT
- AlicenseBqualityBmaintenanceEnables sending files to LocalSend devices on the local network by scanning for devices and sending files using the LocalSend v2 protocol.2MIT