Create Private Connection from Claude Code

This page explains how to register Claude Code as an OAuth client in Pricefx and configure an authenticated MCP connection in Claude Code.

Prerequisites

OAuth Client ID Registration

To use OAuth, each client must be registered with a specific client_id. This configuration is defined through the oauthConfiguration Advanced Configuration Option. Multiple clients can be registered within this setting.

  1. Login to your Pricefx partition.

  2. Go to Administration > Configuration > System Configuration > Advanced Configuration Options.

  3. Click Add.

  4. In the Add Option menu:

    1. Enter oauthConfiguration into Name.

    2. Enter the following JSON code into Value.

      1. Replace the <client_id> with a name of your choosing, usually claude-code.

      2. Replace the <port_number> with a port of your choosing, usually 3334.

        JSON
        {
          "knownClients": {
            "<client_id>": {
              "redirect_uri": "http://localhost:<port_number>/callback"
            }
          }
        }
        
  5. Click Add.

Property

Example Value

Required

Description

client_id

claude-code

Yes

Client ID example.

redirect_uri

http://localhost:<port_number>/callback

Yes

Must be configured, as it will be sent by the client. See below about <port_number>

port_number (configurable)

3334

Yes

The port on your local machine which Claude will use for OAuth handshake. This can be any valid port of your choosing, Claude documentations most often use port 3334 as shown in examples.

MCP Connection

  1. Open your terminal.

  2. Type the following command to add the Pricefx MCP connection.

    claude mcp add --scope user --transport http --client-id <client_id> --callback-port <port_number> <some_label> https://mcp.pricefx.com/mcp/<cluster_host>/<partition>
    

Variable

Description

<client_id>

Replace the <client_id> with the value you chose, for example claude-code.

<port_number>

Replace the  <port_number> with the value you chose, for example 3334.

<some_label>

Replace <some_label> with any name you like, this is the local label used to refer to this connection, typically like pricefx-my-dev-partition or similar, named after your partition.

<partition>

Replace <partition> with your partition name, for example my-dev-partition.

<cluster_host>

Replace the <cluster_host> with appropriate value, for example demofx-staging.pricefx.com.

MCP JSON

If you would like to directly add the MCP server via JSON configuration instead of the terminal command above, you can use the below example reference. Make sure to replace the same <variables> as above.

JSON
  "mcpServers": {
    "<some_label>": {
      "type": "http",
      "url": "https://mcp.pricefx.com/<cluster_host>/<partition>",
      "oauth": {
        "clientId": "<client_id>",
        "callbackPort": <port_number>
      }
    }
  }