
mcp perplexity vercel
一个提供对 Perplexity AI 强大语言模型访问的标准化接口服务器。
Repository Info
About This Server
一个提供对 Perplexity AI 强大语言模型访问的标准化接口服务器。
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
Perplexity MCP Server
A Model Context Protocol server that provides access to Perplexity AI's powerful language models through a standardized interface.
Features
- Ask Tool: Natural conversation capabilities using Perplexity's Sonar Pro model
- Reason Tool: Advanced reasoning and analysis using the specialized reasoning model
- MCP Compatible: Works with any MCP-enabled client (Cursor, Claude, etc.)
- Real-time Streaming: Supports streaming responses for better interaction
- One-Click Vercel Deployment: Unlike other Perplexity MCP servers, this one can be instantly deployed to Vercel for free with just one click
- Zero Infrastructure Management: No need to manage servers or worry about scaling - Vercel handles it all
Deploy Your Own
- Click the "Deploy with Vercel" button above
- Connect your GitHub account
- Set your environment variables:
PERPLEXITY_API_KEY: Your Perplexity API keyREDIS_URL: Your Redis URL (Vercel has integrations with various Redis providers)
- Click deploy!
Your MCP server will be live in minutes with:
- Automatic HTTPS
- Global CDN
- Automatic scaling
- Zero configuration needed
Manual Setup
If you prefer to run locally or deploy elsewhere:
-
Clone the repository
-
Install dependencies:
npm install # or pnpm install -
Set up environment variables:
cp .env.example .envAdd your Perplexity API key to
.env:PERPLEXITY_API_KEY=your_api_key_here REDIS_URL=your_redis_url_here # Required for MCP functionality -
Run the development server:
npm run dev # or pnpm dev
Usage
Configuration
Add to your MCP configuration:
{
"mcpServers": {
"perplexity": {
"type": "remote",
"url": "https://mcp-perplexity-vercel.vercel.app/sse",
"supportsStreaming": true
}
}
}
Available Tools
perplexity_ask
Natural conversation tool using Perplexity's Sonar Pro model.
{
name: "perplexity_ask",
parameters: {
messages: Array<{role: string, content: string}>
}
}
Example:
{
"messages": [{ "role": "user", "content": "What is the capital of France?" }]
}
perplexity_reason
Advanced reasoning tool optimized for complex analysis and logical problem-solving.
{
name: "perplexity_reason",
parameters: {
messages: Array<{role: string, content: string}>
}
}
Example:
{
"messages": [
{ "role": "user", "content": "Analyze the pros and cons of remote work" }
]
}
Development
Project Structure
.
├── api/
│ └── server.ts # MCP server implementation
├── lib/
│ ├── perplexity/ # Perplexity client implementation
│ └── handlers/ # Tool handlers
└── public/ # Static assets
Environment Variables
Required environment variables:
PERPLEXITY_API_KEY: Your Perplexity API key (get one from Perplexity)REDIS_URL: Redis instance URL (required for MCP functionality)
Deployment
This server is optimized for Vercel deployment, making it the easiest Perplexity MCP server to self-host. The production server is available at: https://mcp-perplexity-vercel.vercel.app/
Deploy Options
-
One-Click Vercel Deploy (Recommended)
- Use the "Deploy with Vercel" button above
- Set your environment variables
- Your server will be live in minutes
-
Manual Vercel Deploy
- Fork this repository
- Import to Vercel
- Configure environment variables
- Deploy
-
Custom Deployment
- Deploy to any platform that supports Node.js
- Ensure Redis is available
- Configure environment variables
- Start the server
License
MIT
Quick Start
Clone the repository
git clone https://github.com/recoupable/mcp-perplexity-vercelInstall dependencies
cd mcp-perplexity-vercel
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.