From 5dc043e7e75403007cb1b768bae05ca554c42ac7 Mon Sep 17 00:00:00 2001 From: Kesku Date: Fri, 19 Dec 2025 16:19:23 +0100 Subject: [PATCH 1/3] docs: Improved client setup details --- README.md | 115 +++++++++++++++--------------------------------------- 1 file changed, 31 insertions(+), 84 deletions(-) diff --git a/README.md b/README.md index 41b7df2..5375c7f 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ The official MCP server implementation for the Perplexity API Platform, providin ### **perplexity_search** Direct web search using the Perplexity Search API. Returns ranked search results with metadata, perfect for finding current information. -### **perplexity_ask** +### **perplexity_ask** General-purpose conversational AI with real-time web search using the `sonar-pro` model. Great for quick questions and everyday searches. ### **perplexity_research** @@ -30,61 +30,37 @@ Advanced reasoning and problem-solving using the `sonar-reasoning-pro` model. Pe ## Configuration ### Get Your API Key + 1. Get your Perplexity API Key from the [API Portal](https://www.perplexity.ai/account/api/group) -2. Set it as an environment variable: `PERPLEXITY_API_KEY=your_key_here` -3. (Optional) Set a timeout for requests: `PERPLEXITY_TIMEOUT_MS=600000`. The default is 5 minutes. -4. (Optional) Set log level for debugging: `PERPLEXITY_LOG_LEVEL=DEBUG|INFO|WARN|ERROR`. The default is ERROR. +2. Replace `your_key_here` in the configurations below with your key +3. (Optional) Set timeout: `PERPLEXITY_TIMEOUT_MS=600000` (default: 5 minutes) +4. (Optional) Set log level: `PERPLEXITY_LOG_LEVEL=DEBUG|INFO|WARN|ERROR` (default: ERROR) ### Claude Code -#### Option 1: Install via Plugin (Recommended) - -The easiest way to get started with Perplexity in Claude Code, set your API key: ```bash -export PERPLEXITY_API_KEY="your_key_here" +claude mcp add perplexity --env PERPLEXITY_API_KEY=your_key_here -- npx -y @perplexity-ai/mcp-server ``` -Then: -```bash -# Open Claude Code -claude - -# Add the Perplexity marketplace -/plugin marketplace add perplexityai/modelcontextprotocol - -# Install the plugin -/plugin install perplexity -``` - -#### Option 2: Manual Configuration - -Run in your terminal: +Or install via plugin: ```bash -claude mcp add perplexity --transport stdio --env PERPLEXITY_API_KEY=your_key_here -- npx -y perplexity-mcp +export PERPLEXITY_API_KEY="your_key_here" +claude +# Then run: /plugin marketplace add perplexityai/modelcontextprotocol +# Then run: /plugin install perplexity ``` -Or add to your `claude.json`: +### Cursor, Claude Desktop & Windsurf -```json -"mcpServers": { - "perplexity": { - "type": "stdio", - "command": "npx", - "args": [ - "-y", - "perplexity-mcp" - ], - "env": { - "PERPLEXITY_API_KEY": "your_key_here", - "PERPLEXITY_TIMEOUT_MS": "600000" - } - } -} -``` +Use the one-click install badges at the top of this README for Cursor. -### Cursor +For manual setup, all these clients use the same `mcpServers` format: -Add to your `mcp.json` (Cursor): +| Client | Config File | +|--------|-------------| +| Cursor | `~/.cursor/mcp.json` | +| Claude Desktop | `claude_desktop_config.json` | +| Windsurf | `~/.codeium/windsurf/mcp_config.json` | ```json { @@ -100,65 +76,36 @@ Add to your `mcp.json` (Cursor): } ``` -### VS Code - -Add to your `.vscode/mcp.json` (VS Code): - -```json -{ - "servers": { - "perplexity": { - "type": "stdio", - "command": "npx", - "args": [ - "-y", - "@perplexity-ai/mcp-server" - ], - "env": { - "PERPLEXITY_API_KEY": "your_key_here" - } - } - } -} -``` - -Or use the one-click install badges at the top of this README. - -### Codex - -Run in your terminal: - -```bash -codex mcp add perplexity --env PERPLEXITY_API_KEY=your_key_here -- npx -y @perplexity-ai/mcp-server -``` - -### Claude Desktop +## VS Code -Add to your `claude_desktop_config.json`: +Use the one-click install badge at the top of this README for VS Code, for manual setup, add to `.vscode/mcp.json`: ```json { - "mcpServers": { + "servers": { "perplexity": { + "type": "stdio", "command": "npx", "args": ["-y", "@perplexity-ai/mcp-server"], "env": { - "PERPLEXITY_API_KEY": "your_key_here", - "PERPLEXITY_TIMEOUT_MS": "600000" + "PERPLEXITY_API_KEY": "your_key_here" } } } } ``` -### Other MCP Clients - -For any MCP-compatible client, use: +### Codex ```bash -npx @perplexity-ai/mcp-server +codex mcp add perplexity --env PERPLEXITY_API_KEY=your_key_here -- npx -y @perplexity-ai/mcp-server ``` +### Other MCP Clients + + +Most clients can be manually configured to use the `mcpServers` wrapper in their configuration file (like Cursor). If your client doesn't work, check its documentation for the correct wrapper format. + ### Proxy Setup (For Corporate Networks) If you are running this server at work—especially behind a company firewall or proxy—you may need to tell the program how to send its internet traffic through your network's proxy. Follow these steps: From 5b4685ff1f248a37d3db185dd210ba892c11f6a5 Mon Sep 17 00:00:00 2001 From: Kesku Date: Fri, 19 Dec 2025 16:24:58 +0100 Subject: [PATCH 2/3] docs: update wording --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5375c7f..9a6f282 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ claude ### Cursor, Claude Desktop & Windsurf -Use the one-click install badges at the top of this README for Cursor. +We recommend using the one-click install badge at the top of this README for Cursor. For manual setup, all these clients use the same `mcpServers` format: @@ -78,7 +78,7 @@ For manual setup, all these clients use the same `mcpServers` format: ## VS Code -Use the one-click install badge at the top of this README for VS Code, for manual setup, add to `.vscode/mcp.json`: +We recommend using the one-click install badge at the top of this README for VS Code, or for manual setup, add to `.vscode/mcp.json`: ```json { From 55aba8c07b19fc5749ca1d32eeb5c820e1c89787 Mon Sep 17 00:00:00 2001 From: Kesku Date: Fri, 19 Dec 2025 16:26:05 +0100 Subject: [PATCH 3/3] fix quotes --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9a6f282..b214be5 100644 --- a/README.md +++ b/README.md @@ -32,14 +32,14 @@ Advanced reasoning and problem-solving using the `sonar-reasoning-pro` model. Pe ### Get Your API Key 1. Get your Perplexity API Key from the [API Portal](https://www.perplexity.ai/account/api/group) -2. Replace `your_key_here` in the configurations below with your key +2. Replace `your_key_here` in the configurations below with your API key 3. (Optional) Set timeout: `PERPLEXITY_TIMEOUT_MS=600000` (default: 5 minutes) 4. (Optional) Set log level: `PERPLEXITY_LOG_LEVEL=DEBUG|INFO|WARN|ERROR` (default: ERROR) ### Claude Code ```bash -claude mcp add perplexity --env PERPLEXITY_API_KEY=your_key_here -- npx -y @perplexity-ai/mcp-server +claude mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server ``` Or install via plugin: @@ -98,7 +98,7 @@ We recommend using the one-click install badge at the top of this README for VS ### Codex ```bash -codex mcp add perplexity --env PERPLEXITY_API_KEY=your_key_here -- npx -y @perplexity-ai/mcp-server +codex mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server ``` ### Other MCP Clients