pearl_mcp_server

The Pearl MCP Server is an implementation of a Model Context Protocol (MCP) server that exposes Pearl's AI and expert services through a standardized interface. This server allows MCP clients to interact with Pearl's advanced AI assistants and human experts. It features multiple interaction modes, session management, and conversation history tracking, enabling users to leverage quick automated responses or AI-assisted human expert support.

GitHub Stars

5

User Rating

Not Rated

Favorites

0

Views

35

Forks

1

Issues

1

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Python 3.12 or higher
Pearl API Key
+1 more

Installation

Installation

Prerequisites

Python: 3.12 or higher
Pearl API Key: Obtain from [Pearl](https://www.pearl.com/contact)
pip or uv package manager

Installation Steps

1. Clone Repository

bash
git clone https://github.com/Pearl-com/pearl_mcp_server.git
cd pearl_mcp_server

2. Create and Activate Virtual Environment

bash
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

3. Install Dependencies

bash
pip install -e .

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check Python version and reinstall dependencies.

Configuration

Configuration

Basic Configuration

Setting Environment Variables

Create a .env file in the src directory and add the following:
env
PEARL_API_KEY=your-api-key-here

Advanced Configuration

Security Settings

Manage API keys securely to prevent exposure.
Set appropriate file access permissions.

Configuration Example

env
PEARL_API_KEY=your-api-key-here

Examples

Examples

Basic Usage

Starting the Server

bash

Start the server using stdio transport

pearl-mcp-server --api-key your-api-key

Start using SSE transport on a custom port

pearl-mcp-server --api-key your-api-key --transport sse --port 8000

Example API Call

python
import requests

def call_mcp_tool(tool_name, params):
    response = requests.post(
        'http://localhost:8000/mcp/call',
        json={
            'tool': tool_name,
            'parameters': params
        }
    )
    return response.json()

Usage example

result = call_mcp_tool('ask_pearl_ai', {'question': 'What is MCP?'})

Use Cases

Use AI-only mode to quickly get responses to general inquiries.
Utilize AI-Expert mode for expert verification on complex topics.
Engage directly with human experts using Expert mode.
Check the status of an active conversation and manage sessions.
Retrieve conversation history to understand context.