Skip to content

Set these environment variables when installing the MCP Identity Gateway. They configure how the MCP Identity Gateway operates at install time.

AEMBIT_TENANT_URL Required

Section titled “AEMBIT_TENANT_URL ”

Default - not set

Base URL of your Aembit tenant. Find this value in the browser address bar when you sign in to the Aembit console. See Set up the MCP Identity Gateway for detailed configuration steps.

Example:
https://tenantid.aembit.io


AEMBIT_MCP_GATEWAY_URL Required

Section titled “AEMBIT_MCP_GATEWAY_URL ”

Default - not set

Public URL of this MCP Identity Gateway instance. This is the URL that MCP clients use to connect.

Example:
https://mcp-gateway.example.com


AEMBIT_AGENT_CONTROLLER_URL Required

Section titled “AEMBIT_AGENT_CONTROLLER_URL ”

Default - not set

URL of the local Agent Controller. Must point to localhost because the MCP Identity Gateway and Agent Controller must run on the same host. The Agent Controller registers the MCP Identity Gateway with Aembit Cloud and provides it with the credentials and configuration needed to operate. This local-only communication ensures credentials never traverse the network. For architecture details, see MCP Identity Gateway concepts.

Example:
http://localhost:5000


AEMBIT_TLS_CERT_CHAIN_PATH Required

Section titled “AEMBIT_TLS_CERT_CHAIN_PATH ”

Default - not set

Sensitive - No

Filesystem path to the TLS certificate chain file (PEM format). Must include the full chain (leaf certificate and intermediates). The certificate Common Name (CN) or Subject Alternative Name (SAN) must match the hostname in AEMBIT_MCP_GATEWAY_URL.

Example:
/etc/ssl/certs/fullchain.pem


AEMBIT_TLS_PRIVATE_KEY_PATH Required

Section titled “AEMBIT_TLS_PRIVATE_KEY_PATH ”

Default - not set

Sensitive - Yes

Filesystem path to the TLS private key file (PEM format). Store in a secrets manager for production.

Example:
/etc/ssl/private/privkey.pem


Default - info

Log verbosity level. Options: trace, debug, info, warn, error, off. Use info or higher for production; trace and debug may log sensitive information.

Example:
debug

Terminal window
sudo AEMBIT_TENANT_URL=https://tenantid.aembit.io \
AEMBIT_MCP_GATEWAY_URL=https://mcp-gateway.example.com \
AEMBIT_TLS_CERT_CHAIN_PATH=/etc/ssl/certs/fullchain.pem \
AEMBIT_TLS_PRIVATE_KEY_PATH=/etc/ssl/private/privkey.pem \
AEMBIT_AGENT_CONTROLLER_URL=http://localhost:5000 \
AEMBIT_LOG_LEVEL=info \
./install

The MCP Identity Gateway validates configuration at startup and fails closed on errors.

When the MCP Identity Gateway starts, it validates:

  • Required variables - You must set all required environment variables
  • URL format - Tenant and controller URLs must be well-formed
  • TLS certificates - Certificate and key files must exist and be readable
  • Agent Controller connectivity - The MCP Identity Gateway must reach the Agent Controller on localhost

If any validation fails, the MCP Identity Gateway exits immediately with an error message.

During operation, the MCP Identity Gateway caches data from Aembit Cloud to maintain availability:

Data typeCache duration
Assigned MCP server workloads60 seconds
Access policy directives60 seconds
Credentials60 seconds

If Aembit Cloud becomes unreachable, the MCP Identity Gateway continues operating with cached data until the cache expires.

After installation, verify the MCP Identity Gateway is running:

Terminal window
sudo systemctl status aembit_mcp_gateway

Check the logs for startup errors:

Terminal window
sudo journalctl -u aembit_mcp_gateway -n 50

The MCP Identity Gateway requires an Agent Controller running on the same host. The Agent Controller uses its own set of environment variables during installation.

Default - not set

Aembit tenant ID.

Example:
123abc


AEMBIT_AGENT_CONTROLLER_ID Required

Section titled “AEMBIT_AGENT_CONTROLLER_ID ”

Default - not set

ID of the Agent Controller as configured in Aembit.

Example:
01234567-89ab-cdef-0123-456789abcdef


Default - useast2.aembit.io

Aembit stack domain for this tenant. Don’t set this value unless directed by your Aembit representative.


Default - information

Log verbosity level for Agent Controller. The supported levels include fatal, error, warning, information, debug, verbose.

Example:
verbose

For Agent Controller installation details, see Set up the MCP Identity Gateway.