Perplexity Advanced MCP
Perplexity 고급 MCP
개요
Perplexity Advanced MCP는 OpenRouter 및 Perplexity API를 활용하여 향상된 쿼리 처리 기능을 제공하는 고급 통합 패키지입니다. 직관적인 명령줄 인터페이스와 강력한 API 클라이언트를 갖춘 이 패키지는 간단한 쿼리부터 복잡한 쿼리까지 AI 모델과의 원활한 상호작용을 지원합니다.
Related MCP server: Perplexity MCP Server
perplexity-mcp 와의 비교
perplexity-mcp는 Perplexity AI의 API를 사용하여 기본적인 웹 검색 기능을 제공하는 반면, Perplexity Advanced MCP는 여러 가지 추가 기능을 제공합니다.
다중 공급업체 지원: Perplexity 와 OpenRouter API를 모두 지원하므로 공급업체를 선택할 때 유연성이 제공됩니다.
쿼리 유형 최적화: 간단한 쿼리와 복잡한 쿼리를 구분하여 비용과 성능을 최적화합니다.
파일 첨부 지원: 쿼리에 파일 내용을 컨텍스트로 포함시켜 보다 정확하고 상황에 맞는 응답을 제공할 수 있습니다.
향상된 재시도 논리: 향상된 안정성을 위해 강력한 재시도 메커니즘을 구현합니다.
전반적으로 이것은 Cline 이나 Cursor와 같은 편집기와 통합할 때 코드베이스를 처리하는 데 가장 적합한 MCP입니다.
특징
통합 API 클라이언트: 간단한 쿼리와 복잡한 쿼리를 처리하기 위한 구성 가능한 모델을 통해 OpenRouter 와 Perplexity API를 모두 지원합니다.
명령줄 인터페이스(CLI): Typer를 사용하여 API 키 구성을 관리하고 MCP 서버를 실행합니다.
고급 쿼리 처리: 파일 첨부 처리를 통합하여 쿼리에 문맥적 데이터를 포함할 수 있습니다.
강력한 재시도 메커니즘: 일관되고 안정적인 API 통신을 보장하기 위해 재시도 논리에 Tenacity를 활용합니다.
사용자 정의 로깅: 세부적인 디버깅 및 런타임 모니터링을 위한 유연한 로깅 구성.
최적의 AI 구성
AI 어시스턴트(예: Cursor , Claude for Desktop )를 가장 잘 활용하려면 프로젝트 지침이나 AI 규칙에 다음 구성을 추가하는 것이 좋습니다.
지엑스피1
이러한 구성은 AI 도우미가 Perplexity 검색 기능을 언제 어떻게 사용해야 하는지 더 잘 이해하고 비용과 성능을 모두 최적화하는 데 도움이 됩니다.
용법
Smithery를 통해 설치
Smithery를 통해 Claude Desktop용 Perplexity Advanced MCP를 자동으로 설치하려면:
npx -y @smithery/cli install @code-yeongyu/perplexity-advanced-mcp --client claudeuvx 로 빠르게 시작하기
MCP 서버를 실행하는 가장 쉬운 방법은 uvx를 사용하는 것입니다.
uvx perplexity-advanced-mcp -o <openrouter_api_key> # or -p <perplexity_api_key>환경 변수를 사용하여 API 키를 구성할 수도 있습니다.
export OPENROUTER_API_KEY="your_key_here"
# or
export PERPLEXITY_API_KEY="your_key_here"
uvx perplexity-advanced-mcp메모:
OpenRouter와 Perplexity API 키를 동시에 제공하면 오류가 발생합니다.
CLI 인수와 환경 변수가 모두 제공되는 경우 CLI 인수가 우선합니다.
CLI는 Typer 로 구축되어 사용자 친화적인 명령줄 환경을 보장합니다.
MCP 검색 도구
이 패키지에는 ask_perplexity 함수를 통해 통합된 MCP 검색 도구가 포함되어 있습니다. 간단한 쿼리와 복잡한 쿼리를 모두 지원하고, 파일 첨부를 처리하여 추가적인 맥락 정보를 제공합니다.
간단한 질의: 빠르고 효율적인 응답을 제공합니다.
복잡한 쿼리: 세부적인 추론을 수행하고 XML 형식으로 된 파일 첨부를 지원합니다.
구성
API 키: 명령줄 옵션이나 환경 변수를 통해
OPENROUTER_API_KEY또는PERPLEXITY_API_KEY구성합니다.모델 선택: 구성(
src/perplexity_advanced_mcp/config.py)은 쿼리 유형을 특정 모델에 매핑합니다.
개발 배경 및 철학
이 프로젝트는 제 개인적인 호기심과 실험 정신에서 시작되었습니다. 최근 "바이브 코딩" 트렌드를 따라, 코드의 95% 이상을 Cline + Cursor IDE를 통해 작성했습니다. "말은 싸니까, 코드를 보여줘"라는 말이 있죠. Wispr Flow 의 음성-텍스트 변환 마법 덕분에, 제가 말만 하면 코드가 바로 나타났습니다! 개발의 대부분은 "xyz 코드를 작성해 줘, 여기 xy z 버그를 수정해 줘."와 같은 말과 엔터 키를 누르는 것으로 진행되었습니다. 놀랍게도, 이 모든 기능을 갖춘 프로젝트를 만드는 데 몇 시간도 걸리지 않았습니다.
프로젝트 스캐폴딩부터 파일 구조까지 모든 것이 LLM을 통해 작성되고 검토되었습니다. PyPI 게시를 위한 GitHub Actions 워크플로와 릴리스 승인 프로세스도 Cursor를 통해 처리되었습니다. 실제 개발자로서 제 역할은 다음과 같았습니다.
AI가 적절한 테스트를 수행할 수 있도록 MCP 서버 시작 및 중지
문제 발생 시 오류 로그 복사 및 제공
인터넷에서 Python MCP SDK 문서 및 예제 찾기 및 제공
올바르지 않은 것으로 보이는 코드에 대한 수정 요청
오늘날 많은 것이 자동화되고 대체될 수 있는 세상에서, 이 MCP가 여러분처럼 MCP를 사용하는 개발자들이 단순한 코드 작성을 넘어 가치를 발견하는 데 도움이 되기를 바랍니다. 이 도구가 여러분이 더 높은 수준의 의사 결정과 고려 사항을 수행할 수 있는 새로운 시대의 개발자로 거듭나는 데 도움이 되기를 바랍니다.
개발
이 패키지에 기여하거나 수정하려면:
1. 저장소 복제:
gh repo clone code-yeongyu/perplexity-advanced-mcp2. 종속성 설치:
uv sync3. 기여:
기여를 환영합니다! 기존 코드 스타일과 커밋 지침을 따라주세요.
특허
이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다.
Available Tools
1 toolask_perplexityA
Perplexity is fundamentally an LLM that can search the internet, gather information, and answer users' queries.
For example, let's suppose we want to find out the latest version of Python.
1. You would search on Google.
2. Then read the top two or three results directly to verify.
Perplexity does that work for you.
To answer a user's query, Perplexity searches, opens the top search results, finds information on those websites, and then provides the answer.
Perplexity can be used with two types of queries: simple and complex. Choosing the right query type to fulfill the user's request is most important.
SIMPLE Query:
- Cheap and fast (on average, 10x cheaper and 3x faster than complex queries).
- Suitable for straightforward questions such as "What is the latest version of Python?"
- Pricing: $1/M input tokens, $1/M output tokens.
COMPLEX Query:
- Slower and more expensive (on average, 10x more expensive and 3x slower).
- Suitable for tasks requiring multiple steps of reasoning or deep analysis, such as "Analyze the attached code to examine the current status of a specific library and create a migration plan."
- Pricing: $1/M input tokens, $5/M output tokens.
Instructions:
- When reviewing the user's request, if you find anything unexpected, uncertain, or questionable, do not hesitate to use the "ask_perplexity" tool to consult Perplexity.
- Since Perplexity is also an LLM, prompt engineering techniques are paramount.
- Remember the basics of prompt engineering, such as providing clear instructions, sufficient context, and examples.
- Include as much context and relevant files as possible to smoothly fulfill the user's request.
- IMPORTANT: When adding files as attachments, you MUST use absolute paths (e.g., '/absolute/path/to/file.py'). Relative paths will not work.
Note: All queries must be in English for optimal results.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The query to search for | |
| query_type | Yes | Type of query to determine model selection | |
| attachment_paths | Yes | An optional list of absolute file paths to attach as context for the search query |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It explains the search process (searches, opens top results, finds info, provides answer), pricing/speed trade-offs, and prompt engineering requirements. However, it does not explicitly state that the tool is read-only or idempotent, though implied.
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?
Description is overly verbose, including examples and pricing details that could be streamlined. While front-loaded with purpose, it contains redundant elaboration (e.g., step-by-step hypothetical) that increases length without proportional benefit.
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?
For a tool with three required parameters and no output schema, the description is highly comprehensive. It covers all parameter semantics, usage guidelines, behavioral traits, and even prompt engineering tips, making it fully complete for an agent to invoke 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 coverage is 100%, so baseline 3. Description adds significant value: explains query_type enum choices with detailed use cases, and mandates absolute paths for attachment_paths. Also notes English-only for query, which is not in schema.
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 clearly states that Perplexity is an LLM that searches the internet to answer queries, with explicit examples (e.g., latest Python version) and differentiation between simple and complex queries. The verb 'ask' plus resource 'perplexity' is specific and unambiguous.
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 when-to-use guidance: use when uncertain or questionable, and instructions for choosing query type (simple for straightforward, complex for multi-step analysis). Also mandates English queries and absolute paths for attachments, leaving no ambiguity.
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
- First observed
ask_perplexity
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of confusion with other tools. The tool's purpose is clearly defined.
With a single tool, naming consistency is trivially satisfied. The name 'ask_perplexity' follows a clear verb_noun pattern in snake_case.
A single tool is borderline for a server claiming to offer a 'toolkit'. However, the tool is versatile and handles both simple and complex queries, justifying its singular existence.
The domain is to answer user queries by searching the internet. The single tool covers all necessary functionality (simple and complex queries) without obvious gaps.
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.
Provides AI assistants with access to Seltz's powerful Web Search capabilities.
Web search, fetch, extract, and research for AI agents. Markdown output + AI-synthesized answers.
Related MCP Servers
- 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.24 npm2MIT
- AlicenseAqualityDmaintenanceIntegrates Perplexity AI's chat capabilities with real-time web search, enabling users to ask questions and receive AI-powered answers with up-to-date information and citations from verified web sources.159 npm1Apache 2.0
- AlicenseAqualityDmaintenanceEnables advanced web search across multiple search engines (Brave, DuckDuckGo, Google, Bing, Yandex) with intelligent backend selection, full content extraction, and advanced filtering by time, language, geography, and content type.3MIT
- AlicenseBqualityDmaintenanceEnables web search using Perplexity AI's API, allowing users to search the web with optional recency filters and integration with Claude, Cursor, and other MCP clients.1MIT