> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Target as a WireGuard Peer

> Run the target on a host that joins as a WireGuard peer, so an Agent Gateway instance reaches it at the host's address.

The target's host joins the Agent Gateway instance's [*Network*](https://developers.telnyx.com/docs/network/overview.md) as a WireGuard peer. The instance reaches the target at the host's address.

## Add the Host

Add the host to the instance's WireGuard Interface:

```bash Workstation theme={null}
telnyx-edge network peer create acme-hq-ashburn-va tools-host
```

```text Output theme={null}
Created WireGuard peer tools-host (b26a6774-f07c-4c1b-b3a1-c1eedd09290c) on interface 0eeec588-1bcf-4db6-a64a-5a9156cecd55
Wrote tools-host.conf (mode 0600)
Connect with: wg-quick up ./tools-host.conf
```

The configuration's `Address` is the host's address, `172.27.0.3`. On the host, bring the tunnel up:

```bash Tools host theme={null}
wg-quick up ./tools-host.conf
```

[WireGuard Peer Configuration](https://developers.telnyx.com/docs/network/wireguard-peer-config/linux.md) covers each operating system.

## Add the Target

[`POST /v2/agent_gateways/{id}/mcp_servers`](https://developers.telnyx.com/api-reference/agent-gateway-mcp-servers/add-an-mcp-server) adds the target by the host's address:

```json theme={null}
{
  "name": "orders",
  "url": "http://172.27.0.3:9000/mcp",
  "auth": { "type": "api_key", "value": "example-orders-key" }
}
```

Only the host joins the *Network*. The systems its tools use stay inside the user's network.
