@perplexity-ai/mcp-server 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6,14 +6,14 @@
6
6
  },
7
7
  "metadata": {
8
8
  "description": "Official Perplexity AI plugin providing real-time web search, reasoning, and research capabilities",
9
- "version": "0.4.0"
9
+ "version": "0.4.1"
10
10
  },
11
11
  "plugins": [
12
12
  {
13
13
  "name": "perplexity",
14
14
  "source": "./",
15
15
  "description": "Real-time web search, reasoning, and research through Perplexity's API",
16
- "version": "0.4.0",
16
+ "version": "0.4.1",
17
17
  "author": {
18
18
  "name": "Perplexity AI",
19
19
  "email": "api@perplexity.ai"
package/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Perplexity API Platform MCP Server
2
2
 
3
+ [![Install in Cursor](https://custom-icon-badges.demolab.com/badge/Install_in_Cursor-000000?style=for-the-badge&logo=cursor-ai-white)](https://cursor.com/en/install-mcp?name=perplexity&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBwZXJwbGV4aXR5LWFpL21jcC1zZXJ2ZXIiXX0=)
4
+  
5
+ [![Install in VS Code](https://custom-icon-badges.demolab.com/badge/Install_in_VS_Code-007ACC?style=for-the-badge&logo=vsc&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=perplexity&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40perplexity-ai%2Fmcp-server%22%5D%7D)
6
+  
7
+ [![npm version](https://img.shields.io/npm/v/%40perplexity-ai%2Fmcp-server?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/@perplexity-ai/mcp-server)
8
+
3
9
  The official MCP server implementation for the Perplexity API Platform, providing AI assistants with real-time web search, reasoning, and research capabilities through Sonar models and the Search API.
4
10
 
5
11
  Please refer to the official [DeepWiki page](https://deepwiki.com/ppl-ai/modelcontextprotocol) for assistance with implementation.
@@ -76,9 +82,9 @@ Or add to your `claude.json`:
76
82
  }
77
83
  ```
78
84
 
79
- ### Cursor
85
+ ### Cursor / VS Code
80
86
 
81
- Add to your `mcp.json`:
87
+ Add to your `mcp.json` (Cursor) or `.vscode/mcp.json` (VS Code):
82
88
 
83
89
  ```json
84
90
  {
@@ -95,6 +101,8 @@ Add to your `mcp.json`:
95
101
  }
96
102
  ```
97
103
 
104
+ Or use the one-click install badges at the top of this README.
105
+
98
106
  ### Codex
99
107
 
100
108
  Run in your terminal:
@@ -136,7 +144,7 @@ If you are running this server at work—especially behind a company firewall or
136
144
 
137
145
  **1. Get your proxy details**
138
146
 
139
- - Ask your IT department for your HTTP(S) proxy address and port.
147
+ - Ask your IT department for your HTTPS proxy address and port.
140
148
  - You may also need a username and password.
141
149
 
142
150
  **2. Set the proxy environment variable**
@@ -144,20 +152,22 @@ If you are running this server at work—especially behind a company firewall or
144
152
  The easiest and most reliable way for Perplexity MCP is to use `PERPLEXITY_PROXY`. For example:
145
153
 
146
154
  ```bash
147
- export PERPLEXITY_PROXY=http://your-proxy-host:8080
155
+ export PERPLEXITY_PROXY=https://your-proxy-host:8080
148
156
  ```
149
157
 
150
- - If your proxy needs a username and password, use:
151
- ```bash
152
- export PERPLEXITY_PROXY=http://username:password@your-proxy-host:8080
153
- ```
158
+ If your proxy needs a username and password, use:
159
+
160
+ ```bash
161
+ export PERPLEXITY_PROXY=https://username:password@your-proxy-host:8080
162
+ ```
154
163
 
155
164
  **3. Alternate: Standard environment variables**
156
165
 
157
166
  If you'd rather use the standard variables, we support `HTTPS_PROXY` and `HTTP_PROXY`.
158
167
 
159
168
  > [!NOTE]
160
- >The server checks proxy settings in this order: `PERPLEXITY_PROXY` → `HTTPS_PROXY` → `HTTP_PROXY`. If none are set, it connects directly to the internet.
169
+ > The server checks proxy settings in this order: `PERPLEXITY_PROXY` → `HTTPS_PROXY` → `HTTP_PROXY`. If none are set, it connects directly to the internet.
170
+ > URLs must include `https://`. Typical ports are `8080`, `3128`, and `80`.
161
171
 
162
172
  ## Troubleshooting
163
173
 
@@ -165,16 +175,7 @@ If you'd rather use the standard variables, we support `HTTPS_PROXY` and `HTTP_P
165
175
  - **Connection Errors**: Check your internet connection and API key validity
166
176
  - **Tool Not Found**: Make sure the package is installed and the command path is correct
167
177
  - **Timeout Errors**: For very long research queries, set `PERPLEXITY_TIMEOUT_MS` to a higher value
168
- - **Proxy Issues**: If you're behind a corporate firewall and experience connection errors, you likely need to set up a proxy:
169
- - Obtain your proxy server address and port from your IT department.
170
- - Set the environment variable before running the server, e.g.:
171
- - `export PERPLEXITY_PROXY=http://proxy-address:port`
172
- - If authentication is needed: `export PERPLEXITY_PROXY=http://username:password@proxy-address:port`
173
- - Typical proxy ports include 8080, 3128, or 80.
174
- - The format for authenticated proxies is:
175
- `http://username:password@proxy-host:port`
176
- - Double-check the address, port, and credentials if connections fail or time out.
177
- - If you continue to have issues, your firewall may be blocking traffic; ask IT if traffic for `api.perplexity.ai` is being restricted.
178
+ - **Proxy Issues**: Verify your `PERPLEXITY_PROXY` or `HTTPS_PROXY` setup and ensure `api.perplexity.ai` isn't blocked by your firewall.
178
179
 
179
180
  For support, visit [community.perplexity.ai](https://community.perplexity.ai) or [file an issue](https://github.com/perplexityai/modelcontextprotocol/issues).
180
181
 
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ import { fetch as undiciFetch, ProxyAgent } from "undici";
19
19
  */
20
20
  const PERPLEXITY_ASK_TOOL = {
21
21
  name: "perplexity_ask",
22
+ title: "Ask Perplexity",
22
23
  description: "Engages in a conversation using the Sonar API. " +
23
24
  "Accepts an array of messages (each with a role and content) " +
24
25
  "and returns a ask completion response from the Perplexity model.",
@@ -46,6 +47,10 @@ const PERPLEXITY_ASK_TOOL = {
46
47
  },
47
48
  required: ["messages"],
48
49
  },
50
+ annotations: {
51
+ readOnlyHint: true,
52
+ openWorldHint: true,
53
+ },
49
54
  };
50
55
  /**
51
56
  * Definition of the Perplexity Research Tool.
@@ -53,6 +58,7 @@ const PERPLEXITY_ASK_TOOL = {
53
58
  */
54
59
  const PERPLEXITY_RESEARCH_TOOL = {
55
60
  name: "perplexity_research",
61
+ title: "Deep Research",
56
62
  description: "Performs deep research using the Perplexity API. " +
57
63
  "Accepts an array of messages (each with a role and content) " +
58
64
  "and returns a comprehensive research response with citations.",
@@ -84,6 +90,10 @@ const PERPLEXITY_RESEARCH_TOOL = {
84
90
  },
85
91
  required: ["messages"],
86
92
  },
93
+ annotations: {
94
+ readOnlyHint: true,
95
+ openWorldHint: true,
96
+ },
87
97
  };
88
98
  /**
89
99
  * Definition of the Perplexity Reason Tool.
@@ -91,6 +101,7 @@ const PERPLEXITY_RESEARCH_TOOL = {
91
101
  */
92
102
  const PERPLEXITY_REASON_TOOL = {
93
103
  name: "perplexity_reason",
104
+ title: "Advanced Reasoning",
94
105
  description: "Performs reasoning tasks using the Perplexity API. " +
95
106
  "Accepts an array of messages (each with a role and content) " +
96
107
  "and returns a well-reasoned response using the sonar-reasoning-pro model.",
@@ -122,6 +133,10 @@ const PERPLEXITY_REASON_TOOL = {
122
133
  },
123
134
  required: ["messages"],
124
135
  },
136
+ annotations: {
137
+ readOnlyHint: true,
138
+ openWorldHint: true,
139
+ },
125
140
  };
126
141
  /**
127
142
  * Definition of the Perplexity Search Tool.
@@ -129,8 +144,10 @@ const PERPLEXITY_REASON_TOOL = {
129
144
  */
130
145
  const PERPLEXITY_SEARCH_TOOL = {
131
146
  name: "perplexity_search",
147
+ title: "Search the Web",
132
148
  description: "Performs web search using the Perplexity Search API. " +
133
- "Returns ranked search results with titles, URLs, snippets, and metadata.",
149
+ "Returns ranked search results with titles, URLs, snippets, and metadata. " +
150
+ "Perfect for finding up-to-date facts, news, or specific information.",
134
151
  inputSchema: {
135
152
  type: "object",
136
153
  properties: {
@@ -157,6 +174,10 @@ const PERPLEXITY_SEARCH_TOOL = {
157
174
  },
158
175
  required: ["query"],
159
176
  },
177
+ annotations: {
178
+ readOnlyHint: true,
179
+ openWorldHint: true,
180
+ },
160
181
  };
161
182
  // Retrieve the Perplexity API key from environment variables
162
183
  const PERPLEXITY_API_KEY = process.env.PERPLEXITY_API_KEY;
@@ -415,12 +436,23 @@ export function performSearch(query_1) {
415
436
  }
416
437
  // Initialize the server with tool metadata and capabilities
417
438
  const server = new Server({
418
- name: "example-servers/perplexity-ask",
419
- version: "0.1.0",
439
+ name: "io.github.perplexityai/mcp-server",
440
+ version: "0.4.1",
420
441
  }, {
421
442
  capabilities: {
422
443
  tools: {},
423
444
  },
445
+ instructions: `You are the Perplexity MCP Server. Use these tools appropriately:
446
+
447
+ - perplexity_search: For quick web searches when you need current information or facts. Returns ranked search results.
448
+
449
+ - perplexity_ask: For general questions and conversational queries with real-time web search using the sonar-pro model.
450
+
451
+ - perplexity_research: For deep, comprehensive research requiring thorough analysis using the sonar-deep-research model. Use this for complex topics that require detailed investigation.
452
+
453
+ - perplexity_reason: For complex analytical tasks requiring advanced reasoning using the sonar-reasoning-pro model. Use this for logical problems, analysis, and decision-making.
454
+
455
+ When using perplexity_research or perplexity_reason, consider setting strip_thinking=true to save context tokens if the reasoning process isn't needed in the final output.`,
424
456
  });
425
457
  /**
426
458
  * Registers a handler for listing available tools.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perplexity-ai/mcp-server",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "mcpName": "io.github.perplexityai/mcp-server",
5
5
  "description": "Real-time web search, reasoning, and research through Perplexity's API",
6
6
  "keywords": [