Pearl MCP
Pearl MCP Server is a standardized AI and expert service server with session management. It supports multiple interaction modes, enabling seamless AI and human expert assistance for continuous conversations.
How to Install and Use Pearl MCP
Pearl MCP is a powerful server that connects AI and expert services through a simple interface. If you want to use Pearl MCP locally or with MCP clients, this guide will help you install it and run it with easy-to-follow steps and example code.
Prerequisites Before Installation
Before you start installing Pearl MCP, you need a few things ready. Pearl MCP requires Python 3.12 or higher to be installed on your computer. You also need a Pearl API key, which you can get by contacting Pearl through their website. Finally, make sure you have pip (a Python package installer) or uv package manager to handle dependencies.
Step 1: Download Pearl MCP
First, you need to get the Pearl MCP server files on your computer:
git clone https://github.com/Pearl-com/pearl_mcp_server.git
cd pearl_mcp_server
This command downloads the server code and moves into the folder to prepare for the next steps.
Step 2: Set Up the Python Environment
Next, create a special Python environment for Pearl MCP to keep everything organized:
python -m venv .venv
source .venv/bin/activate # On Windows use: .venv\Scripts\activate
This creates and activates a virtual environment, meaning all the files you install won’t affect other programs.
Step 3: Install the Needed Packages
Now, you install all the software Pearl MCP needs to work properly:
pip install -e .
This command reads the project settings and adds all the required tools to your environment.
Step 4: Configure the Server
Before running the server, you have to add your Pearl API key. Create a file called .env inside the src directory of the project with this content:
PEARL_API_KEY=your-api-key-here
Replace your-api-key-here with the actual API key you received from Pearl.
Step 5: Run the Pearl MCP Server Locally
You can start the server on your computer using two options. The default way uses stdio transport:
pearl-mcp-server --api-key your-api-key
If you want to use a network connection with Server-Sent Events (SSE) and a custom port, use:
pearl-mcp-server --api-key your-api-key --transport sse --port 8000
Again, replace your-api-key with your actual key.
Example: Using Pearl MCP with Python Client
To connect your Python code to Pearl MCP, you can write a simple script like this:
import asyncio
from mcp.client.session import ClientSession
from mcp.client.stdio import StdioServerParameters, stdio_client
async def main():
async with stdio_client(
StdioServerParameters(command="pearl-mcp-server", args=["--api-key", "your-api-key"])
) as (read, write):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await session.list_tools()
print(tools)
result = await session.call_tool(
"ask_pearl_ai",
{
"question": "What is MCP?",
"session_id": "optional-session-id"
}
)
print(result)
asyncio.run(main())
This script starts a session, lists available tools, and asks the “What is MCP?” question, then prints the answer.
By following these steps, you will have Pearl MCP installed, configured, and ready to use with your applications. It is simple and gives you access to AI and expert services from Pearl through a standard interface.