Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
},
"metadata": {
"description": "Official Perplexity AI plugin providing real-time web search, reasoning, and research capabilities",
"version": "0.8.4"
"version": "0.9.0"
},
"plugins": [
{
"name": "perplexity",
"source": "./",
"description": "Real-time web search, reasoning, and research through Perplexity's API",
"version": "0.8.4",
"version": "0.9.0",
"author": {
"name": "Perplexity AI",
"email": "api@perplexity.ai"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@perplexity-ai/mcp-server",
"version": "0.8.4",
"version": "0.9.0",
"mcpName": "ai.perplexity/mcp-server",
"description": "Real-time web search, reasoning, and research through Perplexity's API",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions server.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"name": "ai.perplexity/mcp-server",
"title": "Perplexity API Platform",
"description": "Real-time web search, reasoning, and research through Perplexity's API",
"version": "0.8.4",
"version": "0.9.0",
"packages": [
{
"registryType": "npm",
"identifier": "@perplexity-ai/mcp-server",
"version": "0.8.4",
"version": "0.9.0",
"transport": {
"type": "stdio"
}
Expand Down
9 changes: 5 additions & 4 deletions src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,11 @@ describe("Perplexity MCP Server", () => {
"https://api.perplexity.ai/chat/completions",
expect.objectContaining({
method: "POST",
headers: {
headers: expect.objectContaining({
"Content-Type": "application/json",
Authorization: "Bearer test-api-key",
},
"X-Source": "pplx-mcp-server",
}),
body: JSON.stringify({
model: "sonar-pro",
messages,
Expand Down Expand Up @@ -200,10 +201,10 @@ describe("Perplexity MCP Server", () => {
"https://api.perplexity.ai/search",
expect.objectContaining({
method: "POST",
headers: {
headers: expect.objectContaining({
"Content-Type": "application/json",
Authorization: "Bearer test-api-key",
},
}),
body: JSON.stringify({
query: "test query",
max_results: 10,
Expand Down
5 changes: 4 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { ChatCompletionResponseSchema, SearchResponseSchema } from "./validation

const PERPLEXITY_API_KEY = process.env.PERPLEXITY_API_KEY;
const PERPLEXITY_BASE_URL = process.env.PERPLEXITY_BASE_URL || "https://api.perplexity.ai";
const VERSION = "0.9.0";

export function getProxyUrl(): string | undefined {
return process.env.PERPLEXITY_PROXY ||
Expand Down Expand Up @@ -81,6 +82,8 @@ async function makeApiRequest(
const headers: Record<string, string> = {
"Content-Type": "application/json",
"Authorization": `Bearer ${PERPLEXITY_API_KEY}`,
"User-Agent": `perplexity-mcp/${VERSION}`,
"X-Source": "pplx-mcp-server",
};
if (serviceOrigin) {
headers["X-Service"] = serviceOrigin;
Expand Down Expand Up @@ -299,7 +302,7 @@ export function createPerplexityServer(serviceOrigin?: string) {
const server = new McpServer(
{
name: "ai.perplexity/mcp-server",
version: "0.8.4",
version: VERSION,
},
{
instructions:
Expand Down
Loading