Perplexity MCP Server
Perplexity MCP Server
This is a simple MCP server that allows you to search the web using Perplexity AI.
MCP Review Certified: https://mcpreview.com/mcp-servers/spragginsdesigns/perplexity-mcp-server
Installation
Prerequisites
Node.js 18+ (Download from nodejs.org)
Git (Download from git-scm.com)
A Perplexity AI API key
Steps for Windows
Clone the repository:
git clone [repository-url]
cd perplexity-mcp-serverInstall dependencies:
npm installCreate environment file:
Create a new file named
.envin the root directoryAdd your Perplexity AI API key:
PERPLEXITY_API_KEY=your_api_key_here
Usage on Windows
Development Mode
npm run devProduction Mode
Build the project:
npm run buildStart the server:
npm startUsing the Windows Batch File (Recommended)
To avoid environment variable issues on Windows, use the included batch file:
Build the project first:
npm run buildRun the batch file:
.\run-perplexity-server.batAlternatively, double-click the run-perplexity-server.bat file in Windows Explorer.
For detailed instructions, see the Windows Setup Guide.
Troubleshooting Windows Issues
Common Issues
Permission Errors
Run Command Prompt or PowerShell as Administrator
Check file permissions in the project directory
Environment Variables
Ensure
.envfile is in the root directoryNo spaces around the
=sign in.envfileRestart terminal after making changes to environment variables
Use the provided batch file to avoid environment variable issues
Node.js Issues
Verify Node.js installation:
node --versionEnsure 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
├── run-perplexity-server.bat # Windows batch file
└── tsconfig.json # TypeScript configurationAPI Usage
The server provides a single tool perplexity_search for web searches:
{
"name": "perplexity_search",
"arguments": {
"query": "your search query here"
}
}License
MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/spragginsdesigns/perplexity-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server