Skip to main content
Glama

Perplexity AI MCP Server

by mkusaka

Perplexity AI MCP 服务器

集成 Perplexity AI 的 API 的 MCP 服务器实现,提供具有多种模型选项的高级搜索功能。

特征

  • 使用 Perplexity AI 的模型进行搜索
  • 支持所有官方 Sonar 型号
  • 可配置结果计数
  • 详细的错误处理和日志记录
  • 兼容 MCP Inspector

可用型号

  • sonar-reasoning-pro(127k 上下文)
  • sonar-reasoning(127k 上下文)
  • sonar-pro(200k 上下文)
  • 声纳(127k 上下文)

安装

pnpm install pnpm build

配置

API 密钥

  1. 注册Perplexity AI 帐户
  2. 从仪表板获取您的 API 密钥
  3. 设置环境变量:
export PERPLEXITY_API_KEY=your_api_key_here

用法

直接执行

node dist/index.js # or if you made it executable ./dist/index.js

发展

pnpm dev

使用 MCP Inspector 进行测试

pnpm inspect

工具参考

困惑度搜索

使用 Perplexity AI 的模型执行搜索。

参数:

  • query (字符串,必需):搜索查询
  • model (字符串,可选):要使用的模型(默认值:“sonar”)
    • 可用选项:sonar-reasoning-pro、sonar-reasoning、sonar-pro、sonar
  • count (数字,可选):结果数量(1-10,默认值:5)

发展

项目结构

src/perplexity/ ├── index.ts # Main server implementation ├── lib/ │ └── logger.ts # Logging configuration └── adr.md # Architectural decisions

日志记录

日志写入项目根目录中的perplexity-mcp.log

执照

麻省理工学院

贡献

  1. 分叉存储库
  2. 创建你的功能分支
  3. 提交你的更改
  4. 推送到分支
  5. 创建新的 Pull 请求

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.

MCP 服务器集成了 Perplexity AI 的 API,提供高级搜索功能,支持多种模型和结果配置。

  1. 特征
    1. 可用型号
      1. 安装
        1. 配置
          1. API 密钥
        2. 用法
          1. 直接执行
          2. 发展
          3. 使用 MCP Inspector 进行测试
        3. 工具参考
          1. 困惑度搜索
        4. 发展
          1. 项目结构
          2. 日志记录
        5. 执照
          1. 贡献

            Related MCP Servers

            • A
              security
              F
              license
              A
              quality
              This server allows users to perform web searches using Perplexity AI, providing a tool for retrieving search results through a simple API interface.
              Last updated -
              1
              2
              TypeScript
            • 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
              F
              license
              -
              quality
              Allows Claude or other MCP-compatible AI assistants to search the web and get up-to-date information using the Perplexity API, with features for filtering results by time period.
              Last updated -
              8
              Python
              • Apple

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/mkusaka/mcp-server-perplexity'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server