Perplexity AI MCP Server
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 密钥
从仪表板获取您的 API 密钥
设置环境变量:
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 。
执照
麻省理工学院
贡献
分叉存储库
创建你的功能分支
提交你的更改
推送到分支
创建新的 Pull 请求
Available Tools
1 toolperplexity_searchC
Search using Perplexity AI's models with context-aware responses and citations
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| model | No | Model to use (sonar-reasoning-pro, sonar-reasoning, sonar-pro, sonar) | sonar |
| count | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'context-aware responses and citations', which adds some value about output characteristics, but fails to address critical aspects like whether this is a read-only operation, potential rate limits, authentication requirements, or error handling. For a search tool with zero annotation coverage, this leaves significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that conveys the core functionality without unnecessary words. It's appropriately sized and front-loaded with the essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a search tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns (beyond mentioning 'responses and citations'), doesn't cover parameter meanings beyond what little the schema provides, and leaves behavioral aspects unclear. This is inadequate for proper tool selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 33% (only the 'model' parameter has a description), so the description needs to compensate but doesn't mention any parameters. The baseline would be lower, but since there are only 3 parameters and one is well-documented in the schema, the description's failure to add parameter context results in a minimal viable score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Search') and the resource ('Perplexity AI's models'), specifying it provides 'context-aware responses and citations'. However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, prerequisites, or exclusions. It only states what the tool does without contextual usage information.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v1.0.0- First observed
perplexity_search
TDQS
Scored across 1 tool
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.
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.
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.
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
Related MCP Connectors
An MCP server that integrates with Discord to provide AI-powered features.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Related MCP Servers
- MIT
- AlicenseAqualityDmaintenanceAn 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.429 npmMIT
- AlicenseNot gradedqualityFmaintenanceAn MCP server that integrates with Poe's API to provide AI-powered search and research tools from Perplexity, Reka, Exa, and Linkup.19 npm8MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to perform search-augmented queries and deep multi-source research using the Perplexity API.59 npm25Apache 2.0