Perplexity Ask OpenRouter
About
Perplexity Ask OpenRouter is a Model Context Protocol (MCP) server that connects Perplexity’s models to the OpenRouter API, enabling their use with any MCP-compatible client. It is designed for developers who want to access Perplexity’s models (Sonar, Sonar Deep Research, Sonar…
Details
- Author
- elct9620
- Downloads
- 346
- Categories
- AI
Jump to
- Full Model Context Protocol (MCP) implementation
- Three Perplexity models via OpenRouter: ask, research, reason
- Server-Sent Events (SSE) transport support
- Streamable HTTP transport implementation
- Docker containerization for easy deployment
- Environment variables to configure models and ports
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Perplexity Ask OpenRouterCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
The easiest way is to run the prebuilt Docker image with your OpenRouter API key and optionally set model defaults via environment variables (ASK_MODEL, RESEARCH_MODEL, REASON_MODEL). The server exposes SSE and Streamable HTTP endpoints for MCP clients, and disable flags (DISABLE_ASK, DISABLE_RESEARCH, DISABLE_REASON) let you turn off specific tools.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"perplexity ask openrouter": {
"perplexity-ask-openrouter": {
"command": "docker",
"args": [
"run",
"-p",
"3000:3000",
"\\"
]
}
}
}
}
McpServers
{
"perplexity-ask-openrouter": {
"command": "docker",
"args": [
"run",
"-p",
"3000:3000",
"\\"
]
}
}
Perplexity Ask OpenRouter
A Model Context Protocol (MCP) server implementation that makes OpenRouter available for Perplexity Ask.
Overview
This project is inspired by Perplexity Ask and provides an MCP server implementation that connects to OpenRouter's API. It allows you to use Perplexity's models through OpenRouter with any MCP-compatible client.
Features
- Full implementation of the Model Context Protocol
- Support for Perplexity's models via OpenRouter:
- perplexity_ask - Uses Sonar model for general queries
- perplexity_research - Uses Sonar Deep Research model for in-depth research
- perplexity_reason - Uses Sonar Reasoning model for complex reasoning tasks
- Server-Sent Events (SSE) support
- Streamable HTTP transport implementation
- Docker containerization for easy deployment
Getting Started
Environment Variables
The server requires the following environment variables:
- OPENROUTER_API_KEY - Your OpenRouter API key (required)
- PORT - Port to run the server on (default: 3000)
- BASE_URL - Custom OpenRouter base URL (optional)
- ASK_MODEL - Model to use for ask tool (default: perplexity/sonar-pro)
- RESEARCH_MODEL - Model to use for research tool (default: perplexity/sonar-deep-research)
- REASON_MODEL - Model to use for reason tool (default: perplexity/sonar-reasoning-pro)
- DISABLE_ASK - Disable the ask tool (default: false)
- DISABLE_RESEARCH - Disable the research tool (default: false)
- DISABLE_REASON - Disable the reason tool (default: false)
Running with Docker
The easiest way to run the server is using Docker:
docker run -p 3000:3000 \
-e OPENROUTER_API_KEY=your_api_key_here \
ghcr.io/elct9620/perplexity-ask-openrouter:latest
Building from Source
If you prefer to build from source:
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
