Connect Meshia
Enable and verify the owner's basic Meshia MCP connection by default, then offer optional native workspace files. Follow the owner's instructions and host policies. Setup does not authorize paid compute, computer execution, uploads, or conversation archiving.
1. Reuse or install
Inspect this client's MCP configuration and run meshia --version. If Meshia tools are already loaded, go straight to verification. Change only the Meshia entry; never overwrite other servers.
Meshia is one package per OS: the meshia command, the Meshia MCP server, workspace files in the file browser, optional compute sharing and automatic updates. Install nothing else. Unless the owner already chose, ask once: “Set up Meshia on this computer? (Recommended.) One install gives <client name> Meshia tools and puts your workspace files in your file browser. Compute sharing stays off.” Offer Set up with files and Set up without files.
Run the single installer on this computer. Replace <client> with claude, codex, cursor, claude-desktop, windsurf or gemini (omit it to auto-detect the calling agent). Add --no-mount (PowerShell -NoMount) if the owner chose no files; add --headless over SSH or without a local browser.
macOS and Linux:
curl -fsSL https://connect.meshia.io/ | bash -s -- --agent <client>Windows PowerShell:
& ([scriptblock]::Create((irm 'https://connect.meshia.io/?os=windows'))) -Agent <client>The installer verifies a signed release, then runs meshia setup: one browser sign-in, this computer's connection with the file mount, the client's MCP entry (meshia mcp serve, replacing any older Meshia entry) and a verification receipt. If meshia is already installed, run meshia setup --agent <client> (same toggles) instead; it reuses sign-in, enrollment and compute grants and never re-pairs. Keep the command running while the owner approves the browser sign-in and, on first mount setup, the macOS administrator dialog or Windows UAC prompt; do not hand off to Terminal.
Clients that cannot run local commands (web apps, sandboxed hosts) use the remote endpoint instead: server meshia, Streamable HTTP with OAuth, URL https://meshia.io/api/mcp.
claude mcp add --scope user --transport http meshia "https://meshia.io/api/mcp"
codex mcp add meshia --url "https://meshia.io/api/mcp"
codex mcp login meshiaIn Codex, saved configuration does not prove the running app loaded Meshia. After setup, use a supported refresh if exposed: config/mcpServer/reload queues a refresh for loaded threads; verify next turn. This is an app-server method, not a CLI command. Never start another app-server or use a private socket. Otherwise ask for Settings → MCP servers → Restart, then return here. Claude Code loads new servers in a new session or after /mcp.
Use other hosts' documented settings; never guess syntax. For a manual step, explain the blocker and give one exact next action: “Meshia configuration is saved. After <action>, ask me to verify Meshia and continue <original task>.” Saved configuration is not verification.
2. Let the owner sign in
Before setup, say: “Meshia will open in your browser. Sign in to connect <client name>; this won't start compute.”
The owner enters their emailed code in the browser, reviews the client and account, and approves. With --headless, setup prints a link and a short code; share both, and the owner approves on any device. Never ask for a code or token in chat. Reuse an existing sign-in rather than forcing another login.
If the wrong account is selected, have the owner use Switch account on the consent page. Setup refuses to mix accounts with an existing enrollment and changes nothing. Preserve all host confirmation prompts and access boundaries.
3. Verify, then finish setup
meshia setup already calls the read-only tool meshia_setup_verify through the installed MCP server and prints its receipt; meshia --json setup returns it as JSON. Once the client loads Meshia, discover and call meshia_setup_verify with {} yourself. It checks the authenticated account and first workspace page without creating anything and returns a signed receipt and receipt_url. If the host has cached an older tool list, refresh it. If the tool remains unavailable, call meshia_account_get then meshia_workspaces_list.
After successful reads, say: “Meshia is ready for <email>. I can see <N> workspaces on the first page. No compute was started.” Link the receipt; the first page is not the total count. Basic MCP is ready regardless of the mounting choice.
Check meshia --json mount --probe before reporting files connected; name the verified mount path. The mount can start empty; the first workspace's filesystem appears automatically when created. Do not create a workspace just for mounting. Also call meshia_integration_accounts with {} and mention any active connections alongside the verified mount path.
On failure, state the failed step and one specific recovery action (usually rerunning meshia setup, which is idempotent, or meshia doctor). Retain the existing configuration, installation and original task. Do not revoke access, reinstall, or bypass OAuth by default.
4. Files and compute later
A decline leaves MCP ready; continue without asking again. To add files later, rerun the installer with --mount (PowerShell -Mount), which installs the OS mount runtime if needed and keeps identity; meshia setup --no-mount turns the mount off. Preserve existing enrollment and compute grants; never re-pair or call meshia_connected_host_attach with files merely to mount.
Computer compute and conversation syncing remain separate opt-ins. To contribute this computer, the owner chooses Workspace only (--compute limited) or Full computer access (--compute full) with --project <workspace-id> on a new setup; an enrolled computer changes access through the workspace's Attach compute or meshia_connected_host_attach.
For a different computer, call meshia_connected_host_connect with access_mode: "files", its platform: "posix" or "windows", and confirm_access: true; omit workspace_id, execution_scope and ssh_target. The owner runs the returned command there. It installs the same package and enrolls with no second login or pairing prompt.
5. Continue naturally
If the owner already gave a task, continue it and reuse the relevant workspace. Do not ask them to repeat it.
As part of setup, if verification shows no workspaces yet, choose 2-3 starter projects from in-scope context (connected accounts, local files, and any mounted computer), each under an hour on one starter GPU within the $10 free credit. Pin them immediately with meshia_welcome_picks: a headline, and per idea a title, relevance sentence and first workspace message. Never invent owner facts; use broadly useful starters if context is thin. Say: “I pinned N starter projects to your Meshia welcome screen. Each one starts in a click.” List each in one line.
If they only requested setup, ask one optional question: “What would you like to work on—or shall I suggest a first project?” (after pinning, ask which pick). Do not create a workspace while waiting. Use first_meshia_project for a requested idea. Never force a GPU or questionnaire.
Before uploads, conversation linking, or execution, read https://meshia.io/agent-guide.md (MCP resource meshia://operations). Confirm which files or conversation will be saved, including whether tool records are included, unless the owner already authorized that scope. Never save hidden reasoning, private instructions, credentials, or unrelated history.
Reuse an explicit covering spend authorization; otherwise present a no-spend quote and ask approval before paid compute. Connecting an account grants account controls, not permission to execute on the owner's computer. Report meaningful checkpoints with the project link, and retain durable files when compute stops.