Share plan documents via devtunnel with public, private, or password-protected access. Automatically maintains the tunnel connection.
Share plan documents with teammates via a devtunnel URL. Supports three access modes.
| Mode | devtunnel Flag | Auth | Use Case |
|---|---|---|---|
| public | --allow-anonymous | None — anyone with the URL | Quick sharing, demos |
| private | (default) | Microsoft account login required | Team-internal, org-restricted |
| protected | --allow-anonymous + server-side password | Password in URL or login page | External reviewers, cross-org sharing |
Check if the plan dashboard server is already running.
plan_serve_dashboard MCP tool to start it:
plan_serve_dashboard with workspaceRoot = {cwd or detected workspace}
port for devtunnel=== Share Plan Documents ===
How should this link be accessed?
1. public — Anyone with the URL can view (no login)
2. private — Microsoft account login required
3. protected — Password-protected (you set a password)
Mode [1]: _
If user picks protected, ask for the password:
Set a password for the shared link:
> _
Call the plan_share MCP tool with mode: "protected" and password:
plan_share with:
- workspaceRoot: {workspace path}
- mode: "protected"
- password: {user-provided password}
This enables the password middleware on the web server. All requests must include ?token={password} or have a valid session cookie. Requests without auth get a login page.
Use Bash to create and host a devtunnel. The tunnel auto-reconnects on disconnect.
Public mode:
devtunnel host -p {port} --allow-anonymous 2>&1 &
Private mode:
devtunnel host -p {port} 2>&1 &
Protected mode:
devtunnel host -p {port} --allow-anonymous 2>&1 &
(Anonymous at tunnel level — our server handles the password check)
The devtunnel host command:
Run with run_in_background: true so it stays alive.
Parse the devtunnel output for the URL (format: https://{tunnel-id}-{port}.{region}.devtunnels.ms).
Display to the user:
Public:
=== Sharing Plan Documents ===
Mode: public (anyone with the URL)
URL: https://abc123-3847.usw2.devtunnels.ms
Dashboard: https://abc123-3847.usw2.devtunnels.ms/
The tunnel auto-reconnects if your network drops.
To stop sharing: /plan-share stop
Private:
=== Sharing Plan Documents ===
Mode: private (Microsoft account login required)
URL: https://abc123-3847.usw2.devtunnels.ms
Dashboard: https://abc123-3847.usw2.devtunnels.ms/
Recipients must sign in with a Microsoft account.
The tunnel auto-reconnects if your network drops.
To stop sharing: /plan-share stop
Protected:
=== Sharing Plan Documents ===
Mode: protected (password required)
URL: https://abc123-3847.usw2.devtunnels.ms?token=mypassword
Dashboard: https://abc123-3847.usw2.devtunnels.ms?token=mypassword
Share the full URL (includes token). Recipients who open the URL
without the token will see a password prompt.
The tunnel auto-reconnects if your network drops.
To stop sharing: /plan-share stop
The devtunnel host process handles reconnection automatically. If the user reports issues:
| Invocation | Behavior |
|---|---|
/plan-share | Start sharing (default: public) |
/plan-share public | Start with public access |
/plan-share private | Start with Microsoft login |
/plan-share protected | Start with password (prompts for password) |
/plan-share protected mypass123 | Start with specified password |
/plan-share stop | Stop the tunnel and disable password protection |
/plan-share status | Show current sharing status and URL |
| Error | Resolution |
|---|---|
devtunnel not installed | Print platform-specific install options: Windows → winget install Microsoft.devtunnel; macOS → brew install --cask devtunnel; Linux → curl -sL https://aka.ms/DevTunnelCliInstall | bash; any OS → download from https://aka.ms/devtunnels/download |
devtunnel not logged in | "Run devtunnel user login first to authenticate" |
| Dashboard not running | Auto-start it via plan_serve_dashboard MCP tool |
| Tunnel process dies | Restart automatically. Inform user if URL changed. |
| Port conflict | Dashboard already handles port fallback; tunnel follows |