Configure an MCP client

Configure an MCP client for streamable HTTP or stdio and verify access to server capabilities.

Choose one supported transport and authentication combination.

Connection Required Controller credential Optional Analytics Events credential
Streamable HTTP Authorization: Bearer <AppDynamics-Controller-token> X-Events-API-Key: <Analytics-Events-key>
Stdio with env_bearer APPD_API_TOKEN EVENTS_API_KEY
Stdio with oauth APPD_CLIENT_ID, APPD_CLIENT_SECRET, and APPD_CUSTOMER EVENTS_API_KEY

The Analytics Events credential is required only for live Analytics Events tools.

Streamable HTTP client

The HTTP server must already be running with MCP_TRANSPORT=streamable-http, APPD_ENVIRONMENT, and the request_bearer authentication mode.

Claude JSON configuration

JSON
{
  "mcpServers": {
    "appdynamics": {
      "url": "https://your-mcp-endpoint.example.com/mcp",
      "headers": {
        "Authorization": "Bearer <AppDynamics-Controller-token>",
        "X-Events-API-Key": "<Analytics-Events-key>"
      }
    }
  }
}

Authorization is required. X-Events-API-Key is optional and enables access to live Analytics Events tools when the server also has the corresponding Events URL and Global Account Name configured.

Codex TOML configuration

Set the credentials in the environment that starts Codex:

BASH
export APPD_CONTROLLER_TOKEN="<AppDynamics-Controller-token>"
export APPD_EVENTS_API_KEY="<Analytics-Events-key>"  # Optional

Add the server to ~/.codex/config.toml:

TOML
[mcp_servers.appdynamics]
url = "https://your-mcp-endpoint.example.com/mcp"
bearer_token_env_var = "APPD_CONTROLLER_TOKEN"
env_http_headers = { "X-Events-API-Key" = "APPD_EVENTS_API_KEY" }

The env_http_headers setting is optional and is required only for live Analytics Events access.

Stdio client with environment bearer authentication

The MCP client starts the container and supplies the Controller bearer token through the child-process environment. Stdio does not use MCP request headers.

Claude JSON configuration

JSON
{
  "mcpServers": {
    "appdynamics": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "--env", "MCP_TRANSPORT=stdio",
        "--env", "APPD_AUTH_MODE=env_bearer",
        "--env", "APPD_ENVIRONMENT",
        "--env", "APPD_API_TOKEN",
        "appdynamics-mcp-server:latest"
      ],
      "env": {
        "APPD_ENVIRONMENT": "https://your-controller.example.com/controller",
        "APPD_API_TOKEN": "<AppDynamics-Controller-token>"
      }
    }
  }
}

Codex TOML configuration

Set the Controller values in the environment that starts Codex:

BASH
export APPD_ENVIRONMENT="https://your-controller.example.com/controller"
export APPD_API_TOKEN="<AppDynamics-Controller-token>"

Add the server to ~/.codex/config.toml:

TOML
[mcp_servers.appdynamics]
command = "docker"
args = [
  "run", "--rm", "-i",
  "--env", "MCP_TRANSPORT=stdio",
  "--env", "APPD_AUTH_MODE=env_bearer",
  "--env", "APPD_ENVIRONMENT",
  "--env", "APPD_API_TOKEN",
  "appdynamics-mcp-server:latest"
]
env_vars = ["APPD_ENVIRONMENT", "APPD_API_TOKEN"]

Stdio client with OAuth authentication

In this mode, the MCP server uses the configured AppDynamics API Client credentials to obtain and refresh the Controller token. This is downstream Controller OAuth, not MCP transport OAuth.

Claude JSON configuration

JSON
{
  "mcpServers": {
    "appdynamics": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "--env", "MCP_TRANSPORT=stdio",
        "--env", "APPD_AUTH_MODE=oauth",
        "--env", "APPD_ENVIRONMENT",
        "--env", "APPD_CLIENT_ID",
        "--env", "APPD_CLIENT_SECRET",
        "--env", "APPD_CUSTOMER",
        "appdynamics-mcp-server:latest"
      ],
      "env": {
        "APPD_ENVIRONMENT": "https://your-controller.example.com/controller",
        "APPD_CLIENT_ID": "<API-client-name>",
        "APPD_CLIENT_SECRET": "<API-client-secret>",
        "APPD_CUSTOMER": "<AppDynamics-account-name>"
      }
    }
  }
}

Codex TOML configuration

Set the API Client values in the environment that starts Codex:

BASH
export APPD_ENVIRONMENT="https://your-controller.example.com/controller"
export APPD_CLIENT_ID="<API-client-name>"
export APPD_CLIENT_SECRET="<API-client-secret>"
export APPD_CUSTOMER="<AppDynamics-account-name>"

Add the server to ~/.codex/config.toml:

TOML
[mcp_servers.appdynamics]
command = "docker"
args = [
  "run", "--rm", "-i",
  "--env", "MCP_TRANSPORT=stdio",
  "--env", "APPD_AUTH_MODE=oauth",
  "--env", "APPD_ENVIRONMENT",
  "--env", "APPD_CLIENT_ID",
  "--env", "APPD_CLIENT_SECRET",
  "--env", "APPD_CUSTOMER",
  "appdynamics-mcp-server:latest
]
env_vars = [
  "APPD_ENVIRONMENT",
  "APPD_CLIENT_ID",
  "APPD_CLIENT_SECRET",
  "APPD_CUSTOMER"
]

Optional Analytics Events access for stdio

For either stdio authentication mode, also supply these values when live Analytics Events access is required:

CODE
APPD_ANALYTICS_EVENTS_URL
APPD_ANALYTICS_EVENTS_GLOBAL_ACCOUNT_NAME
EVENTS_API_KEY

Forward all three variables through the Docker --env arguments and the client environment configuration. EVENTS_API_KEY is independent of the Controller bearer token or OAuth credentials.

The Codex examples follow the official OpenAI MCP configuration options for stdio environment forwarding and HTTP bearer and header configuration.

Verify the connection

Ask your AI assistant with this query.
CODE
List all APM applications monitored in AppDynamics.

Verify that your AI assistant calls this list_apm_applications tool and displays the application list.