{"id":24538785,"url":"https://github.com/spences10/mcp-perplexity-search","last_synced_at":"2025-03-16T02:25:31.170Z","repository":{"id":273664950,"uuid":"920491387","full_name":"spences10/mcp-perplexity-search","owner":"spences10","description":"🔎 A Model Context Protocol (MCP) server for integrating Perplexity's AI API with LLMs.","archived":false,"fork":false,"pushed_at":"2025-03-08T10:09:27.000Z","size":56,"stargazers_count":5,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-08T11:19:37.895Z","etag":null,"topics":["mcp","model-context-protocol","perplexity","search"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spences10.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-22T08:48:04.000Z","updated_at":"2025-03-02T17:27:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"ce718ff0-7f12-4ed9-a513-0b082208e362","html_url":"https://github.com/spences10/mcp-perplexity-search","commit_stats":null,"previous_names":["spences10/mcp-perplexity-search"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spences10%2Fmcp-perplexity-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spences10%2Fmcp-perplexity-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spences10%2Fmcp-perplexity-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spences10%2Fmcp-perplexity-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spences10","download_url":"https://codeload.github.com/spences10/mcp-perplexity-search/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814980,"owners_count":20352077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mcp","model-context-protocol","perplexity","search"],"created_at":"2025-01-22T15:15:30.655Z","updated_at":"2025-03-16T02:25:31.141Z","avatar_url":"https://github.com/spences10.png","language":"JavaScript","funding_links":[],"categories":["Content Creation","Search \u0026 Data Extraction"],"sub_categories":["How to Submit"],"readme":"# mcp-perplexity-search\n\nA Model Context Protocol (MCP) server for integrating Perplexity's AI\nAPI with LLMs. This server provides advanced chat completion\ncapabilities with specialized prompt templates for various use cases.\n\n\u003ca href=\"https://glama.ai/mcp/servers/zlqdizpsr9\"\u003e\n  \u003cimg width=\"380\" height=\"200\" src=\"https://glama.ai/mcp/servers/zlqdizpsr9/badge\" /\u003e\n\u003c/a\u003e\n\n## Features\n\n- 🤖 Advanced chat completion using Perplexity's AI models\n- 📝 Predefined prompt templates for common scenarios:\n  - Technical documentation generation\n  - Security best practices analysis\n  - Code review and improvements\n  - API documentation in structured format\n- 🎯 Custom template support for specialized use cases\n- 📊 Multiple output formats (text, markdown, JSON)\n- 🔍 Optional source URL inclusion in responses\n- ⚙️ Configurable model parameters (temperature, max tokens)\n- 🚀 Support for various Perplexity models including Sonar and LLaMA\n\n## Configuration\n\nThis server requires configuration through your MCP client. Here are\nexamples for different environments:\n\n### Cline Configuration\n\nAdd this to your Cline MCP settings:\n\n```json\n{\n\t\"mcpServers\": {\n\t\t\"mcp-perplexity-search\": {\n\t\t\t\"command\": \"npx\",\n\t\t\t\"args\": [\"-y\", \"mcp-perplexity-search\"],\n\t\t\t\"env\": {\n\t\t\t\t\"PERPLEXITY_API_KEY\": \"your-perplexity-api-key\"\n\t\t\t}\n\t\t}\n\t}\n}\n```\n\n### Claude Desktop with WSL Configuration\n\nFor WSL environments, add this to your Claude Desktop configuration:\n\n```json\n{\n\t\"mcpServers\": {\n\t\t\"mcp-perplexity-search\": {\n\t\t\t\"command\": \"wsl.exe\",\n\t\t\t\"args\": [\n\t\t\t\t\"bash\",\n\t\t\t\t\"-c\",\n\t\t\t\t\"source ~/.nvm/nvm.sh \u0026\u0026 PERPLEXITY_API_KEY=your-perplexity-api-key /home/username/.nvm/versions/node/v20.12.1/bin/npx mcp-perplexity-search\"\n\t\t\t]\n\t\t}\n\t}\n}\n```\n\n### Environment Variables\n\nThe server requires the following environment variable:\n\n- `PERPLEXITY_API_KEY`: Your Perplexity API key (required)\n\n## API\n\nThe server implements a single MCP tool with configurable parameters:\n\n### chat_completion\n\nGenerate chat completions using the Perplexity API with support for\nspecialized prompt templates.\n\nParameters:\n\n- `messages` (array, required): Array of message objects with:\n  - `role` (string): 'system', 'user', or 'assistant'\n  - `content` (string): The message content\n- `prompt_template` (string, optional): Predefined template to use:\n  - `technical_docs`: Technical documentation with code examples\n  - `security_practices`: Security implementation guidelines\n  - `code_review`: Code analysis and improvements\n  - `api_docs`: API documentation in JSON format\n- `custom_template` (object, optional): Custom prompt template with:\n  - `system` (string): System message for assistant behaviour\n  - `format` (string): Output format preference\n  - `include_sources` (boolean): Whether to include sources\n- `format` (string, optional): 'text', 'markdown', or 'json' (default:\n  'text')\n- `include_sources` (boolean, optional): Include source URLs (default:\n  false)\n- `model` (string, optional): Perplexity model to use (default:\n  'sonar')\n- `temperature` (number, optional): Output randomness (0-1, default:\n  0.7)\n- `max_tokens` (number, optional): Maximum response length\n  (default: 1024)\n\n## Development\n\n### Setup\n\n1. Clone the repository\n2. Install dependencies:\n\n```bash\npnpm install\n```\n\n3. Build the project:\n\n```bash\npnpm build\n```\n\n4. Run in development mode:\n\n```bash\npnpm dev\n```\n\n### Publishing\n\nThe project uses changesets for version management. To publish:\n\n1. Create a changeset:\n\n```bash\npnpm changeset\n```\n\n2. Version the package:\n\n```bash\npnpm changeset version\n```\n\n3. Publish to npm:\n\n```bash\npnpm release\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nMIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Built on the\n  [Model Context Protocol](https://github.com/modelcontextprotocol)\n- Powered by\n  [Perplexity SONAR](https://docs.perplexity.ai/api-reference/chat-completions)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspences10%2Fmcp-perplexity-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspences10%2Fmcp-perplexity-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspences10%2Fmcp-perplexity-search/lists"}