MCP Perplexity Proxy Server
by nikolaospapagiannis
This Node.js server acts as a proxy for Perplexity AI's Sonar models. It supports both OpenAI-compatible and MCP-native requests with streaming.
View on GitHub
Last updated: N/A
๐ MCP Perplexity Proxy Server
This Node.js server proxies OpenAI-compatible or MCP-native requests to Perplexity AI's Sonar models with streaming support.
๐ง Run locally
docker-compose up --build
๐ Supported APIs
- POST
/v1/chat/completions
(OpenAI-compatible) - POST
/mcp-stream
(MCP-native) - GET
/
(Swagger UI)
โ Usage in CLine / Cursor / RooCode
{
"provider": "openai",
"api_base": "http://localhost:3000/v1",
"api_key": "dummy"
}
๐งช Local Testing
curl -X POST http://localhost:3000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"sonar-reasoning-pro","messages":[{"role":"user","content":"Was ist JSON.stringify?"}]}'