Get the FREE Ultimate OpenClaw Setup Guide →

perplexity

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 rileyedwards77-perplexity-mcp-server node server.js \
  --env PERPLEXITY_API_KEY="your-perplexity-api-key"

How to use

This MCP server exposes Perplexity AI capabilities through a standardized MCP interface. It offers tools that let you chat with Perplexity, perform searches, and retrieve API documentation or related content via the Perplexity API. To use it, start the server with the configured environment variable containing your Perplexity API key, then call the available MCP tools in your system according to your MCP harness’s tooling conventions. The server acts as a bridge, translating MCP tool invocations into Perplexity API requests and returning structured responses suitable for downstream agents or applications.

How to install

Prerequisites:

  • Node.js and npm installed on your machine
  • A Perplexity API key

Steps:

  1. Clone the repository git clone https://github.com/your-org/perplexity-mcp-server.git cd perplexity-mcp-server

  2. Install dependencies npm install

  3. Configure the API key

    • Create a shell environment variable or set it in a .env file if supported, e.g.: export PERPLEXITY_API_KEY=your-perplexity-api-key
    • Alternatively, ensure your runtime environment provides PERPLEXITY_API_KEY
  4. Start the server npm start

  5. Verify it's running Open http://localhost:PORT (the port is typically defined in your config or defaults) or check the console output for the listening address.

Additional notes

Notes and tips:

  • Ensure PERPLEXITY_API_KEY is kept secret and not committed to version control.
  • If you encounter intermittent API failures from Perplexity, implement retry logic at the MCP integration level or rely on the server’s built-in error handling.
  • Check the server logs for any initialization errors or missing environment variables.
  • If you need to change the listening port, adjust your server configuration or the startup script accordingly.
  • The MCP tools exposed by this server align with the MCP SDK conventions; consult your MCP host documentation for invoking tools and handling responses.

Related MCP Servers

Sponsor this space

Reach thousands of developers