You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -152,11 +152,15 @@ The Router also maintains persistent connections to MCP servers, enabling multip
152
152
153
153
For more technical details on the router's implementation and namespacing, see [`docs/router_tech_design.md`](docs/router_tech_design.md).
154
154
155
+
The Router can be shared in public network by `mcpm router share`. Be aware that the share link will be exposed to the public, make sure the generated secret is secure and only share to trusted users. See [MCPM Router Share](docs/router_share.md) for more details about how it works.
156
+
155
157
```bash
156
158
mcpm router status # Check if the router daemon is running
157
159
mcpm router on # Start the MCP router daemon
158
160
mcpm router off # Stop the MCP router daemon
159
-
mcpm set --host HOST --port PORT # Set the MCP router daemon's host and port
161
+
mcpm router set --host HOST --port PORT --address ADDRESS # Set the MCP router daemon's host port and the remote share address
Your local MCPM Router can be shared in public network and others can connect to your router by the share link and use your configured MCPM Profile. In this document, we will explain how to use it and how it works.
There will be a share link and a secret. The final share link will be `http://<ADDRESS>?s=<SECRET>&profile=<PROFILE_NAME>`. You can share this link with others and by adding this share link to mcpm client, they can connect to your router.
14
+
15
+
If address is not specified, the share link will be proxied by our server `share.mcpm.sh`. You can also specify a custom address to share.
16
+
17
+
If profile is not specified, the share link will use the current active profile. If no active profile found, the user need to specify the profile manually.
18
+
19
+
To be noted that if your router is not running or your system sleeps, the share link will not be available.
20
+
21
+
## How it works
22
+
23
+
We use a fork version of frp from [huggingface/frp](https://github.com/huggingface/frp) to create a tunnel to your local MCPM Router. You can also check the [original frp](https://github.com/fatedier/frp) for more details about frp.
24
+
25
+
If you want to set up your own frp tunnel, we have build a docker image for frps(server) and frpc(client).
26
+
27
+
In your public server, you can create a frps config following the guide [here](https://github.com/huggingface/frp?tab=readme-ov-file#setting-up-a-share-server). Then start the frps container by:
Then you can share the router with your own frp server by specifying the address:
33
+
```bash
34
+
mcpm router share --address <YOUR_ADDRESS>
35
+
```
36
+
37
+
## Authentication
38
+
There will be a secret token generated for authentication. The user MUST specify the secret token as a query parameter `s=<SECRET>` when connecting to your router. Make sure to keep the secret token secure and only share it with trusted users.
39
+
40
+
## Unshare
41
+
42
+
```bash
43
+
mcpm router unshare
44
+
```
45
+
46
+
This will stop the tunnel and remove the share link.
0 commit comments