Perplexity API MCP Server
Perplexity API 플랫폼 MCP 서버
Perplexity API 플랫폼을 위한 공식 MCP 서버 구현체로, Sonar 모델과 검색 API를 통해 AI 어시스턴트에게 실시간 웹 검색, 추론 및 조사 기능을 제공합니다.
사용 가능한 도구
perplexity_search
Perplexity 검색 API를 사용한 직접적인 웹 검색입니다. 메타데이터가 포함된 순위가 지정된 검색 결과를 반환하며, 최신 정보를 찾는 데 적합합니다.
perplexity_ask
sonar-pro 모델을 사용하여 실시간 웹 검색을 수행하는 범용 대화형 AI입니다. 빠른 질문과 일상적인 검색에 유용합니다.
perplexity_research
sonar-deep-research 모델을 사용한 심층적이고 포괄적인 조사입니다. 철저한 분석과 상세한 보고서 작성에 이상적입니다.
perplexity_reason
sonar-reasoning-pro 모델을 사용한 고급 추론 및 문제 해결입니다. 복잡한 분석 작업에 적합합니다.
[!TIP] perplexity_reason 및 perplexity_research에서 선택적 매개변수로 사용 가능:
strip_thinking
true로 설정하면 응답에서<think>...</think>태그를 제거하여 컨텍스트 토큰을 절약합니다. 기본값:false
구성
API 키 가져오기
API 포털에서 Perplexity API 키를 받으세요.
아래 구성에서
your_key_here를 본인의 API 키로 교체하세요.(선택 사항) 타임아웃 설정:
PERPLEXITY_TIMEOUT_MS=600000(기본값: 5분)(선택 사항) 사용자 지정 기본 URL 설정:
PERPLEXITY_BASE_URL=https://your-custom-url.com(기본값: https://api.perplexity.ai)(선택 사항) 로그 레벨 설정:
PERPLEXITY_LOG_LEVEL=DEBUG|INFO|WARN|ERROR(기본값: ERROR)
Claude Code
claude mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server또는 플러그인을 통해 설치:
export PERPLEXITY_API_KEY="your_key_here"
claude
# Then run: /plugin marketplace add perplexityai/modelcontextprotocol
# Then run: /plugin install perplexityCodex
codex mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-serverCursor, Claude Desktop, Kiro, Windsurf 및 VS Code
대부분의 클라이언트는 클라이언트 구성에서 동일한 mcpServers 래퍼를 사용하여 수동으로 구성할 수 있습니다(Cursor의 경우와 같이). 클라이언트의 스키마가 다른 경우, 해당 문서에서 정확한 래퍼 형식을 확인하세요.
수동 설정을 위해 이러한 클라이언트는 모두 동일한 mcpServers 구조를 사용합니다:
클라이언트 | 구성 파일 |
Cursor |
|
Claude Desktop |
|
Kiro |
|
Windsurf |
|
VS Code |
|
{
"mcpServers": {
"perplexity": {
"command": "npx",
"args": ["-y", "@perplexity-ai/mcp-server"],
"env": {
"PERPLEXITY_API_KEY": "your_key_here"
}
}
}
}프록시 설정 (기업 네트워크용)
회사 내부에서 이 서버를 실행하는 경우(특히 회사 방화벽이나 프록시 뒤에 있는 경우), 프로그램이 네트워크 프록시를 통해 인터넷 트래픽을 보내도록 설정해야 할 수 있습니다. 다음 단계를 따르세요:
1. 프록시 세부 정보 확인
IT 부서에 HTTPS 프록시 주소와 포트를 문의하세요.
사용자 이름과 비밀번호가 필요할 수도 있습니다.
2. 프록시 환경 변수 설정
Perplexity MCP의 경우 가장 쉽고 안정적인 방법은 PERPLEXITY_PROXY를 사용하는 것입니다. 예:
export PERPLEXITY_PROXY=https://your-proxy-host:8080프록시에 사용자 이름과 비밀번호가 필요한 경우:
export PERPLEXITY_PROXY=https://username:password@your-proxy-host:80803. 대안: 표준 환경 변수
표준 변수를 사용하려면 HTTPS_PROXY 및 HTTP_PROXY를 지원합니다.
[!NOTE] 서버는
PERPLEXITY_PROXY→HTTPS_PROXY→HTTP_PROXY순서로 프록시 설정을 확인합니다. 설정된 값이 없으면 인터넷에 직접 연결합니다. URL에는https://가 포함되어야 합니다. 일반적인 포트는8080,3128,80입니다.
HTTP 서버 배포
클라우드 또는 공유 배포의 경우 서버를 HTTP 모드로 실행하세요.
환경 변수
변수 | 설명 | 기본값 |
| Perplexity API 키 | 필수 |
| API 요청을 위한 사용자 지정 기본 URL |
|
| HTTP 서버 포트 |
|
| 바인딩할 네트워크 인터페이스 |
|
| CORS 오리진 (쉼표로 구분) |
|
Docker
docker build -t perplexity-mcp-server .
docker run -p 8080:8080 -e PERPLEXITY_API_KEY=your_key_here perplexity-mcp-serverNode.js
export PERPLEXITY_API_KEY=your_key_here
npm install && npm run build && npm run start:http서버는 http://localhost:8080/mcp에서 액세스할 수 있습니다.
문제 해결
API 키 문제:
PERPLEXITY_API_KEY가 올바르게 설정되었는지 확인하세요.연결 오류: 인터넷 연결 및 API 키 유효성을 확인하세요.
도구를 찾을 수 없음: 패키지가 설치되어 있고 명령 경로가 올바른지 확인하세요.
타임아웃 오류: 매우 긴 조사 쿼리의 경우
PERPLEXITY_TIMEOUT_MS를 더 높은 값으로 설정하세요.프록시 문제:
PERPLEXITY_PROXY또는HTTPS_PROXY설정을 확인하고api.perplexity.ai가 방화벽에 의해 차단되지 않았는지 확인하세요.EOF / 초기화 오류: 일부 엄격한 MCP 클라이언트는
npx가 설치 메시지를 stdout에 쓰기 때문에 실패합니다. 이 출력을 억제하려면npx -y대신npx -yq를 사용하세요.
지원이 필요하면 community.perplexity.ai를 방문하거나 이슈를 제기하세요.
Available Tools
4 toolsperplexity_askAsk PerplexityARead-only
Answer a question using web-grounded AI (Sonar Pro model). Best for: quick factual questions, summaries, explanations, and general Q&A. Returns a text response with numbered citations. Fastest and cheapest option. Supports filtering by recency (hour/day/week/month/year), domain restrictions, and search context size. For in-depth multi-source research, use perplexity_research instead. For step-by-step reasoning and analysis, use perplexity_reason instead.
| Name | Required | Description | Default |
|---|---|---|---|
| messages | Yes | Array of conversation messages | |
| search_recency_filter | No | Filter search results by recency. Use 'hour' for very recent news, 'day' for today's updates, 'week' for this week, etc. | |
| search_domain_filter | No | Restrict search results to specific domains (e.g., ['wikipedia.org', 'arxiv.org']). Use '-' prefix for exclusion (e.g., ['-reddit.com']). | |
| search_context_size | No | Controls how much web context is retrieved. 'low' (default) is fastest, 'high' provides more comprehensive results. |
Output Schema
| Name | Required | Description |
|---|---|---|
| response | Yes | AI-generated text response with numbered citation references |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations indicate read-only, open-world, non-destructive behavior. The description adds context beyond annotations: returns numbered citations, supports specific filter types, and notes speed/cost trade-offs. It does not contradict annotations, and the added behavioral details are valuable for expectation-setting.
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?
Every sentence earns its place: purpose, use cases, output format, performance, filters, and alternatives. It is front-loaded and clearly structured, with no wasted words despite covering multiple facets.
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 tool's moderate complexity, the presence of an output schema, and rich annotations, the description covers all essential aspects: operation, output, configuration, and tool differentiation. It is fully sufficient for an agent to select and invoke the tool correctly.
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%, so the parameter semantics are already documented. The description restates filter types (recency, domain, context size) but does not meaningfully enrich beyond the schema's own descriptions. Baseline 3 is appropriate because the schema carries the burden.
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 opens with a specific verb and resource: 'Answer a question using web-grounded AI (Sonar Pro model).' It clearly contrasts with sibling tools by naming perplexity_research and perplexity_reason, making the tool's specific role unmistakable.
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?
Provides explicit 'Best for' scenarios (quick factual questions, summaries, explanations, general Q&A), performance expectations ('Fastest and cheapest'), and direct alternatives ('For in-depth multi-source research, use perplexity_research instead'). This gives agents clear when-to-use and when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
perplexity_reasonAdvanced ReasoningARead-only
Analyze a question using step-by-step reasoning with web grounding (Sonar Reasoning Pro model). Best for: math, logic, comparisons, complex arguments, and tasks requiring chain-of-thought. Returns a reasoned response with numbered citations. Supports filtering by recency (hour/day/week/month/year), domain restrictions, and search context size. For quick factual questions, use perplexity_ask instead. For comprehensive multi-source research, use perplexity_research instead.
| Name | Required | Description | Default |
|---|---|---|---|
| messages | Yes | Array of conversation messages | |
| strip_thinking | No | If true, removes <think>...</think> tags and their content from the response to save context tokens. Default is false. | |
| search_recency_filter | No | Filter search results by recency. Use 'hour' for very recent news, 'day' for today's updates, 'week' for this week, etc. | |
| search_domain_filter | No | Restrict search results to specific domains (e.g., ['wikipedia.org', 'arxiv.org']). Use '-' prefix for exclusion (e.g., ['-reddit.com']). | |
| search_context_size | No | Controls how much web context is retrieved. 'low' (default) is fastest, 'high' provides more comprehensive results. |
Output Schema
| Name | Required | Description |
|---|---|---|
| response | Yes | AI-generated text response with numbered citation references |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, indicating a safe read operation. The description adds useful behavioral context beyond annotations, such as the reasoning model ('Sonar Reasoning Pro model'), the step-by-step nature of the analysis, and the presence of numbered citations in the output. These details help the agent anticipate response style and value. However, it doesn't explicitly mention potential latency or token usage, which could be relevant for a reasoning-heavy tool.
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 concise and well-structured, with four sentences covering purpose, usage cases, output features, and alternatives. It is front-loaded with the core function and uses no filler. Every sentence adds valuable information, making the description efficient and easy to parse.
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 tool's complexity (5 params, output schema, annotations), the description is complete: it covers what the tool does, when to use it, when not to use it, and what to expect in the response. The output schema exists, so return values need not be described. The combination of annotations, schema, and description provides a comprehensive picture.
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 all 5 parameters thoroughly documented in the schema. The description mentions 'Supports filtering by recency (hour/day/week/month/year), domain restrictions, and search context size,' which echoes schema properties without adding new semantic depth. It does not explain parameter interactions or provide extra context beyond the schema, so a baseline score of 3 is appropriate.
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 function: 'Analyze a question using step-by-step reasoning with web grounding (Sonar Reasoning Pro model).' It distinguishes itself from siblings by specifying its niche: 'Best for: math, logic, comparisons, complex arguments, and tasks requiring chain-of-thought.' It also notes the return format: 'Returns a reasoned response with numbered citations.' This is a specific verb+resource+scope with clear differentiation.
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 usage guidance, stating 'For quick factual questions, use perplexity_ask instead. For comprehensive multi-source research, use perplexity_research instead.' It also lists ideal use cases ('Best for: math, logic, comparisons...'), giving the agent clear criteria for when to choose this tool over alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
perplexity_researchDeep ResearchARead-only
Conduct deep, multi-source research on a topic (Sonar Deep Research model). Best for: literature reviews, comprehensive overviews, investigative queries needing many sources. Returns a detailed response with numbered citations. Significantly slower than other tools (30+ seconds). For quick factual questions, use perplexity_ask instead. For logical analysis and reasoning, use perplexity_reason instead.
| Name | Required | Description | Default |
|---|---|---|---|
| messages | Yes | Array of conversation messages | |
| strip_thinking | No | If true, removes <think>...</think> tags and their content from the response to save context tokens. Default is false. | |
| reasoning_effort | No | Controls depth of deep research reasoning. Higher values produce more thorough analysis. |
Output Schema
| Name | Required | Description |
|---|---|---|
| response | Yes | AI-generated text response with numbered citation references |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the description's addition of 'Significantly slower than other tools (30+ seconds)' and 'Returns a detailed response with numbered citations' provides valuable behavioral context beyond the structured metadata. It does not contradict the read-only nature.
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 compact set of five purposeful sentences. It front-loads the core action, then provides use cases, output format, a performance warning, and sibling alternatives—all without redundancy or filler.
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?
With an output schema present and annotations providing read-only safety, the description gives sufficient context: purpose, use cases, speed, and alternatives. It is complete for a research tool, though it could mention specific limitations of the underlying model or cite that responses are not real-time.
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 coverage is 100%, so the baseline is 3. The description does not describe parameters directly, but the schema already documents messages, strip_thinking, and reasoning_effort with their meanings. The description's reference to 'deep research' implicitly aligns with reasoning_effort, but adds no new parameter-level detail.
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 conducts deep, multi-source research on a topic, and explicitly distinguishes it from siblings by naming alternatives for quick facts and logical reasoning. It also adds concrete output characteristics like numbered citations.
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?
Explicit when-to-use guidance is provided: 'Best for literature reviews, comprehensive overviews, investigative queries needing many sources.' It also clearly states when NOT to use it ('quick factual questions' -> use perplexity_ask; logical analysis -> use perplexity_reason) and warns about the 30+ second latency.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
perplexity_searchSearch the WebARead-only
Search the web and return a ranked list of results with titles, URLs, snippets, and dates. Best for: finding specific URLs, checking recent news, verifying facts, discovering sources. Returns formatted results (title, URL, snippet, date) — no AI synthesis. For AI-generated answers with citations, use perplexity_ask instead.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query string | |
| max_results | No | Maximum number of results to return (1-20, default: 10) | |
| max_tokens_per_page | No | Maximum tokens to extract per webpage (default: 1024) | |
| country | No | ISO 3166-1 alpha-2 country code for regional results (e.g., 'US', 'GB') |
Output Schema
| Name | Required | Description |
|---|---|---|
| results | Yes | Formatted search results, each with title, URL, snippet, and date |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds meaningful behavioral context: results are ranked, formatted with specific fields, and there is no AI synthesis. It does not discuss pagination or rate limits, but the annotation coverage lowers the burden.
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?
Four short sentences each earn their place: purpose+output, use cases, behavioral caveat, and sibling alternative. Front-loaded with the core purpose, no fluff or repetition.
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 rich annotations (readOnly, openWorld, non-destructive), a high-coverage schema, and the explicit mention of result format and alternative tool, the description is complete for this search tool. It covers what the tool does, when to use it, what it returns, and how it differs from the key sibling.
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%, so all four parameters (query, country, max_results, max_tokens_per_page) are documented in the schema. The description adds no additional parameter-level meaning beyond what the schema provides, so the baseline score of 3 is appropriate.
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?
Description opens with a specific verb+resource: 'Search the web and return a ranked list of results with titles, URLs, snippets, and dates.' It clearly states the output format and adds 'no AI synthesis,' which distinguishes it from the sibling perplexity_ask tool.
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?
'Best for: finding specific URLs, checking recent news, verifying facts, discovering sources' explicitly defines intended use cases. It also provides an explicit alternative: 'For AI-generated answers with citations, use perplexity_ask instead.' This meets the when/when-not guidance standard.
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.
4 tool updates
v0.9.0- First observed
perplexity_ask - First observed
perplexity_reason - First observed
perplexity_research - First observed
perplexity_search
TDQS
Scored across 4 tools
Each tool has a clearly delineated purpose (quick Q&A, step-by-step reasoning, deep research, raw search) and descriptions explicitly guide which tool to use for which scenario, eliminating ambiguity.
All tools follow a consistent 'perplexity_verb' pattern in snake_case (ask, reason, research, search), making the naming predictable and easy for agents to infer functionality.
Four tools is well-scoped for a search/QA server: covering quick answers, reasoning, deep research, and raw web search without redundancy or missing core functionality.
The tool set covers the primary workflows (factual Q&A, reasoning, multi-source research, raw search) with no major gaps; a potential minor addition could be a batch or follow-up tool, but not essential.
Related MCP Connectors
Official MCP server for twitterapis.com. Read and write Twitter/X: search, users, tweets, DMs.
- LovableOAuthdev.lovable
Official MCP server for Lovable, the AI-powered full-stack app builder.
Official MCP server for subfeed.app — the cloud for agents. 15+ tools for AI agents to register, build, and deploy other agents. Zero human required. Start here: subfeed.app/skill.md
Official MCP server for Agentwork — delegate tasks to AI agents with human-in-the-loop