Skip to main content
Glama
spences10

MCP Perplexity Search

by spences10

mcp-perplexity-search


⚠️ 공지사항

이 저장소는 더 이상 유지되지 않습니다.

이 도구의 기능은 이제 여러 MCP 도구를 하나의 통합 패키지로 결합한 mcp-omnisearch 에서 사용할 수 있습니다.

대신 mcp-omnisearch를 사용하세요.


Perplexity의 AI API를 LLM과 통합하기 위한 모델 컨텍스트 프로토콜(MCP) 서버입니다. 이 서버는 다양한 사용 사례에 특화된 프롬프트 템플릿을 통해 고급 채팅 완성 기능을 제공합니다.

Related MCP server: DocGen MCP Server

특징

  • 🤖 Perplexity의 AI 모델을 활용한 고급 채팅 완성

  • 📝 일반적인 시나리오를 위한 미리 정의된 프롬프트 템플릿:

    • 기술 문서 생성

    • 보안 모범 사례 분석

    • 코드 검토 및 개선

    • 구조화된 형식의 API 문서

  • 🎯 특수 사용 사례를 위한 사용자 정의 템플릿 지원

  • 📊 다양한 출력 형식(텍스트, 마크다운, JSON)

  • 🔍 응답에 선택적 소스 URL 포함

  • ⚙️ 구성 가능한 모델 매개변수(온도, 최대 토큰)

  • 🚀 Sonar 및 LLaMA를 포함한 다양한 Perplexity 모델 지원

구성

이 서버를 사용하려면 MCP 클라이언트를 통한 구성이 필요합니다. 다음은 다양한 환경에 대한 예시입니다.

클라인 구성

Cline MCP 설정에 다음을 추가하세요.

지엑스피1

WSL 구성을 사용한 Claude Desktop

WSL 환경의 경우 Claude Desktop 구성에 다음을 추가하세요.

{
	"mcpServers": {
		"mcp-perplexity-search": {
			"command": "wsl.exe",
			"args": [
				"bash",
				"-c",
				"source ~/.nvm/nvm.sh && PERPLEXITY_API_KEY=your-perplexity-api-key /home/username/.nvm/versions/node/v20.12.1/bin/npx mcp-perplexity-search"
			]
		}
	}
}

환경 변수

서버에는 다음 환경 변수가 필요합니다.

  • PERPLEXITY_API_KEY : Perplexity API 키(필수)

API

서버는 구성 가능한 매개변수를 사용하여 단일 MCP 도구를 구현합니다.

채팅_완료

특수 프롬프트 템플릿을 지원하는 Perplexity API를 사용하여 채팅 완성을 생성합니다.

매개변수:

  • messages (배열, 필수): 다음을 포함하는 메시지 객체의 배열:

    • role (문자열): '시스템', '사용자' 또는 '보조자'

    • content (문자열): 메시지 내용

  • prompt_template (문자열, 선택 사항): 사용할 미리 정의된 템플릿:

    • technical_docs : 코드 예제가 포함된 기술 문서

    • security_practices : 보안 구현 지침

    • code_review : 코드 분석 및 개선

    • api_docs : JSON 형식의 API 문서

  • custom_template (객체, 선택 사항): 다음을 포함하는 사용자 정의 프롬프트 템플릿:

    • system (문자열): 보조자 동작에 대한 시스템 메시지

    • format (문자열): 출력 형식 기본 설정

    • include_sources (부울): 소스를 포함할지 여부

  • format (문자열, 선택 사항): 'text', 'markdown' 또는 'json'(기본값: 'text')

  • include_sources (부울, 선택 사항): 소스 URL 포함(기본값: false)

  • model (문자열, 선택 사항): 사용할 Perplexity 모델(기본값: 'sonar')

  • temperature (숫자, 선택 사항): 출력 무작위성(0-1, 기본값: 0.7)

  • max_tokens (숫자, 선택 사항): 최대 응답 길이(기본값: 1024)

개발

설정

  1. 저장소를 복제합니다

  2. 종속성 설치:

pnpm install
  1. 프로젝트를 빌드하세요:

pnpm build
  1. 개발 모드에서 실행:

pnpm dev

출판

이 프로젝트에서는 버전 관리를 위해 변경 세트를 사용합니다. 게시하려면 다음을 수행하세요.

  1. 변경 세트를 만듭니다.

pnpm changeset
  1. 패키지 버전:

pnpm changeset version
  1. npm에 게시:

pnpm release

기여하다

기여를 환영합니다! 풀 리퀘스트를 제출해 주세요.

특허

MIT 라이센스 - 자세한 내용은 LICENSE 파일을 참조하세요.

감사의 말

Available Tools

1 tool
chat_completionC

Generate chat completions using the Perplexity API

ParametersJSON Schema
NameRequiredDescriptionDefault
messagesYes
prompt_templateNoPredefined prompt template to use for common use cases. Available templates: - technical_docs: Technical documentation with code examples and source references - security_practices: Security best practices and implementation guidelines with references - code_review: Code analysis focusing on best practices and improvements - api_docs: API documentation in structured JSON format with examples
custom_templateNoCustom prompt template. If provided, overrides prompt_template.
formatNoResponse format. Use json for structured data, markdown for formatted text with code blocks. Overrides template format if provided.text
include_sourcesNoInclude source URLs in the response. Overrides template setting if provided.
modelNoModel to use for completion. Note: llama-3.1 models will be deprecated after 2/22/2025sonar
temperatureNoControls randomness in the output. Higher values (e.g. 0.8) make the output more random, while lower values (e.g. 0.2) make it more focused and deterministic.
max_tokensNoThe maximum number of tokens to generate in the response. One token is roughly 4 characters for English text.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but only states the basic function. It doesn't mention rate limits, authentication requirements, cost implications, error handling, or response characteristics. For a complex API tool with 8 parameters, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized and gets straight to the point without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex chat completion tool with 8 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what a 'chat completion' entails, typical use cases, or what the response looks like. The agent must rely entirely on the schema for operational details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 88% schema description coverage, the schema already documents most parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema, so it meets the baseline for high coverage but doesn't provide additional semantic context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('generate chat completions') and target ('using the Perplexity API'), providing a specific verb+resource combination. However, with no sibling tools mentioned, it cannot demonstrate differentiation from alternatives, which prevents 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.

Usage Guidelines2/5

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 typical use cases. It simply states what the tool does without context about appropriate scenarios or limitations.

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. 1 tool updatev1.0.0
    • First observedchat_completion

TDQS

B3.2/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool's purpose is clearly defined as generating chat completions using the Perplexity API, leaving no room for misselection.

Naming Consistency5/5

Since there is only one tool, naming consistency is inherently perfect. The tool name 'chat_completion' follows a clear verb_noun pattern, and there are no other tools to compare or create inconsistencies with.

Tool Count2/5

A single tool is generally too few for a server's purpose, as it limits functionality and may indicate an incomplete or overly narrow scope. While it could be appropriate for a very simple service, it often feels thin and lacks the breadth needed for typical agent workflows.

Completeness3/5

The tool provides a core function for chat completions, but with only one tool, the surface is notably incomplete. There are obvious gaps, such as missing operations for managing conversations, handling different models, or supporting related search functionalities, which could hinder agent performance in broader tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI assistants to generate professional documentation using structured templates based on the POWER framework. Provides access to standardized templates for README, architecture, API, components, and schema documentation.
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides LLMs with up-to-date, version-specific documentation and code examples from library sources directly into prompts, eliminating outdated code generation and hallucinated APIs.
    454,123 npm
    MIT