MCP for AI assistants
LAN Share comes with a Model Context Protocol server. Add it to Claude, Codex, Cursor or any other MCP client, and the assistant can see your computers, check why one does not answer, and send files, folders and text in plain words, while the files still go straight across your network.
How it works#
An MCP server is a small program your assistant starts on your own computer and talks to over standard input and output. LAN Share's is the lanshare command itself: lanshare mcp. It offers the assistant a set of tools, the assistant decides when to call them, and LAN Share does the actual work, exactly as if you had clicked it in the app.
- Your assistantClaude, Codex, Cursor, VS Code…
- lanshare mcpon this computer, JSON-RPC over stdio
- Your networkencrypted, direct, TCP 45821
- The other computera person accepts the transfer
- Nothing goes through a server of ours. No account, no upload, no API key. The MCP server runs locally and sends directly to the other computer.
- The receiver stays in control. Every transfer is offered and must be accepted on the other side, unless that computer already trusts yours.
- Same settings as the app. The tools read and write the same hosts, groups, history and settings as the LAN Share window and the
lansharecommand.
File contents never pass through the assistant: LAN Share reads the files and sends them. What the assistant sees is what the tools return: host names, addresses, paths, file names and sizes. Like anything else in the conversation, that goes to the company that runs your assistant's model.
Full and built-in mode#
There are two ways to connect. Most people use full mode. The built-in mode exists for the Mac App Store version, where it is the only one, and for anyone who wants the assistant on a short leash.
Full: lanshare mcp | Built-in (Mac app) | |
|---|---|---|
| Available in | Every download from lanshare.io (macOS DMG, Ubuntu, Windows); not the Mac App Store version | The Mac app, from the DMG and from the Mac App Store: Settings → CLI and MCP → Built-in (App Store: Settings → AI assistants → Built-in) |
| The client runs | lanshare mcp | /Applications/LAN Share.app/Contents/MacOS/lanshare-mcp (no arguments) |
| Sends from | Any file you can read | Only the Allowed folders you pick, and the receive folder |
| Sends to | Saved hosts and any typed address | Saved hosts only |
| Hosts and groups | Can add, edit and remove them | Read only: change them in the app |
web_share (phone link) | Yes | No |
| Tools | 19 | 12 (no host or group changes, no web_share) |
| The app | Need not run | lanshare-mcp connects to the app and opens it in the background if it is not running. If Built-in is off, the client gets a single stand-in status tool that says how to turn it on. |
On a Mac with the DMG from lanshare.io, Settings → CLI and MCP has three choices: Off, Built-in and Full, with the exact command to paste for each; it starts in Full. In the App Store version the page is called AI assistants and has only Off and Built-in; it starts in Off, so pick Built-in. With Built-in, the page shows Waiting for an assistant or how many are connected.
Off and Built-in govern only the app's built-in server. lanshare mcp is a separate program: it works whenever a client starts it. To stop an assistant from using it, remove LAN Share from that client. An organisation can switch MCP off for everyone with "disable": ["mcp"].
The Mac App Store version has no lanshare command (App Store rules), so full mode needs the DMG from lanshare.io. Don't install both on one Mac; see editions.
Set up your assistant#
1. Find the command#
MCP clients start the server themselves, usually without your shell's PATH, so give them the absolute path:
| Your LAN Share | command | args |
|---|---|---|
| macOS, DMG (full) | /Applications/LAN Share.app/Contents/MacOS/lanshare-cli | ["mcp"] |
| macOS, built-in mode | /Applications/LAN Share.app/Contents/MacOS/lanshare-mcp | none |
| Ubuntu / Debian (.deb) | /usr/bin/lanshare | ["mcp"] |
| Windows (zip) | lanshare.exe in the folder you unpacked, for example C:\Users\you\AppData\Local\Programs\LAN Share\lanshare.exe | ["mcp"] |
The path has a space in it on macOS and Windows: keep the quotes in the commands below. On Windows, use the folder you unpacked the zip into; the examples assume %LOCALAPPDATA%\Programs\LAN Share, as the install guide suggests.
2. Add it to your client#
One command; --scope user makes LAN Share available in every project.
$ claude mcp add --scope user lanshare -- "/Applications/LAN Share.app/Contents/MacOS/lanshare-cli" mcp$ claude mcp add --scope user lanshare -- "/Applications/LAN Share.app/Contents/MacOS/lanshare-mcp"$ claude mcp add --scope user lanshare -- /usr/bin/lanshare mcp$ claude mcp add --scope user lanshare -- "$env:LOCALAPPDATA\Programs\LAN Share\lanshare.exe" mcpCheck it with claude mcp list, or type /mcp in a session: lanshare should be connected with its tools listed.
In Claude Desktop: Settings → Developer → Edit Config. That opens claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\). Add LAN Share under mcpServers, then quit Claude Desktop completely and start it again.
{
"mcpServers": {
"lanshare": {
"command": "/Applications/LAN Share.app/Contents/MacOS/lanshare-cli",
"args": ["mcp"]
}
}
}{
"mcpServers": {
"lanshare": {
"command": "/Applications/LAN Share.app/Contents/MacOS/lanshare-mcp"
}
}
}{
"mcpServers": {
"lanshare": {
"command": "C:\\Users\\you\\AppData\\Local\\Programs\\LAN Share\\lanshare.exe",
"args": ["mcp"]
}
}
}If the file already has other servers, add "lanshare": {…} next to them inside the same mcpServers. In JSON, every backslash in a Windows path is written twice.
Codex reads ~/.codex/config.toml. A send waits until the person on the other side accepts (up to 3 minutes), longer than Codex waits for a tool by default, so raise tool_timeout_sec.
[mcp_servers.lanshare] command = "/Applications/LAN Share.app/Contents/MacOS/lanshare-cli" args = ["mcp"] # a send waits for the receiver to accept, then for the transfer tool_timeout_sec = 600
[mcp_servers.lanshare] command = "/usr/bin/lanshare" args = ["mcp"] tool_timeout_sec = 600
[mcp_servers.lanshare] command = 'C:\Users\you\AppData\Local\Programs\LAN Share\lanshare.exe' args = ["mcp"] tool_timeout_sec = 600
Start a new codex session; /mcp lists the servers it connected to. (In TOML, a path in single quotes needs no doubled backslashes.)
Put this in ~/.cursor/mcp.json (all projects) or .cursor/mcp.json in one project. Cursor shows the server under Settings → MCP, where you can switch it on and see its tools.
{
"mcpServers": {
"lanshare": {
"command": "/usr/bin/lanshare",
"args": ["mcp"]
}
}
}For GitHub Copilot's agent mode: .vscode/mcp.json in a workspace, or the MCP: Add Server command for your user settings. Note the key is servers here, not mcpServers.
{
"servers": {
"lanshare": {
"type": "stdio",
"command": "/Applications/LAN Share.app/Contents/MacOS/lanshare-cli",
"args": ["mcp"]
}
}
}Any client that can start a stdio MCP server works: give it the command from step 1 and the argument mcp. For the curious and for client authors:
- Newline-delimited JSON-RPC 2.0 on stdin/stdout; logs go to stderr only.
- Protocol versions
2025-06-18,2025-03-26and2024-11-05(the client's choice when it asks for one of them; otherwise the newest). - Methods:
initialize,ping,tools/list,tools/call. The capability istools; the server'sinstructionsexplain targets and the 3-minute acceptance wait. - Calls run in parallel, so a long send does not block a
list_hostsmeanwhile.
Try it by hand, without any client:
$ printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18"}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"check_host","arguments":{"target":"10.0.0.20"}}}' \
| lanshare mcp{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{}},"instructions":"LAN Share sends folders and files directly to other computers on the local network. …","protocolVersion":"2025-06-18","serverInfo":{"name":"lanshare","version":"0.9.0"}}}
{"id":2,"jsonrpc":"2.0","result":{"content":[{"text":"{\n \"address\": \"10.0.0.20\",\n \"alt_addresses\": [],\n \"name\": \"10.0.0.20\",\n \"online\": true\n}","type":"text"}],"isError":false}}3. Try it#
Ask something harmless first, such as Which of my LAN Share computers are online?
The assistant should call list_hosts and answer with your saved hosts. Most clients ask your permission before the first call of each tool.
Tools: sending#
LAN Share offers 19 tools (12 in built-in mode). Every result is text, which the assistant reads: pretty-printed JSON, except remove_host and remove_group, which answer with a sentence. When something goes wrong the call still answers, with "isError": true and a plain-English message (Test server rejected the transfer
), so the assistant can explain it or try something else. Tools that only look at things are marked readOnlyHint, which lets many clients run them without asking each time.
Sending
send
send_text
send_to_group
web_shareHosts and network
list_hosts
check_host
diagnose
discover
add_host
update_host
remove_hostGroups
list_groups
add_group
rename_group
remove_groupThis computer
status
list_received
history
stats
A target is a saved host's name, id or address, or any host, IP or host:port (in built-in mode, saved hosts only). A saved host with extra addresses (say Wi-Fi, cable and VPN) is tried address by address, 1.5 seconds each, and the first that answers is used.
send asks the receiver#
Sends folders and files to one computer. Waits until the receiver accepts (up to 3 minutes) and the transfer has finished, then returns what was sent. A transfer that was interrupted resumes where it stopped when the same items are sent again.
| Parameter | Type | Description |
|---|---|---|
targetrequired | string | Where to send (see above). |
pathsrequired | string[] | Absolute paths of folders and files on this computer, at least one. |
message | string ≤ 2000 | A note the receiver sees when asked to accept. |
exclude | string[] | Names to leave out of folders, such as node_modules, .git, *.log; added to the user's own exclude list. |
compress | boolean | zstd on the way, unpacked on arrival. Default: the user's setting, which skips data that is already compressed (photos, videos, archives). |
sync | boolean | Update the same names on the receiver instead of saving new copies; files it already has unchanged are not sent again. Nothing is ever deleted there. Default false. |
{
"target": "Test server",
"paths": ["/Users/you/Projects/app/build"],
"exclude": ["node_modules", "*.map"],
"message": "Build 214 for testing"
}{
"target": "Test server",
"address": "10.0.0.20",
"items": "build",
"files": 1284,
"bytes": 432013312,
"size": "412.0 MiB",
"compressed": true,
"wire_bytes": 301209600,
"skipped_bytes": 0,
"seconds": 4.7
}address is the address that was used; wire_bytes what crossed the network; skipped_bytes what the receiver already had (resume, sync). Errors: Test server rejected the transfer
(declined, or no answer in 3 minutes), /Users/you/x does not exist
, sending to Test server failed: …
.
send_text asks the receiver#
Sends a piece of text (a link, a command, a snippet; up to 1 MiB), given as a string: the tool does not read the clipboard. The receiver sees it in LAN Share instead of a file. Waits until it is accepted.
| Parameter | Type | Description |
|---|---|---|
targetrequired | string | Where to send. |
textrequired | string | The text. |
{ "target": "Anna's MacBook", "text": "https://staging.example.com/build/214" }The result has the same fields as send; items is the first 40 characters of the text.
send_to_group asks each receiver#
Sends the same folders and files to every host in a group, one after another (not in parallel). Each receiver accepts for themselves. The call fails when the group has no hosts, or when every host failed; otherwise the result says how each one went.
| Parameter | Type | Description |
|---|---|---|
grouprequired | string | Group name or id. |
pathsrequired | string[] | As in send. |
message, exclude, compress, sync | … | As in send, for every host. |
[
{ "target": "QA Mac mini", "ok": true, "sent": { "target": "QA Mac mini", "items": "release-notes.pdf", "files": 1, "size": "1.2 MiB", "…": "…" } },
{ "target": "QA Windows", "ok": false, "error": "QA Windows rejected the transfer" }
]web_share starts a pagefull mode only#
Shares with a phone or any browser on the same network, with no app on the other side. Starts a small web page that offers the given files and folders for download (folders as .zip) and accepts uploads into this computer's receive folder. Without paths the page is upload-only. The result is the page's URL (no QR code): give it to the person, or let your assistant turn it into a QR code if it can.
| Parameter | Type | Description |
|---|---|---|
paths | string[] | Absolute paths of files and folders to offer. Optional. |
minutes | integer 1–1440 | How long the link works. Default 15. |
{ "paths": ["/Users/you/Documents/invoice-2026-10.pdf"], "minutes": 15 }{
"url": "http://192.168.1.31:51544/9f2c4e7a1b8d3f60c5e2a7b94d1f8e36/",
"urls": ["http://192.168.1.31:51544/9f2c4e7a1b8d3f60c5e2a7b94d1f8e36/"],
"port": 51544,
"expires_in": 900,
"items": [{ "name": "invoice-2026-10.pdf", "is_dir": false, "files": 1, "bytes": 184320 }]
}The link carries a random token and stops working when the time is up. The page runs inside the MCP server, so it also stops when the assistant's session ends. An organisation can switch it off with "disable": ["phone"].
Tools: hosts and network#
list_hosts read-only#
Saved hosts with their group, and whether LAN Share answers on each right now (checked in parallel).
| Parameter | Type | Description |
|---|---|---|
group | string | Only the hosts of this group. |
[
{
"id": 1793561079457943000,
"name": "Test server",
"address": "10.0.0.20",
"alt_addresses": ["10.8.0.20"],
"group": "Servers",
"online": true,
"fingerprint": "XYHX-HOSQ-JBXO-QLAF"
},
{
"id": 1793398994740048000,
"name": "Anna's MacBook",
"address": "192.168.1.40",
"alt_addresses": [],
"group": null,
"online": false
}
]fingerprint appears once the host's key is known (after the first encrypted contact).
check_host read-only#
Whether LAN Share answers on one host. For a saved host with extra addresses, address is the first one that answered.
| Parameter | Type | Description |
|---|---|---|
targetrequired | string | Host to check. |
{ "address": "10.8.0.20", "alt_addresses": ["10.8.0.20"], "name": "Test server", "online": true }diagnose read-only#
Checks step by step why sending to a host works or not: resolve (name lookup), tcp (connection, 3 s), protocol (LAN Share answers, encryption and key) and version. A saved host's addresses are tried in order until one works; tried lists them all. ok is true when everything but the version check passed.
| Parameter | Type | Description |
|---|---|---|
targetrequired | string | Host to check. |
{
"address": "192.168.1.50",
"ok": false,
"steps": [
{ "name": "resolve", "ok": true, "ms": 0.8, "detail": "192.168.1.50 resolves to 192.168.1.50:45821" },
{ "name": "tcp", "ok": false, "ms": 3004.5, "detail": "No answer from 192.168.1.50:45821 within 3 s: the computer is off, on another network, or a firewall blocks TCP port 45821" },
{ "name": "protocol", "ok": false, "ms": null, "detail": "Skipped: no connection" },
{ "name": "version", "ok": false, "ms": null, "detail": "Skipped: no connection" }
],
"peer": null,
"tried": [{ "address": "192.168.1.50", "ok": false, "ms": 3005.1 }]
}{
"address": "10.0.0.20",
"ok": true,
"steps": [
{ "name": "resolve", "ok": true, "ms": 0.1, "detail": "10.0.0.20 resolves to 10.0.0.20:45821" },
{ "name": "tcp", "ok": true, "ms": 4.2, "detail": "Connected to 10.0.0.20:45821" },
{ "name": "protocol", "ok": true, "ms": 21.0, "detail": "LAN Share answered as \"test-server\"; encrypted, key XYHX-HOSQ-JBXO-QLAF" },
{ "name": "version", "ok": true, "ms": null, "detail": "LAN Share 0.9.0 (protocol 1), features: zstd, resume, sync, text, info, pair, noise" }
],
"peer": { "name": "test-server", "version": 1, "app_version": "0.9.0", "features": ["zstd", "resume", "sync", "text", "info", "pair", "noise"] },
"tried": [{ "address": "10.0.0.20", "ok": true, "ms": 26.3 }]
}Other details you may see: refused the connection: LAN Share is not running there, or it uses another port
; Something answers on this port, but not as LAN Share
; encrypted, but its key … is not the remembered …: sending is refused until the old key is forgotten
.
discover read-only#
Finds computers running LAN Share on the local network with a UDP broadcast (it listens for 1.5 seconds). Returns their names and addresses; save one with add_host. No parameters.
[
{ "name": "meeting-room-pc", "ip": "192.168.1.57", "port": 45821 },
{ "name": "test-server", "ip": "10.0.0.20", "port": 45821, "alt": ["10.8.0.20"] }
]alt: the same computer answered on other addresses too (for example over a VPN); save them as its alt_addresses.
add_host changes hostsfull mode only#
Saves a host. The name must not already be another host's name or address.
| Parameter | Type | Description |
|---|---|---|
namerequired | string | The name to show and to send to. |
addressrequired | string | host, IP, or either with :port. |
alt_addresses | string[] | Other addresses of the same computer (Wi-Fi and cable, VPN), tried in order when the main one does not answer. |
group | string | Group name or id. |
{ "name": "Meeting room", "address": "192.168.1.57", "group": "Office" }{ "id": 1793641469516678000, "label": "Meeting room", "address": "192.168.1.57", "group": 1793487035370877000 }update_host changes hostsfull mode only#
Renames a saved host, changes its address or extra addresses, or moves it to another group. Only the fields you give change.
| Parameter | Type | Description |
|---|---|---|
hostrequired | string | The saved host: name, id or address. |
name | string | New name. |
address | string | New main address. |
alt_addresses | string[] | Replaces the list; [] removes them all. |
group | string | Move to this group; "" takes it out of its group. |
{ "host": "Test server", "address": "10.0.0.42", "alt_addresses": ["10.8.0.42"] }remove_host changes hostsfull mode only#
Deletes a saved host. Hosts your organisation's policy provides cannot be removed.
| Parameter | Type | Description |
|---|---|---|
hostrequired | string | Name, id or address. |
Removed host Meeting room
Tools: groups#
list_groups read-only#
Host groups and how many hosts each has. No parameters.
[
{ "id": 1793487035370877000, "name": "Office", "hosts": 4 },
{ "id": 1793398981799906000, "name": "Servers", "hosts": 2 }
]add_group changes groupsfull mode only#
Creates a host group.
| Parameter | Type | Description |
|---|---|---|
namerequired | string | The group's name (must be new). |
{ "id": 1793656800123456000, "name": "QA" }rename_group changes groupsfull mode only#
Renames a group.
| Parameter | Type | Description |
|---|---|---|
grouprequired | string | Group name or id. |
new_namerequired | string | The new name. |
remove_group changes groupsfull mode only#
Deletes a group. Its hosts are kept, without a group. Groups from your organisation's policy cannot be removed.
| Parameter | Type | Description |
|---|---|---|
grouprequired | string | Group name or id. |
Removed group QA (3 hosts now without a group)
Tools: this computer and history#
status read-only#
This computer: its name, port, whether LAN Share is receiving right now, the receive folder, where the settings are, and how many hosts and groups are saved. No parameters.
{
"device_name": "studio-mac",
"port": 45821,
"receiving": true,
"receive_dir": "/Users/you/Downloads/LAN Share",
"config_file": "/Users/you/Library/Application Support/lan-share/config.json",
"hosts": 6,
"groups": 2
}list_received read-only#
The newest items in the receive folder, newest first. modified is in seconds since 1970 (Unix time).
| Parameter | Type | Description |
|---|---|---|
limit | integer ≥ 1 | How many. Default 20. |
[
{ "name": "contract-draft.docx", "path": "/Users/you/Downloads/LAN Share/contract-draft.docx", "is_dir": false, "modified": 1793639740 },
{ "name": "photos-october", "path": "/Users/you/Downloads/LAN Share/photos-october", "is_dir": true, "modified": 1793611200 }
]history read-only#
The transfer history, sent and received, including declined and failed transfers, newest first.
| Parameter | Type | Description |
|---|---|---|
limit | integer ≥ 1 | How many. Default 20. |
direction | "sent" | "received" | Only one direction. |
[
{
"id": 1793641469516678000,
"time": 1793641469,
"direction": "received",
"kind": "files",
"peer": "Anna's MacBook",
"address": "192.168.1.40",
"items": ["contract-draft.docx"],
"paths": ["/Users/you/Downloads/LAN Share/contract-draft.docx"],
"files": 1,
"bytes": 48213,
"wire_bytes": 31022,
"compressed": true,
"duration_ms": 41,
"status": "done",
"message": "Please check section 4",
"encrypted": true,
"fingerprint": "XKAZ-FSCH-PYZF-IYBO"
}
]time is when it finished (Unix seconds). status: done, rejected, failed or cancelled; failures carry an error. kind is files or text. Fields that appear only when they apply: skipped_bytes, versioned (sync kept replaced files as versions), error, message, auto_accepted (a trusted sender), encrypted, fingerprint, key_changed.
stats read-only#
Transfer statistics for a period: totals, per host, per day, average and fastest speed (bytes per second), and what compression saved.
| Parameter | Type | Description |
|---|---|---|
days | integer 1–366 | The period, ending today. Default 30. |
{
"days": 30,
"totals": {
"sent_bytes": 647901184, "received_bytes": 1053712384,
"sent": 14, "received": 11, "failed": 1,
"saved_bytes": 308346880,
"average_speed": 9793248.6, "fastest_speed": 61202112.0
},
"by_host": [
{ "peer": "NAS", "sent": 612368384, "received": 0, "transfers": 9, "last": 1793639845 }
],
"daily": [
{ "start": 1793570400, "sent": 3000112, "received": 933146526 }
]
}Example prompts#
You talk to the assistant in plain words; it picks the tools. These are realistic conversations and the calls a capable assistant makes. Yours may take a slightly different route.
Send the build folder to the test server, without node_modules, and tell me when it's accepted.
list_hostsfinds Test server and sees it is online.sendwithtarget: "Test server",paths: ["/Users/you/Projects/app/build"],exclude: ["node_modules"], maybe amessage. The call waits while the person at the test server decides; clients that show progress show it filling.- The result comes back once the transfer finished.
You get: “Accepted and done: 1,284 files, 412 MiB in 4.7 s; node_modules stayed here.” If they declined: “Test server rejected the transfer.”
Share this PDF to my phone.
web_sharewith the PDF's path and the default 15 minutes.- The assistant gives you the
url, often as a QR code. Open it on the phone (same Wi-Fi) and tap the file.
Note: full mode only. The same page takes uploads: Let me send photos from my phone
starts it without paths.
Who sent me files today, and where are they?
historywithdirection: "received"and a generouslimit.- It keeps the entries whose
timeis today and whosestatusisdone, and readspeer,items,messageandpaths.
You get: “Anna's MacBook sent contract-draft.docx at 10:14 (‘Please check section 4’), saved in Downloads/LAN Share. The NAS sent photos-october at 08:02.”
Why isn't the Ubuntu box reachable?
check_hostconfirms it does not answer.diagnoseruns the four steps. Hereresolvepasses andtcptimes out after 3 s.- The assistant reads the step details and explains them, step by step.
You get: “The name resolves, but nothing answers on TCP 45821 in 3 seconds: the box is off, on another network, or its firewall blocks the port. On Ubuntu with ufw: sudo ufw allow 45821.” A refused connection would mean LAN Share is not running there; a key mismatch, that it was reinstalled.
Send the release notes to everyone in QA with the note “please test today”.
list_groupsfinds QA (if the name was not exact).send_to_groupwithgroup: "QA", the PDF and themessage.
You get: a line per computer: “QA Mac mini accepted, QA Windows declined.” Only when every one failed does the call count as an error.
Put this staging link on Anna's Mac.
send_textwithtarget: "Anna's MacBook"and the URL astext.
You get: “Anna accepted it.” She sees the link in LAN Share, ready to copy, with no file to clean up.
Find the new PC in the meeting room and save it as “Meeting room” in the Office group.
discoverlists the computers that answered the broadcast; one is meeting-room-pc at 192.168.1.57.add_hostwithname: "Meeting room",address: "192.168.1.57",group: "Office"(andalt_addressesif it answered on more than one).check_hostto confirm.
Note: full mode only; in built-in mode the assistant tells you to add it in the app.
Update the copy of my Photos/2026 folder on the NAS. Only what changed.
sendwithtarget: "NAS", the folder andsync: true.
You get: how much was really sent; skipped_bytes shows what the NAS already had. Sync never deletes anything on the receiver.
How much have I sent to the NAS this month, and how fast is it usually?
statswithdays: 30.- It reads the NAS's entry in
by_hostandtotals.average_speed(bytes per second).
You get: “584 MiB in 9 transfers; on average 9.3 MiB/s. Compression saved 294 MiB overall.”
The test server moved to 10.0.0.42. Over the VPN it's 10.8.0.42.
update_hostwithhost: "Test server",address: "10.0.0.42",alt_addresses: ["10.8.0.42"].check_hostreports which address answers now.
You get: “Saved. It answers on 10.0.0.42; from home, 10.8.0.42 will be tried after the office address.”
Open the file Anna just sent me and summarise it.
list_receivedwithlimit: 5gives the newest item and itspath.- The assistant reads that file with its own file tools (LAN Share does not read files for the assistant) and summarises it.
Note: this works in assistants that can read local files, such as Claude Code, Codex or Cursor.
Safety and permissions#
Several independent layers decide what an assistant can do:
- Your client asks you. MCP clients ask before running a tool, and let you allow tools for good. Allowing the
readOnlyHinttools (list_hosts,check_host,diagnose,discover,status,list_received,history,stats,list_groups) is harmless; keep the sending tools on “ask”. - The receiver accepts. Every transfer is offered to a person, who sees the sender, the items, the size and the note, and accepts or declines. The exception is a computer that already trusts yours (paired, Always accept, or
lanshare receive --yes). There is no MCP tool to trust a sender, pair or forget a key: those stay with you. - Keys are checked. If the other computer's key is not the remembered one, sending is refused, whoever asks.
- Built-in mode narrows it down. Sending only from the folders you allowed (checked after following links and
.., so a link cannot lead out of them), only to saved hosts, no changes to hosts or groups, no web page. The connection is a socket only your user can open. - Your organisation's policy.
"disable": ["mcp"]makeslanshare mcprefuse to start;"phone"switches offweb_share,"text"blockssend_text,"sync"sync sends; hosts and groups from the policy cannot be removed; receive rules still apply on every receiver. See For organisations.
In full mode the assistant can send any file you can read, to any address, just as you could in a terminal. If that is more than you want, use built-in mode on a Mac, keep the sending tools on “ask” in your client, and check what a call will send before you allow it.
Long transfers and progress#
- A send can take minutes. It waits up to 3 minutes for the receiver to accept, then for the transfer itself. Calls run in parallel, so the assistant can keep using other tools meanwhile.
- Progress. For
sendandsend_to_group, when the client asks for progress (aprogressTokenin the call), LAN Share sendsnotifications/progresswith bytes done and total and the messageSending to Test server
. Other tools,send_textincluded, report no progress. - Client time limits. Some clients give up on a tool call after a minute or so. In Codex set
tool_timeout_sec(see setup); in Claude Code theMCP_TOOL_TIMEOUTenvironment variable sets it in milliseconds. If a client gave up, the transfer may still have finished: ask for the history. - Ending the session lets transfers that are under way finish before the server exits; a
web_sharepage stops with it.
Troubleshooting#
- No LAN Share tools in the client
- The path is wrong or not absolute, or the client was not restarted. Run the command from step 1 in a terminal with
mcpafter it: it should sit and wait (press Ctrl+C). Then try the hand test under Other. - Built-in: only a
statustool lanshare-mcpopens LAN Share if it is not running, but Settings → CLI and MCP → Built-in (App Store: Settings → AI assistants → Built-in) must be selected there; otherwise the client sees one stand-instatustool that says so. Select Built-in, then restart the MCP server in your client. The settings page shows Waiting for an assistant, the number connected, or the error in red.- “… is outside the folders allowed in LAN Share”
- Built-in mode: add the folder under Settings → CLI and MCP (App Store: AI assistants) → Allowed folders (your home folder allows almost everything).
- “"10.0.0.9" is not a saved host”
- Built-in mode sends only to saved hosts. Save it in the app first.
- “add_host is not available in LAN Share's built-in MCP”
- Hosts and groups are changed in the app in built-in mode.
- “Test server rejected the transfer”
- The person declined, or did not answer within 3 minutes.
- “sending to … failed: … connection timed out”
- The computer is off, elsewhere, or a firewall blocks TCP 45821. Ask the assistant to run
diagnose. - The call timed out in the client
- Raise the client's tool time limit (above), then check the history: it may have gone through.
- “AI assistants (MCP) are switched off by your organisation's policy”
- Your administrator disabled AI assistants (MCP) for this computer with
"disable": ["mcp"];lanshare mcprefuses to start and says so.
Still stuck? Support has the network checklist, or write to us with what lanshare diagnose <host> says.
Something missing or wrong? Write to [email protected].