Skip to content

Conversation

@kesku
Copy link
Collaborator

@kesku kesku commented Nov 9, 2025

Summary

Migrates the Perplexity MCP Server to support both STDIO and HTTP transports while maintaining backward compatibility. Users can continue using npx @perplexity-ai/mcp-server unchanged, while gaining the ability to deploy as HTTP servers for session based cloud/remote access

Changes

  • Migrated to McpServer API
  • Separate entry points - src/index.ts (STDIO), src/http.ts (HTTP), src/server.ts (shared core)
  • StreamableHTTP transport with full session management and SSE support
  • Express server with CORS, health checks, error handling

Misc

Deployment Options

Local/Development (Unchanged):

npx @perplexity-ai/mcp-server  # Works exactly as before

HTTP/Cloud (New):

# Docker
docker run -p 8080:8080 -e PERPLEXITY_API_KEY=key perplexity-mcp-server

# Node.js
npm run start:http

This migration enables the Perplexity MCP Server to scale from local developer tools to enterprise cloud deployments while maintaining full compatibility with existing users.

- Migrate from Server class to modern McpServer
- Add StreamableHTTP transport with session management and SSE support
- Maintain backward compatibility for existing STDIO users
- Preserve all tool annotations
@kesku kesku requested a review from james-pplx November 9, 2025 15:12
@kesku kesku marked this pull request as ready for review November 19, 2025 17:50
@kesku kesku merged commit 56b6434 into main Nov 19, 2025
2 checks passed
@kesku kesku deleted the kesku/http-transport branch November 19, 2025 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants