Pearl APIDocsReference

Connecting to Remote Pearl API MCP Server from Clients

For developers and end-users utilizing popular MCP clients like Claude Desktop, Cursor, or Cline, connecting to the remote Pearl API MCP server typically involves configuring the client to use an adapter called mcp-remote. This adapter acts as a local proxy, allowing clients that primarily support local (stdio) connections to communicate with remote (SSE) servers. 

Here's how to connect the remote Pearl API MCP Server using mcp-remote: 

  1. Install mcp-remote: You need Node.js installed (version 18 or higher recommended). Open your terminal and run:

     npm install -g mcp-remote@latest  

    Or use npx when configuring the client to use the latest version directly without global installation. 

  2. Obtain the Server URL and API Key: The remote Pearl API MCP Server URL is https://mcp.pearl.com/sse. You will also need an API Key. Please reach out to mailto:support@pearl.com  to request a demo api key.

Configure your client: 

Claude Desktop setup

  1. Open Claude Desktop.

  2. Click on File → Settings…

  3. Navigate to the Developer tab.

  4. Select Edit Config. This opens or creates a configuration file located at:

    1. macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    2. Windows: %APPDATA%\Claude\claude_desktop_config.json

  5. Replace or add the following JSON configuration:

    {
        "mcpServers": {
    		"pearlapi": {
    		  "command": "npx",
    		  "args": [
    			"mcp-remote@latest",
    			"https://mcp.pearl.com/sse",
    			"--header",
    			"X-API-KEY:{PEARL API KEY}"
    		  ]
    		}
        }
    }
  6. Restart Claude Desktop

  7. Go back to the Claude Desktop, you should the 🔨 hammer icon at the bottom-right corner of the input box to access MCP tools.

Cursor setup

  1. Open Cursor.

  2. Navigate to Settings → MCP.

  3. Under "Model Context Protocol (MCP)," click "Add new global MCP Server" and enter:

    {
        "mcpServers": {
    		"pearlapi": {
    		  "command": "npx",
    		  "args": [
    			"mcp-remote@latest",
    			"https://mcp.pearl.com/sse",
    			"--header",
    			"X-API-KEY:{PEARL API KEY}"
    		  ]
    		}
        }
    }
  4. Save the configuration.

VS Code Setup

In VS Code, run the MCP: Add server command. Choose "HTTP (Server-sent events)" as the transport and enter the URL of the /sse endpoint on the server https://mcp.pearl.com/sse

VS Code's mcp.json configuration file opens. Because the server requires an API key, make a couple of changes:

  • Add a new promptString input for the API key. This will prompt us for the API key when we start the server.

  • Add the x-api-key header to the server configuration. This will send the API key to the server when connecting.

    "mcp": {
            "inputs": [
                {
                    "type": "promptString",
                    "id": "pearl-api-key",
                    "description": "Pearl API Key",
                    "password": true
                }
            ],
            "servers": {
                "pearl-api-sse": {
                    "command": "npx",
                    "args": [
                        "mcp-remote@latest",
                        "https://mcp.pearl.com/sse",
                        "--header",
                        "X-API-KEY: ${input:pearl-api-key}",
                    ]
                }
            }
        }

Next to the server in the JSON file, click the "Start" button. This initiates VS Code's connection to the server. You'll be prompted for the API key. Enter an API key.

Open the Copilot chat interface by typing Ctrl+Shift+I (Cmd+Shift+I on macOS). Change the mode to "Agent".

Once connected, your AI agent in these clients will be able to discover and invoke the tools exposed by the Pearl API MCP Server. The complexity of connecting to the human expert network, managing conversation state across sessions, and handling authentication is abstracted away by the server architecture. 

The Pearl API MCP Server transforms AI agents from standalone systems into collaborative entities that know when to tap into the nuanced understanding, real-world judgment, and verified credibility that only human experts can provide. This unlocks real-time human assistance directly from within the agent's reasoning loop, providing users with answers they can trust