Perplexity MCP Server

Perplexity MCP Server

This is a simple MCP server that allows you to search the web using Perplexity AI.

Installation

Prerequisites

Steps for Windows

  1. Clone the repository:
git clone [repository-url] cd perplexity-mcp-server
  1. Install dependencies:
npm install
  1. Create environment file:
    • Create a new file named .env in the root directory
    • Add your Perplexity AI API key:
    PERPLEXITY_API_KEY=your_api_key_here

Usage on Windows

Development Mode

npm run dev

Production Mode

  1. Build the project:
npm run build
  1. Start the server:
npm start

Troubleshooting Windows Issues

Common Issues

  1. Permission Errors
    • Run Command Prompt or PowerShell as Administrator
    • Check file permissions in the project directory
  2. Environment Variables
    • Ensure .env file is in the root directory
    • No spaces around the = sign in .env file
    • Restart terminal after making changes to environment variables
  3. Node.js Issues
    • Verify Node.js installation: node --version
    • Ensure npm is installed: npm --version

Error Messages

If you see Error: ENOENT: no such file or directory, ensure:

  • All paths use correct Windows-style separators
  • You're in the correct directory
  • Required files exist

Project Structure

perplexity-mcp-server/ ├── src/ │ └── index.ts # Main server implementation ├── dist/ # Compiled output ├── .env # Environment variables ├── package.json # Project configuration └── tsconfig.json # TypeScript configuration

API Usage

The server provides a single tool perplexity_search for web searches:

{ "name": "perplexity_search", "arguments": { "query": "your search query here" } }

License

MIT

You must be authenticated.

A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

This server allows users to perform web searches using Perplexity AI, providing a tool for retrieving search results through a simple API interface.

  1. Installation
    1. Prerequisites
      1. Steps for Windows
      2. Usage on Windows
        1. Development Mode
          1. Production Mode
          2. Troubleshooting Windows Issues
            1. Common Issues
              1. Error Messages
              2. Project Structure
                1. API Usage
                  1. License