A Python-based MCP server that integrates with Perplexity's Sonar Pro API to perform intelligent searches and research assistance.
Performs search queries using the Perplexity API to get comprehensive information on any topic.
-
Python Requirements:
- Python 3.x
uv
package manager (for virtual environment and dependency management)
-
API Key:
- Get your Perplexity API key from perplexity.ai/settings/api
- Set the
PERPLEXITY_API_KEY
environment variable before running the server (seestart_mcp_python.sh
for details)
- The server uses a virtual environment managed by
uv
. The startup script will:- Create a virtual environment if it doesn't exist
- Install required dependencies (mcp and requests)
- Set up the Perplexity API key
- Launch the MCP server
-
Start the Server:
./start_mcp_python.sh
-
The server provides the following tool:
search
: Perform a search query using the Perplexity API# Example usage query = "What are the best practices for Python exception handling?" result = search(query)
MIT