Get the FREE Ultimate OpenClaw Setup Guide →

perplexity -2

Perplexity AI MCP Server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio smithery-ai-perplexity-mcp-server-2 node server.js \
  --env PERPLEXITY_API_KEY="your_api_key_here"

How to use

This MCP server exposes Perplexity AI capabilities through a standardized set of MCP tools, enabling you to chat, search, and retrieve Perplexity documentation within your MCP-enabled workflows. After starting the server, you can reference the Perplexity tools from your MCP environment and issue queries as you would with other MCP tools. The server acts as a bridge between your MCP system and Perplexity AI, translating MCP requests into API calls and returning structured results for easy consumption by your agents.

To use the tools, ensure your MCP environment is configured to communicate with this server's endpoint. Set the PERPLEXITY_API_KEY environment variable with your Perplexity API key to authenticate requests. When you invoke a tool, you can perform tasks such as interactive chat with Perplexity, perform targeted searches, or fetch relevant Perplexity documentation snippets. Consult the MCP documentation for any tool-specific parameters or context formatting required by your integration.

How to install

Prerequisites:

  • Node.js and npm installed on your system
  • Access to the repository containing this MCP server

Installation steps:

  1. Clone the repository: git clone https://github.com/your-org/smithery-ai-perplexity-mcp-server-2.git cd smithery-ai-perplexity-mcp-server-2
  2. Install dependencies: npm install
  3. Configure API key:
    • Create or update your environment to include PERPLEXITY_API_KEY with your Perplexity API key.
    • Example (Linux/macOS): export PERPLEXITY_API_KEY=your_api_key
    • Example (Windows PowerShell): $env:PERPLEXITY_API_KEY = "your_api_key"
  4. Start the server: npm start
  5. Verify the server is running by hitting the configured endpoint or checking the startup logs for a listening message.

Additional notes

Notes and tips:

  • The server relies on the PERPLEXITY_API_KEY environment variable for authentication. Keep this key secure and rotate as needed.
  • Perplexity API reliability may vary; the server includes error handling to gracefully manage API failures.
  • If you modify the server configuration, ensure you restart the server for changes to take effect.
  • Refer to the MCP framework documentation for details on how to invoke tools and interpret responses.
  • If you encounter issues, check logs for API request/response details and verify network access to Perplexity services.
Sponsor this space

Reach thousands of developers