Skip to content

tsiongk/sonar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Sonar MCP Server (Python)

A Python MCP server for the Perplexity Sonar API, providing AI-powered search and reasoning. Built with the Dedalus MCP framework.

Features

  • perplexity_ask - Quick factual questions with web search
  • perplexity_research - Deep research on complex topics
  • perplexity_reason - Complex reasoning and problem-solving
  • perplexity_chat - Multi-turn conversational interactions

Installation

# Clone the repository
git clone https://github.com/dedalus-labs/sonar-mcp-python.git
cd sonar-mcp-python

# Install dependencies with uv
uv sync

Configuration

Create a .env file with your Perplexity API key:

PERPLEXITY_API_KEY=your_api_key_here

Get your API key from Perplexity Settings.

Usage

Running the Server

uv run python src/main.py

The server will start on http://localhost:3011/mcp.

Testing with the Client

uv run python src/client.py

Tools

perplexity_ask

Quick answers to factual questions using web search.

Parameters:

  • question (required): The question to answer

Model: sonar (fast, web-grounded)

perplexity_research

Deep research on complex topics with citations.

Parameters:

  • topic (required): The topic to research

Model: sonar-deep-research (comprehensive, longer response time)

perplexity_reason

Complex reasoning and problem-solving without web search.

Parameters:

  • problem (required): The problem to reason through

Model: sonar-reasoning-pro (advanced reasoning)

perplexity_chat

Multi-turn conversational interactions.

Parameters:

  • messages (required): Array of message objects with role and content

Model: sonar-pro (conversational, web-grounded)

License

MIT

About

Perplexity Sonar MCP server for Dedalus

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages