DEX MCP Server Connection Information

This section provides information about the connection information required to configure MCP Server with DEX.

Connection information

Item Value
MCP endpoint https://<DEX_MCP_HOST>:9496/mcp
Token endpoint https://<DEX_MCP_HOST>:9497/auth/token
Token variable DEX_MCP_AUTH_TOKEN
Read-only header X-Bes-Mcp-Read-Only: true (optional): request header that a client can add to its MCP server definition, next to Authorization, to force read-only mode for its session. It cannot override the server policy. The DEX MCP Server installed by Fixlet 57 already runs in read-only mode. So the header has no additional effect in this deployment.
Note: Replace <DEX_MCP_HOST> with the hostname supplied for your DEX MCP Server. Always use the server's IP or DNS name, also on the same computer as the client.

Trust the HTTPS certificate

  1. Get the certificate of your DEX MCP Server (selfsigned_cert.pem) from its administrator and save it locally as C:\DEX-MCP\client\dex-mcp-server-ca.pem.
  2. Open PowerShell as the Windows user who will run the MCP clients and import the certificate into that user's trusted root store:
    $CertificatePath = "C:\DEX-MCP\client\dex-mcp-server-ca.pem"
    Import-Certificate -FilePath $CertificatePath `
      -CertStoreLocation Cert:\CurrentUser\Root
  3. Confirm that the certificate appears in the current user's trusted root store:
    Get-ChildItem Cert:\CurrentUser\Root |
      Where-Object Subject -Like "CN=localhost" |
      Select-Object Subject, Thumbprint, NotAfter
  4. Check by the thumbprint of the imported file.
    (Get-PfxCertificate -FilePath "C:\path\to\your-file.pem").Thumbprint
    Note: Do not use TLS verification bypasses such as curl -k for the normal configuration. If the hostname in the supplied endpoint does not match the certificate, contact the DEX MCP Server administrator.

Request and store the bearer token

The DEX Administrator username and password will be provided separately. The password is used only to authenticate to the HTTPS token bootstrap endpoint. It must not be copied into any MCP client configuration file.

Open a new PowerShell window and run the following commands. Enter the provided DEX Administrator password when Windows prompts for it:
$DexCredential = Get-Credential `
  -UserName "<DEX Administrator username>" `
  -Message "Enter the provided DEX Administrator password"

$TokenRequest = @{
  username = $DexCredential.UserName
  password = $DexCredential.GetNetworkCredential().Password
} | ConvertTo-Json

$TokenResponse = Invoke-RestMethod `
  -Method Post `
  -Uri "https://<DEX_MCP_HOST>:9497/auth/token" `
  -ContentType "application/json" `
  -Body $TokenRequest

if ([string]::IsNullOrWhiteSpace($TokenResponse.token)) {
  throw "The DEX MCP Server did not return a bearer token."
}

[Environment]::SetEnvironmentVariable(
  "DEX_MCP_AUTH_TOKEN",
  $TokenResponse.token,
  "User"
)

Remove-Variable DexCredential, TokenRequest, TokenResponse
Verify that the user environment variable exists without displaying the token:
$Token = [Environment]::GetEnvironmentVariable(
  "DEX_MCP_AUTH_TOKEN",
  "User"
)

if ([string]::IsNullOrWhiteSpace($Token)) {
  throw "DEX_MCP_AUTH_TOKEN is not configured."
}

"DEX_MCP_AUTH_TOKEN is configured; length = $($Token.Length)"
Remove-Variable Token

Close every running MCP client completely after setting or changing the variable. A client must start again before it can inherit the new value. Never paste the bearer token directly into a shared JSON file, source repository, ticket, or chat.