Perplexity Agent MCP
Perplexity Agent MCP
Perplexity AIのSonarモデルをClaude CodeやCodex CLIなどのAIコーディングアシスタントに統合する、コーディングに特化したModel Context Protocolサーバーです。意図的に軽量に設計されており、コンテキストへのトークン追加を最小限に抑えています。APIの構文やドキュメントの詳細を即座に確認するためのlookupと、実行可能な推奨事項を含む包括的な調査のためのanswerという、2つの専門的なツールを提供します。
セットアップ
公開されているパッケージをグローバルにインストールします:
npm install -g perplexity-agent-mcp次に、Claudeの設定ファイル(~/.claude.json または ~/.config/claude/config.json)に追加します:
"mcpServers": {
"perplexity": {
"command": "perplexity-agent-mcp",
"env": {
"PERPLEXITY_API_KEY": "your-api-key-here"
}
}
}保存後にClaude Codeを再起動すれば、準備完了です。
仕組み
このサーバーは、簡潔な説明(約1.3Kトークン)を持つ2つのツールのみを公開し、コンテキストウィンドウを軽量かつ効率的に保ちます:
lookup: ドキュメントから迅速な事実(API構文や設定キーなど)を取得します
answer: より深い調査を行い、選択肢を比較して推奨事項を提示します
内部的には、両ツールともコーディングに特化したシステムプロンプトを使用してPerplexity APIを呼び出す、独自のラッパーとなっています。lookupツールは、コードやドキュメントの事実に焦点を当てたコンパクトな事実抽出プロンプトを使用します(src/index.tsのLOOKUP_SYSTEM_PROMPTを参照)。answerツールは、移行やアーキテクチャの選択に合わせた技術的な意思決定/分析プロンプトを使用します(src/index.tsのANSWER_SYSTEM_PROMPTを参照)。また、サーバーはタスクに適したPerplexityモデルを選択します。lookupにはsonar-pro(src/index.tsのgetLookupModel()を参照)、より深い調査にはsonar-reasoning-pro(src/index.tsのgetAnswerModel()を参照)を使用します。
AIエージェントがこのMCPを使用して良い結果を出すためのプロンプト例:
Please update the "foo" dependency to the latest version. Use Perplexity for the migration guide.要件
Node.js v22.19.0 以降
Perplexity APIキー
テストフック
Available Tools
2 toolsanswerA
Research a question, compare options, and recommend a path (backed by sources). Use for library choices, architecture trade-offs, migrations, complex debugging, and performance decisions. Returns a concise recommendation, a brief why, and short how-to steps.
| Name | Required | Description | Default |
|---|---|---|---|
| question | Yes | The decision or problem to answer |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the tool's behavior as involving research, comparison, and recommendation backed by sources, and specifies the return format ('concise recommendation, a brief why, and short how-to steps'). However, it doesn't cover other important aspects like whether it requires external data access, potential rate limits, or error handling. With no annotations, this is a moderate but incomplete disclosure.
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 appropriately sized and front-loaded, with three sentences that each add value: the first states the core function, the second provides usage examples, and the third specifies the return format. There is no wasted text, and it efficiently conveys key information without redundancy.
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 (a research and recommendation tool with no annotations and no output schema), the description is moderately complete. It explains the tool's purpose, usage, and return format, but lacks details on behavioral traits like data sources, limitations, or error cases. Without an output schema, it does describe the return values, which helps, but overall it could be more comprehensive for such a tool.
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?
The input schema has 100% description coverage, with the 'question' parameter documented as 'The decision or problem to answer.' The description doesn't add any further details about parameters beyond what the schema provides. According to the rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.
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 tool's purpose: 'Research a question, compare options, and recommend a path (backed by sources).' It specifies the verb ('research, compare, recommend') and resource ('question'), making the function evident. However, it doesn't explicitly distinguish this from the sibling tool 'lookup', which might be a similar search or query function, so it lacks sibling differentiation for a perfect 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 clear context for when to use this tool: 'Use for library choices, architecture trade-offs, migrations, complex debugging, and performance decisions.' This gives specific examples of applicable scenarios. However, it doesn't mention when not to use it or explicitly compare it to alternatives like the sibling tool 'lookup', so it falls short of the highest score.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lookupA
Fetch precise, source-backed facts from official sources. Use for API syntax/params, config keys/defaults, CLI flags, runtime compatibility, and package metadata (types, ESM/CJS, side-effects). Returns short, factual answers. No recommendations or comparisons.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | What fact to look up from docs |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and does well by disclosing key behavioral traits: it fetches from official sources, returns short factual answers, and avoids recommendations/comparisons. It doesn't mention rate limits, authentication needs, or error handling, but provides solid operational context.
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 perfectly concise with three sentences that each earn their place: first states purpose, second specifies use cases, third clarifies return behavior and exclusions. No wasted words, front-loaded with core functionality.
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 single parameter with full schema coverage and no output schema, the description provides excellent context about what the tool does, when to use it, and what to expect. It could benefit from mentioning response format or error cases, but covers the essential operational context well.
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 100% with the single parameter 'query' well-documented in the schema. The description adds minimal value beyond the schema by implying the query should be factual lookups, but doesn't provide additional syntax or format details. Baseline 3 is appropriate when schema does the heavy lifting.
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 tool's purpose with specific verbs ('fetch precise, source-backed facts') and resources ('from official sources'), and distinguishes it from its sibling 'answer' by specifying it returns short factual answers without recommendations or comparisons.
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 explicit guidance on when to use this tool ('for API syntax/params, config keys/defaults, CLI flags, runtime compatibility, and package metadata') and when not to use it ('No recommendations or comparisons'), clearly differentiating it from the 'answer' sibling tool.
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.
2 tool updates
v1.0.0- First observed
answer - First observed
lookup
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: 'answer' is for research, comparison, and recommendations on complex decisions, while 'lookup' is for fetching precise, factual information from official sources. There is no overlap in functionality, as one provides recommendations and the other provides facts without recommendations.
Both tool names follow a consistent, simple verb-based pattern ('answer' and 'lookup') that clearly indicates their actions. There are no deviations in naming conventions, making them predictable and easy to understand.
With only two tools, the set feels thin for a server named 'Perplexity Agent MCP', which suggests a broader scope for handling queries and research. While the tools cover distinct areas, more operations (e.g., for follow-up queries or deeper analysis) might be expected to fully support agent workflows.
The tools cover two key areas—complex decision-making and factual lookups—but there are notable gaps. For instance, there are no tools for updating or managing research sessions, handling multi-step interactions, or integrating with external data sources beyond the described lookups, which could limit agent effectiveness in extended tasks.
Maintenance
Related MCP Connectors
Real-time web search, reasoning, and research through Perplexity's API
Enable AI assistants to perform web searches using Perplexity's Sonar Pro.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceProvides access to Perplexity AI models through two tools: ask\_perplexity for expert programming assistance and chat\_perplexity for maintaining ongoing conversations with context preservation.MIT
- AlicenseNot gradedqualityDmaintenanceProvides AI-powered search, research, and reasoning capabilities through integration with Perplexity.ai, offering three specialized tools: general conversational AI, deep research with citations, and advanced reasoning.18 npm2MIT
- FlicenseNot gradedqualityDmaintenanceIntegrates with Perplexity's API to provide web search and AI-powered answers with citations. Offers a three-tier research workflow: search for sources, ask for grounded AI answers, and ask_more for deeper analysis using advanced models.-
- FlicenseBqualityDmaintenanceEnables interaction with Perplexity AI through MCP tools for chatting, searching, and retrieving documentation.51-