File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,36 @@ thv run --isolate-network --permission-profile none --volume /home/user/aws-diag
240240This approach is more flexible since you can easily change the host directory
241241without editing a profile file.
242242
243+ ## Accessing other workloads on the same container network
244+
245+ To allow an MCP server to access other workloads on the same network, you need
246+ to configure network isolation to include the appropriate hostnames and ports.
247+ This is commonly needed when your MCP server needs to communicate with
248+ databases, APIs, or other services that are running on your local host during
249+ development.
250+
251+ For example, in Docker environments, you can use ` host.docker.internal ` to
252+ access services on the host. Create a permission profile that allows this
253+ hostname and the required port:
254+
255+ ``` json title="internal-access-profile.json"
256+ {
257+ "network" : {
258+ "outbound" : {
259+ "insecure_allow_all" : false ,
260+ "allow_host" : [" host.docker.internal" ],
261+ "allow_port" : [3000 ]
262+ }
263+ }
264+ }
265+ ```
266+
267+ Run the MCP server with this profile:
268+
269+ ``` bash
270+ thv run --isolate-network --permission-profile ./internal-access-profile.json < SERVER>
271+ ```
272+
243273## Related information
244274
245275- [ ` thv run ` command reference] ( ../reference/cli/thv_run.md )
You can’t perform that action at this time.
0 commit comments