Create Private Connection from Cline

This page explains how to register Cline as an OAuth client in Pricefx and configure a custom connector in Cline to establish a private connection to your partition via a Remote MCP server.

Prerequisites

Bun Installation Notes

  1. Install Bun (Installation Bun).

info If you are having issues with bun you can use alternatively npx (You will also need to replace the cline_mcp_settings.json configuration later with the “bunx” version).

Mcp-remote Installation Notes

  1. Install mcp-remote globally.

    PowerShell
    # Install globally
    
    npm install -g mcp-remote
    
    # Then in Cline config, don't use -y flag
    

info Check mcp-remote readme.

Client 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.

      JSON
      {
        "knownClients": {
          "devenv": {
            "redirect_uri": "http://localhost:3334/oauth/callback"
          }
        }
      }
      
  5. Click Add.

Property

Example Value

Required

Description

client_id

devenv

Yes

Client ID example.

redirect_uri

http://localhost:3334/oauth/callback

Yes

Must be configured, as it will be sent by the client.

Create Connection

  1. Open IntelliJ IDEA.

  2. Click Cline Cline Icon .

  3. Click Manage MCP Servers Server Icon .

  4. Click Settings Settings Icon .

  5. Click Configure MCP Servers.

  6. Replace the default cline_mcp_settings.json file with the following code:

    JSON
    {
      "mcpServers": {
        "copilotfx-mcp": {
          "command": "bunx",
          "args": [
            "mcp-remote",
            "https://<mcp domain URL>/mcp/<instance base URL>/<partition>",
            "3334",
            "--host",
            "localhost",
            "--static-oauth-client-info",
            "{\"client_id\": \"devenv\", \"redirect_uri\": \"http://localhost:3334/oauth/callback\"}"
          ]
        }
      }
    }
    
    // ℹ️ `client_id` and `redirect_uri` values correspond to the values entered in the Advanced Configuration Option.
    // ℹ️ Replace example partition URL with the valid one.
    
  7. Save the cline_mcp_settings.json file.

  8. Wait for the MCP Client in Cline to reconnect or force restart the IntelliJ IDEA.

If you choose to install npx instead of bun you will need to use the following version of the cline_mcp_settings.json file.

JSON
{
  "mcpServers": {
    "copilotfx-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://<mcp domain URL>/mcp/<instance base URL>/<partition>",
        "3334",
        "--host",
        "localhost",
        "--static-oauth-client-info",
        "{\"client_id\": \"devenv\", \"redirect_uri\": \"http://localhost:3334/oauth/callback\"}"
      ]
    }
  }
}

// ℹ️ `client_id` and `redirect_uri` values correspond to the values entered in the Advanced Configuration Option.
// ℹ️ Replace example partition URL with the valid one.