Skip to content

Connect OpsFactor Pro MCP to Claude Code and Codex

This guide is for an OpsFactor Pro environment with MCP enabled. Its remote MCP endpoint lets an AI client discover and use the planning tools available to your account. Claude Code and local Codex connect through HTTP and complete OpsFactor authentication in a browser. Confirm that your OpsFactor Pro environment has MCP enabled before starting. A Claude Pro or ChatGPT Pro subscription is a separate product and does not grant OpsFactor Pro access.

Before you begin

  1. Obtain the application URL for the specific OpsFactor environment you are authorized to use and confirm that your account can sign in there. The MCP endpoint is the same base URL with /mcp appended once, for example https://YOUR_OPSFACTOR_HOST/mcp. Replace that example with your actual endpoint in every command below.
  2. Install and sign in to the client you will use. Follow the official Claude Code installation guide or Codex download and installation page. For the command-line workflow, the official Codex CLI repository also gives current install options. You need only one client to complete this guide.
  3. Use an interactive browser on the same computer for the OAuth sign-in. Keep usernames, passwords, access tokens and client secrets out of MCP commands, project files and prompts. The OpsFactor sign-in page handles the credentials.

The built-in remote MCP support of Claude Code and Codex is sufficient for this setup. No extra ZIP or local MCP server is required.

Claude Code

  1. Open a terminal and add the endpoint to your user configuration. Choose a distinct server name if you connect to more than one OpsFactor environment.
claude mcp add --transport http --scope user opsfactor "https://YOUR_OPSFACTOR_HOST/mcp"
  1. Start the OAuth flow and complete the OpsFactor sign-in in your browser.
claude mcp login opsfactor
  1. Confirm that the server is connected with claude mcp list or claude mcp get opsfactor. Inside Claude Code, /mcp shows the same connection and lets you authenticate if you skipped the command-line login.
  2. Check that the configured URL belongs to the intended OpsFactor environment and ask Claude Code to call opsfactor_references and show its available categories. Confirm the environment before asking it to inspect data or perform an operation.

Claude Code supports remote HTTP MCP servers, user-scoped configuration and browser-based OAuth in its official MCP guide.

Codex

Choose either the desktop interface or the command-line setup. The local Codex clients share MCP configuration for the same host.

Codex desktop

  1. Install and open the Codex app and sign in.
  2. Open Settings > MCP servers > Add server. Name the server opsfactor, choose Streamable HTTP, and enter the environment's full /mcp URL.
  3. Save the server and select Restart. When the server shows that authentication is needed, select Authenticate and complete the OpsFactor sign-in in your browser.
  4. Type /mcp in the composer to inspect the connected server. Ask Codex to call opsfactor_references and show its available categories. Check the configured server URL against the intended environment before using a tool.

Codex CLI

If you prefer a terminal, install the Codex CLI and run:

codex mcp add opsfactor --url "https://YOUR_OPSFACTOR_HOST/mcp"
codex mcp login opsfactor
codex mcp list

Complete the OAuth flow in the browser, then start a Codex session and use /mcp to verify the connection. The official Codex MCP guide describes the desktop, CLI and IDE setup paths and their shared configuration.

Check access and resolve connection problems

What you see What to check
Needs authentication Run the client's MCP login command or select Authenticate, then finish the browser sign-in.
Failed to connect Confirm the complete endpoint URL, including one /mcp, and that the environment is reachable from your computer. Some environments need a few minutes to start after inactivity.
Access denied Confirm that you selected the intended OpsFactor environment and that your account has MCP access there. Ask the environment administrator to check your permissions.
Connected to the wrong environment Give each environment a distinct server name, inspect the selected URL in the client, and verify the environment before using a tool.

MCP tools run with the permissions of the signed-in OpsFactor account. Review the environment and expected effect before authorizing a tool that changes planning data or starts a process.

For other learning paths, return to the guides. For product architecture and integration context, see the technical documentation.