Skip to content

Commit 6c6016f

Browse files
authored
Merge pull request #93 from perplexityai/kesku/confirmed-buffet
2 parents 8c31448 + fc47056 commit 6c6016f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/server.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { ChatCompletionResponseSchema, SearchResponseSchema } from "./validation
1313

1414
const PERPLEXITY_API_KEY = process.env.PERPLEXITY_API_KEY;
1515
const PERPLEXITY_BASE_URL = process.env.PERPLEXITY_BASE_URL || "https://api.perplexity.ai";
16+
const VERSION = "0.8.4";
1617

1718
export function getProxyUrl(): string | undefined {
1819
return process.env.PERPLEXITY_PROXY ||
@@ -81,6 +82,8 @@ async function makeApiRequest(
8182
const headers: Record<string, string> = {
8283
"Content-Type": "application/json",
8384
"Authorization": `Bearer ${PERPLEXITY_API_KEY}`,
85+
"User-Agent": `perplexity-mcp/${VERSION}`,
86+
"X-Source": "mcp-server",
8487
};
8588
if (serviceOrigin) {
8689
headers["X-Service"] = serviceOrigin;
@@ -299,7 +302,7 @@ export function createPerplexityServer(serviceOrigin?: string) {
299302
const server = new McpServer(
300303
{
301304
name: "ai.perplexity/mcp-server",
302-
version: "0.8.4",
305+
version: VERSION,
303306
},
304307
{
305308
instructions:

0 commit comments

Comments
 (0)