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.5.2"
"version": "0.6.1"
},
"plugins": [
{
"name": "perplexity",
"source": "./",
"description": "Real-time web search, reasoning, and research through Perplexity's API",
"version": "0.5.2",
"version": "0.6.1",
"author": {
"name": "Perplexity AI",
"email": "api@perplexity.ai"
Expand Down
1,296 changes: 685 additions & 611 deletions package-lock.json

Large diffs are not rendered by default.

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.5.2",
"version": "0.6.1",
"mcpName": "io.github.perplexityai/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": "io.github.perplexityai/mcp-server",
"title": "Perplexity API Platform",
"description": "Real-time web search, reasoning, and research through Perplexity's API",
"version": "0.5.2",
"version": "0.6.1",
"packages": [
{
"registryType": "npm",
"identifier": "@perplexity-ai/mcp-server",
"version": "0.5.2",
"version": "0.6.1",
"transport": {
"type": "stdio"
}
Expand Down
11 changes: 0 additions & 11 deletions src/http.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/
import { createPerplexityServer } from "./server.js";
import { logger } from "./logger.js";

// Check for required API key
const PERPLEXITY_API_KEY = process.env.PERPLEXITY_API_KEY;
if (!PERPLEXITY_API_KEY) {
logger.error("PERPLEXITY_API_KEY environment variable is required");
Expand Down Expand Up @@ -41,10 +40,6 @@ app.use(express.json());

const mcpServer = createPerplexityServer();

/**
* POST: client-to-server messages (requests, responses, notifications)
* GET: SSE stream for server-to-client messages (notifications, requests)
*/
app.all("/mcp", async (req, res) => {
try {
const transport = new StreamableHTTPServerTransport({
Expand All @@ -71,16 +66,10 @@ app.all("/mcp", async (req, res) => {
}
});

/**
* Health check endpoint
*/
app.get("/health", (req, res) => {
res.json({ status: "ok", service: "perplexity-mcp-server" });
});

/**
* Start the HTTP server
*/
app.listen(PORT, BIND_ADDRESS, () => {
logger.info(`Perplexity MCP Server listening on http://${BIND_ADDRESS}:${PORT}/mcp`);
logger.info(`Allowed origins: ${ALLOWED_ORIGINS.join(", ")}`);
Expand Down
8 changes: 1 addition & 7 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
import { createPerplexityServer } from "./server.js";

// Check for required API key
const PERPLEXITY_API_KEY = process.env.PERPLEXITY_API_KEY;
if (!PERPLEXITY_API_KEY) {
console.error("Error: PERPLEXITY_API_KEY environment variable is required");
process.exit(1);
}

/**
* Initializes and runs the server using standard I/O for communication.
* Logs an error and exits if the server fails to start.
*/
async function main() {
try {
const server = createPerplexityServer();
const server = createPerplexityServer("local-mcp");
const transport = new StdioServerTransport();
await server.connect(transport);
} catch (error) {
Expand All @@ -25,7 +20,6 @@ async function main() {
}
}

// Start the server and catch any startup errors
main().catch((error) => {
console.error("Fatal error running server:", error);
process.exit(1);
Expand Down
Loading
Loading