mcp-perplexity-search
🔎 A Model Context Protocol (MCP) server for integrating Perplexity's AI API with LLMs.
claude mcp add --transport stdio spences10-mcp-perplexity-search npx -y mcp-perplexity-search \ --env PERPLEXITY_API_KEY="your-perplexity-api-key"
How to use
This MCP server integrates Perplexity's AI capabilities into your workflow by exposing a single MCP tool named chat_completion. It leverages Perplexity's API to generate advanced chat completions with support for predefined templates such as technical documentation generation, security practices analysis, code review, and API documentation in a structured format. Users can select a predefined prompt_template (e.g., technical_docs, security_practices, code_review, api_docs) or supply a custom_template to tailor the assistant's behavior and output format. Output supports multiple formats (text, markdown, json) and can optionally include source URLs. You can adjust model parameters like temperature and max_tokens to control creativity and response length, and choose from Perplexity models such as sonar. This makes it suitable for generating documentation, performing code reviews, extracting API specs, or analyzing security practices within conversations.
How to install
Prerequisites:
- Node.js and npm/pnpm installed on your system
- Access to the Perplexity API with an API key
-
Clone the repository or set up the MCP server in your environment:
-
Install dependencies (using pnpm as suggested by the project):
pnpm install
- Build the project (if a build step is required):
pnpm build
- Run the server locally for development (as an MCP service in your MCP client):
pnpm dev
- Alternatively, run via npx (as shown in the configuration example):
npx -y mcp-perplexity-search
- Ensure your MCP client is configured to launch the server using the provided mcpServers entry (see mcp_config). Provide your Perplexity API key when prompted or via the PERPLEXITY_API_KEY environment variable.
Additional notes
Notes and tips:
- This project is no longer maintained; functionality has moved to mcp-omnisearch. Consider migrating if you rely on ongoing updates.
- The server requires a Perplexity API key (PERPLEXITY_API_KEY). Do not expose this key in client-side configurations.
- You can customize prompts via prompt_template or custom_template to influence system behavior and response formatting.
- Output formats can be controlled with the format and include_sources options; defaults are text and false for include_sources.
- If you encounter authentication or API errors, verify the API key and network access to Perplexity services.
- The npm_package name for this server is mcp-perplexity-search.
Related MCP Servers
mcp-for-beginners
This open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable, and secure AI workflows from session setup to service orchestration.
mcp-omnisearch
🔍 A Model Context Protocol (MCP) server providing unified access to multiple search engines (Tavily, Brave, Kagi), AI tools (Perplexity, FastGPT), and content processing services (Jina AI, Kagi). Combines search, AI responses, content processing, and enhancement features through a single interface.
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
mcp-arr
MCP server for *arr media management suite
mcp-perplexity
A Model Context Protocol (MCP) server for intelligent code analysis and debugging using Perplexity AI’s API, seamlessly integrated with the Claude desktop client.
mcp-tavily-search
🔍 Model Context Protocol (MCP) tool for search using the Tavily API