# Address check

Canonical URL: https://developers.iagenify.com/sdk/mcp/address-check/
Language: en

The platform checks an address before the package contacts it. That order is the security, not a formality.

Status: checked first · https only · redirects never followed

## Why the order matters {#order}

> **In an application, the package runs on a server of yours**
>
> An unchecked address would be a request from inside your network to wherever it pointed — a private service, a neighbour on the network, a metadata endpoint — with the answer handed back to whoever typed it. Checking before contacting is what makes an address somebody typed safe to accept.

## What is checked {#what}

| Rule | Refusal |
| --- | --- |
| An address is present | `url_required` |
| The scheme is https | `url_not_https` |
| It resolves to a public address | `url_blocked` |

The check returns the address in its canonical form, and that is the one the package then uses — not the one that was typed.

## https, with no exception {#https}

Plain http would send the token unencrypted across the network. There is no development exception: an address that cannot be reached securely cannot hold a credential.

## Redirects are never followed {#redirects}

A redirect raises `mcp_redirect`. Following one would take the request — and the token — to an address nothing checked, which is the whole check undone in one hop.

## A changed address is re-checked {#update}

`update(name, { url })` goes through the same check. An address that does not pass is refused and the connection stays as it was.

## The bare client does none of this {#client}

[McpClient](/sdk/ref/mcp-client) contacts what it is given. That is fine for a server you wrote and a bad idea for one a user typed — which is exactly the difference between it and `api.mcp`.

- [connect()](/sdk/ref/mcp/connect): Where the check happens.
- [Errors](/sdk/mcp/errors): The refusals.
