Skip to main content
Glama
mkusaka

Perplexity AI MCP Server

by mkusaka

Perplexity AI MCP 服务器

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

特征

  • 使用 Perplexity AI 的模型进行搜索

  • 支持所有官方 Sonar 型号

  • 可配置结果计数

  • 详细的错误处理和日志记录

  • 兼容 MCP Inspector

Related MCP server: PPX-MCP

可用型号

  • 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 请求

Available Tools

1 tool

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedperplexity_search

TDQS

B3.1/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool's purpose is clearly defined as searching using Perplexity AI's models, making it distinct by default.

Naming Consistency5/5

The single tool name 'perplexity_search' follows a clear and consistent verb_noun pattern (search as the verb, perplexity as a modifier). With only one tool, naming consistency is inherently perfect as there are no other tools to compare against.

Tool Count2/5

A single tool is generally too few for most server purposes, as it limits functionality and flexibility. For a search-focused server, additional tools like filtering, citation management, or model selection might be expected to provide a more complete experience.

Completeness2/5

The server's domain appears to be search using Perplexity AI, but with only one search tool, there are significant gaps. Missing operations could include advanced search parameters, result refinement, citation handling, or integration with other Perplexity features, making the surface incomplete for typical search workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An unofficial MCP server for Perplexity AI that leverages Pro subscriptions and browser cookies to enable real-time web searches and model selection without an API key. It provides tools for performing queries, listing available models, and automating the login process to manage authentication.
    4
    29 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables AI agents to perform search-augmented queries and deep multi-source research using the Perplexity API.
    59 npm
    25
    Apache 2.0