perplexity-ask-openrouter
The Perplexity Ask MCP Server use OpenRouter
claude mcp add --transport stdio elct9620-perplexity-ask-openrouter docker run -p 3000:3000 -e OPENROUTER_API_KEY=your_api_key_here ghcr.io/elct9620/perplexity-ask-openrouter:latest \ --env OPENROUTER_API_KEY="OpenRouter API key (required)"
How to use
This MCP server exposes Perplexity-style capabilities through OpenRouter by implementing the Model Context Protocol (MCP). It wires Perplexity’s model tools to OpenRouter’s API so MCP clients can stream and exchange messages using SSE and the streamable HTTP transport. The server specifically exposes tools aligned with Perplexity: perplexity_ask (general queries via the Sonar model), perplexity_research (in-depth research via the Sonar Deep Research model), and perplexity_reason (complex reasoning via the Sonar Reasoning model). Clients can connect via the MCP endpoints and select the appropriate tool/model, receiving streamed responses as they are generated. The server also supports SSE for live, event-driven interactions and can be deployed easily with Docker.
How to install
Prerequisites:
- Docker installed on your host (Docker Engine 19.03+ or newer)
- Internet access to pull the container image
Install and run (Docker):
- Pull and run theDocker image with your OpenRouter API key configured:
docker run -p 3000:3000 \
-e OPENROUTER_API_KEY=your_api_key_here \
ghcr.io/elct9620/perplexity-ask-openrouter:latest
-
The MCP server will start listening on port 3000 inside the container and exposed to the host on port 3000. Adjust PORT as needed via environment variables if supported by the image.
-
Verify the MCP endpoint is reachable:
curl -s http://localhost:3000/mcp | head -n 20
Optional: If you want to customize the model selections or disable specific tools, set the corresponding environment variables documented in the project (e.g., BASE_URL, ASK_MODEL, RESEARCH_MODEL, REASON_MODEL, DISABLE_ASK, DISABLE_RESEARCH, DISABLE_REASON).
Additional notes
Tips and notes:
- REQUIRED: OPENROUTER_API_KEY must be provided to access the OpenRouter backend.
- The server supports both SSE and streamable HTTP transports; use /sse to establish an SSE connection or /mcp for the MCP streamable endpoint.
- If you run into network issues with Docker, ensure port 3000 is accessible and not blocked by a firewall.
- You can customize the default models via environment variables: ASK_MODEL (default perplexity/sonar-pro), RESEARCH_MODEL (default perplexity/sonar-deep-research), and REASON_MODEL (default perplexity/sonar-reasoning-pro).
- Docker image deployments are suitable for cloud environments and CI workflows; you can pin to a specific tag instead of latest for stability.
Related MCP Servers
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
perplexity -zerver
MCP web search using perplexity without any API KEYS
mcp -arangodb
This is a TypeScript-based MCP server that provides database interaction capabilities through ArangoDB. It implements core database operations and allows seamless integration with ArangoDB through MCP tools. You can use it wih Claude app and also extension for VSCode that works with mcp like Cline!
CodeRAG
Advanced graph-based code analysis for AI-assisted software development