@@ -242,9 +242,6 @@ def monitor_for_errors(line: str) -> Optional[str]:
242242@click .option (
243243 "--http" , is_flag = True , default = False , help = "Use HTTP instead of HTTPS. NOT recommended to use on public networks."
244244)
245- @click .option (
246- "--secret/--no-secret" , default = True , help = "Generate a random secret token for authentication (default: enabled)"
247- )
248245@click .option (
249246 "--timeout" ,
250247 type = int ,
@@ -253,7 +250,7 @@ def monitor_for_errors(line: str) -> Optional[str]:
253250)
254251@click .option ("--retry" , type = int , default = 0 , help = "Number of times to automatically retry on error (default: 0)" )
255252@click .help_option ("-h" , "--help" )
256- def share (command , port , address , http , secret , timeout , retry ):
253+ def share (command , port , address , http , timeout , retry ):
257254 """Share an MCP server through a tunnel.
258255
259256 This command uses mcp-proxy to expose a stdio MCP server as an SSE server,
@@ -267,7 +264,6 @@ def share(command, port, address, http, secret, timeout, retry):
267264 mcpm share "uvx mcp-server-fetch"
268265 mcpm share "npx mcp-server" --port 5000
269266 mcpm share "uv run my-mcp-server" --address myserver.com:7000
270- mcpm share "uvx mcp-server-fetch" --no-secret
271267 mcpm share "npx -y @modelcontextprotocol/server-everything" --retry 3
272268 """
273269 # Default to standard share address if not specified
@@ -295,8 +291,8 @@ def share(command, port, address, http, secret, timeout, retry):
295291
296292 # Create and start the tunnel
297293 console .print (f"[cyan]Creating tunnel from localhost:{ actual_port } to { remote_host } :{ remote_port } ...[/]" )
298- # Generate a random token for security or use empty string if --no-secret
299- share_token = secrets .token_urlsafe (32 ) if secret else ""
294+ # Always use empty string for token (equivalent to --no-secret)
295+ share_token = secrets .token_urlsafe (32 )
300296 tunnel = Tunnel (
301297 remote_host = remote_host ,
302298 remote_port = remote_port ,
@@ -313,15 +309,8 @@ def share(command, port, address, http, secret, timeout, retry):
313309 sse_url = f"{ share_url } /sse"
314310 console .print (f"[bold green]Server is now shared at: [/][bold cyan]{ sse_url } [/]" )
315311
316- # If secret is enabled, display a warning
317- if secret :
318- console .print (
319- "[bold yellow]Note:[/] This URL includes a security token. Only share it with trusted users."
320- )
321- else :
322- console .print (
323- "[bold red]Warning:[/] Security token is disabled. Anyone with the URL can access your server."
324- )
312+ # Always show the warning about URL access
313+ console .print ("[bold red]Warning:[/] Anyone with the URL can access your server." )
325314
326315 console .print ("[yellow]Press Ctrl+C to stop sharing and terminate the server[/]" )
327316
0 commit comments