MCP Perplexity Search

Integrations

  • Integrates with Perplexity's AI API to provide advanced chat completion capabilities with specialized prompt templates for various use cases like technical documentation generation, security analysis, code review, and API documentation.

mcp-困惑度搜索


⚠️ 通知

此存储库不再维护。

该工具的功能现已在mcp-omnisearch中提供,它将多个 MCP 工具组合在一个统一的包中。

请改用mcp-omnisearch


一个模型上下文协议 (MCP) 服务器,用于将 Perplexity 的 AI API 与 LLM 集成。该服务器提供高级聊天补全功能,并针对各种用例提供专用的提示模板。

特征

  • 🤖 使用 Perplexity 的 AI 模型完成高级聊天
  • 📝 常见场景的预定义提示模板:
    • 技术文档生成
    • 安全最佳实践分析
    • 代码审查和改进
    • 结构化格式的 API 文档
  • 🎯 针对特殊用例的自定义模板支持
  • 📊 多种输出格式(文本、markdown、JSON)
  • 🔍 响应中可选包含源 URL
  • ⚙️ 可配置模型参数(温度、最大代币数量)
  • 🚀 支持包括 Sonar 和 LLaMA 在内的各种 Perplexity 模型

配置

此服务器需要通过您的 MCP 客户端进行配置。以下是不同环境的示例:

克莱恩配置

将其添加到您的 Cline MCP 设置中:

{ "mcpServers": { "mcp-perplexity-search": { "command": "npx", "args": ["-y", "mcp-perplexity-search"], "env": { "PERPLEXITY_API_KEY": "your-perplexity-api-key" } } } }

带有 WSL 配置的 Claude 桌面

对于 WSL 环境,将其添加到您的 Claude Desktop 配置中:

{ "mcpServers": { "mcp-perplexity-search": { "command": "wsl.exe", "args": [ "bash", "-c", "source ~/.nvm/nvm.sh && PERPLEXITY_API_KEY=your-perplexity-api-key /home/username/.nvm/versions/node/v20.12.1/bin/npx mcp-perplexity-search" ] } } }

环境变量

服务器需要以下环境变量:

  • PERPLEXITY_API_KEY :您的 Perplexity API 密钥(必需)

API

服务器实现了具有可配置参数的单个 MCP 工具:

聊天完成

使用 Perplexity API 生成聊天完成,并支持专门的提示模板。

参数:

  • messages (数组,必需):消息对象数组,包含以下内容:
    • role (字符串):“系统”、“用户”或“助理”
    • content (字符串):消息内容
  • prompt_template (字符串,可选):要使用的预定义模板:
    • technical_docs :包含代码示例的技术文档
    • security_practices :安全实施指南
    • code_review :代码分析和改进
    • api_docs :JSON 格式的 API 文档
  • custom_template (对象,可选):自定义提示模板,包括:
    • system (字符串):助手行为的系统消息
    • format (字符串):输出格式偏好
    • include_sources (布尔值):是否包含源
  • format (字符串,可选):“text”、“markdown”或“json”(默认值:“text”)
  • include_sources (布尔值,可选):包含源 URL(默认值:false)
  • model (字符串,可选):要使用的困惑度模型(默认值:'sonar')
  • temperature (数字,可选):输出随机性(0-1,默认值:0.7)
  • max_tokens (数字,可选):最大响应长度(默认值:1024)

发展

设置

  1. 克隆存储库
  2. 安装依赖项:
pnpm install
  1. 构建项目:
pnpm build
  1. 以开发模式运行:
pnpm dev

出版

该项目使用变更集进行版本管理。要发布:

  1. 创建变更集:
pnpm changeset
  1. 对包进行版本控制:
pnpm changeset version
  1. 发布到 npm:
pnpm release

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

执照

MIT 许可证 - 有关详细信息,请参阅LICENSE文件。

致谢

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

实现 Perplexity 的 AI API 与 LLM 的集成,通过利用专门的提示模板来完成技术文档、代码审查和 API 文档等任务,从而提供高级聊天完成功能。

  1. ⚠️ Notice
    1. Features
      1. Configuration
        1. Cline Configuration
        2. Claude Desktop with WSL Configuration
        3. Environment Variables
      2. API
        1. chat_completion
      3. Development
        1. Setup
        2. Publishing
      4. Contributing
        1. License
          1. Acknowledgments

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              This server provides access to the Perplexity AI API, enabling interaction through chatting, searching, and documentation retrieval within MCP-based systems.
              Last updated -
              5
              2
              JavaScript
            • A
              security
              F
              license
              A
              quality
              Provides a standardized way to integrate Perplexity AI's features like chat, search, and documentation access into MCP-based systems.
              Last updated -
              5
              JavaScript
            • -
              security
              A
              license
              -
              quality
              Enables LLMs to interact with Dify AI's chat completion API, including conversation context support and a restaurant recommendation tool.
              Last updated -
              9
              JavaScript
              MIT License
            • A
              security
              F
              license
              A
              quality
              A Node.js implementation that enables Claude to interact with Perplexity AI's language models through Anthropic's Model Context Protocol, providing tools for advanced chat completions and quick queries.
              Last updated -
              2
              6
              TypeScript
              • Apple
              • Linux

            View all related MCP servers

            ID: zlqdizpsr9