Get the FREE Ultimate OpenClaw Setup Guide →

perplexity

MCP server from spragginsdesigns/perplexity-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 spragginsdesigns-perplexity-mcp-server node dist/index.js \
  --env PERPLEXITY_API_KEY="your_api_key_here"

How to use

Perplexity MCP Server exposes a single tool called perplexity_search which allows you to perform web searches via the Perplexity AI API from within MCP-enabled environments. The server is built in TypeScript/Node.js and compiles to a dist/index.js entry point; at runtime you start the prebuilt server using Node and it listens for tool invocations. To use it, configure your Perplexity API key as an environment variable (PERPLEXITY_API_KEY) and invoke perplexity_search with a query payload. The tool returns search results formatted for easy consumption by MCP clients, enabling users to browse results or extract summaries from Perplexity AI directly through the MCP interface.

How to install

Prerequisites:

  • Node.js 18+ installed on the system
  • Git installed
  • A Perplexity AI API key

Step-by-step:

  1. Clone the repository git clone [repository-url] cd perplexity-mcp-server

  2. Install dependencies npm install

  3. Create environment file with your Perplexity API key Create a file named .env in the project root and add: PERPLEXITY_API_KEY=your_api_key_here

  4. Build the project (optional if you rely on prebuilt dist; otherwise needed to generate dist) npm run build

  5. Run the server (production) npm start

  6. Verify the server is running (example) curl http://localhost:3000/health

Notes:

  • For development, you can run npm run dev to start in development mode if configured in package.json.
  • Ensure the PERPLEXITY_API_KEY is set in the environment or in the .env file and that the environment loads it when starting the server.

Additional notes

Environment variables and Windows-specific usage:

  • The server relies on PERPLEXITY_API_KEY to access Perplexity AI services. Ensure this is set in a .env file or in your environment.
  • When running on Windows, you can use the provided batch flow (if available) to ensure environment variables are loaded correctly. If not, start the server via Node with the environment properly configured.
  • If you encounter ENOENT errors, confirm that the dist/index.js file exists (run npm run build) and that you are launching from the project root.
  • The API usage payload for perplexity_search should match the server's expected shape; typically you provide a query string within an arguments object as shown in the README.

Related MCP Servers

Sponsor this space

Reach thousands of developers