Skip to content

Getting Started with Codex

Nathan Foreman edited this page Dec 3, 2026 · 1 revision

Get started with Codex on Windows

Use the native Windows Codex CLI on a machine that can reach your SCOM management server. Codex starts the Cookdown SCOM MCP executable locally over standard input and output (stdio). Install the x64 .NET Framework 4.8 runtime and the SCOM SDK on that machine. Your SCOM account controls which alerts and objects you can see. Install from ZIP · Build from source

Prepare the host and sign in

Open PowerShell as the Windows user who runs Codex. Run codex --version to check the CLI is available. Set the paths for the installation you have.

From the extracted ZIP, set these paths in its permanent folder.

$exePath = (Resolve-Path '.\cookdown-scom-mcp.exe').Path
$installerPath = (Resolve-Path '.\Install-CookdownScomMcp.ps1').Path

From a source build, set the paths from the repository root.

$exePath = (Resolve-Path '.\src\CookdownCommunity.Scom.Mcp.Host\bin\Release\net48\cookdown-scom-mcp.exe').Path
$installerPath = (Resolve-Path '.\tools\setup\Install-CookdownScomMcp.ps1').Path

Set the management server and SDK folder for your installation. The example uses a separate SCOM account and a Credential Manager target dedicated to Codex. Enter the account as DOMAIN\user when prompted.

$managementServer = 'scom01.contoso.com'
$sdkPath = 'C:\Program Files\Microsoft System Center\Operations Manager\Console\SDK Binaries'
$target = 'cookdown-scom-codex'

& $installerPath -Client None -ManagementServer $managementServer `
    -SdkPath $sdkPath -Credential (Get-Credential) -CredentialTarget $target

Check that setup reports the expected group and account. -Client None lets setup check the connection while you register Codex in the next step. Credentials stay in the Windows user's vault.

For integrated Windows sign-in, run setup with -UseWindowsIdentity in place of -Credential (Get-Credential) -CredentialTarget $target. This uses the default credential target and removes any saved entry there. Check whether another client uses it before choosing integrated sign-in. When registering Codex below, omit the whole --env "SCOM_CREDENTIAL_TARGET=$target" argument so Cookdown SCOM MCP can use the Windows identity. Credential selection

Register Cookdown SCOM MCP

Run this once from the same PowerShell session. These variables point Codex to the SDK, management server and saved credential. The executable must stay with its companion files.

codex mcp add cookdown-scom-mcp `
    --env "SCOM_Scom__ManagementServer=$managementServer" `
    --env "SCOM_SDK_PATH=$sdkPath" `
    --env "SCOM_CREDENTIAL_TARGET=$target" `
    -- $exePath
codex mcp get cookdown-scom-mcp

For a different mode, append --disable-data-warehouse or --enable-writes after $exePath when registering the server. Host options

Open a fresh Codex session. Type /mcp to inspect the connected server and its tools. If your organization manages Codex configuration, your administrator may need to allow the local server. Codex MCP configuration

Make your first two calls

Call scom_test_connection. Which management server, management group and account does SCOM report?

Check for isConnected: true and compare managementServer, managementGroup and identity with the environment and account you intended. Then try a bounded read.

Call scom_list_recent_alerts with a limit of five. How many visible alerts were raised in the last 24 hours, up to that limit?

An empty list is a valid result for the selected identity and time window. If the client cannot find the host, check the executable path and start a fresh Codex session. If Cookdown SCOM MCP loads but SCOM refuses the connection, check the SDK path, credential target and network access from Windows. Connection tool · Troubleshooting

Remove the registration

Exit Codex sessions using Cookdown SCOM MCP. Run the following as the Windows user who registered it, setting $installerPath as above if you opened a new shell. The installer command removes the dedicated credential created in the saved-account example. Skip that command for integrated sign-in or if another registration still uses the credential.

codex mcp remove cookdown-scom-mcp
codex mcp list
& $installerPath -Remove -Client None -CredentialTarget 'cookdown-scom-codex'

Verification

On 29 November 2026, native Windows Codex CLI 0.170.0 registered the extracted 0.1.0 package and discovered 22 Cookdown SCOM MCP tools in a fresh Codex client session. That session and a separate codex exec conversation using the same settings both called the connection and recent-alert tools. In each run the saved account matched the expected identity, server and group in Fast Lab, and the alert query returned five rows at the requested limit. The isolated registrations and saved credentials were removed. Integrated sign-in remains a separate verification path.

Clone this wiki locally