Skip to main content
Glama
laodev1

Perplexity MCP Server

by laodev1

Perplexity MCP 서버

개요

Perplexity MCP 서버는 Anthropic의 모델 컨텍스트 프로토콜(MCP)을 Node.js로 구현한 것으로, Claude가 Perplexity의 언어 모델과 상호 작용할 수 있도록 지원합니다. 이 서버는 Claude와 Perplexity AI의 기능 간 안전한 연결을 제공하여 도구 사용을 통해 향상된 AI 상호 작용을 가능하게 합니다.

Related MCP server: Perplexity MCP Server

사용 가능한 도구

현재 서버는 두 가지 주요 도구를 구현하고 있습니다.

1. 퍼플렉시티_챗

전체 메시지 기록을 지원하는 고급 채팅 완성 도구입니다.

지엑스피1

2. perplexity_ask

빠른 질문을 위한 간소화된 단일 쿼리 인터페이스.

{
  "name": "perplexity_ask",
  "description": "Send a simple query to Perplexity AI",
  "parameters": {
    "query": "string - The question or prompt to send",
    "model": "string (optional) - One of: llama-3.1-sonar-small-128k-online, llama-3.1-sonar-large-128k-online, llama-3.1-sonar-huge-128k-online"
  }
}

설치

  1. 저장소를 복제합니다.

    git clone https://github.com/yourusername/perplexity-mcp-server.git
    cd perplexity-mcp-server
  2. 종속성 설치:

    npm install
  3. .env 파일을 만듭니다.

    PERPLEXITY_API_KEY=your-api-key-here
  4. 프로젝트를 빌드하세요:

    npm run build

클로드 데스크톱 구성

이 서버를 Claude Desktop에 추가하려면 claude_desktop_config.json 업데이트하세요.

{
  "mcpServers": {
    //more servers...
    "perplexity": {
      "command": "node",
      "args": ["path\\to\\perplexity-mcp-server\\dist\\index.js"],
      "env": {
        "PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY"
      }
    }
    //more servers...
  }
}

구성 파일은 일반적으로 다음 위치에 있습니다.

  • 윈도우: %APPDATA%/Claude/config/claude_desktop_config.json

  • macOS: ~/Library/Application Support/Claude/config/claude_desktop_config.json

  • 리눅스: ~/.config/Claude/config/claude_desktop_config.json

개발

자동 재컴파일로 개발 서버를 시작합니다.

npm run dev

서버는 TypeScript를 사용하고 @modelcontextprotocol/sdk 패키지를 사용하여 MCP 프로토콜을 구현합니다.

건축학

핵심 구성 요소

  1. PerplexityServer 클래스

    • MCP 서버 프로토콜을 구현합니다

    • 도구 등록 및 실행을 처리합니다.

    • 오류 처리 및 서버 수명 주기를 관리합니다.

  2. 도구 시스템

    • 모듈식 도구 정의

    • 유형 안전 도구 핸들러

    • 구조화된 입력 검증

기술적 세부 사항

  • 유형 안전을 위해 TypeScript로 구축됨

  • MCP 구현을 위해 @modelcontextprotocol/sdk 사용합니다.

  • stdio 전송을 통해 통신합니다

  • 환경 기반 구성

오류 처리

서버는 포괄적인 오류 처리를 구현합니다.

  • API 오류 보고

  • 잘못된 도구 요청 처리

  • 연결 오류 관리

  • 프로세스 신호 처리

종속성

  • @modelcontextprotocol/sdk : ^1.0.3

  • dotenv : ^16.4.7

  • isomorphic-fetch : ^3.0.0

기여하다

  1. 저장소를 포크하세요

  2. 기능 브랜치를 생성합니다( git checkout -b feature/amazing-feature )

  3. 변경 사항을 커밋하세요( git commit -m 'Add some amazing feature' )

  4. 브랜치에 푸시( git push origin feature/amazing-feature )

  5. 풀 리퀘스트 열기

보안

  • API 키는 환경 변수를 통해 관리됩니다.

  • 모든 도구 매개변수에 대한 입력 검증

  • 오류 메시지는 출력 전에 정리됩니다.

  • MCP 프로토콜을 통한 프로세스 격리

특허

이 프로젝트는 ISC 라이선스에 따라 라이선스가 부여되었습니다.

문제 해결

일반적인 문제 및 해결 방법:

  1. 서버를 찾을 수 없습니다

    • claude_desktop_config.json 의 경로가 올바른지 확인하세요.

    • 서버가 빌드되었는지 확인하세요( npm run build )

    • Node.js가 PATH에 있는지 확인하세요

  2. 인증 오류

    • .env에서 Perplexity API 키를 확인하세요.

    • API 키에 필요한 권한이 있는지 확인하세요

  3. 도구 실행 오류

    • 도구 매개변수가 스키마와 일치하는지 확인하세요.

    • 네트워크 연결 확인

    • 자세한 오류 메시지는 서버 로그를 검토하세요.

Available Tools

2 tools
perplexity_askB

Send a simple query to Perplexity AI

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoThe model to use for completion
queryYesThe question or prompt to send

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations and a minimal description, the tool's behavior is opaque. It does not disclose whether the query is synchronous, what response format to expect, or any safety/reliability traits.

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

Conciseness4/5

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

The description is a single clear sentence that immediately conveys the tool's purpose. It is appropriately front-loaded and concise, though it could incorporate more detail without becoming wordy.

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 simple query tool with no output schema, the description lacks information about the response (e.g., text output, confidence scores). The agent would need to infer or discover the return type from usage.

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?

Schema coverage is 100%, so both parameters have descriptions. The description adds no extra value beyond the schema, but baseline 3 is appropriate as the schema already documents parameters adequately.

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

Purpose5/5

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

The description clearly states the action ('Send a simple query') and the target resource ('Perplexity AI'). It distinguishes from the sibling tool 'perplexity_chat' by implying this is for a single query, while 'chat' likely involves multi-turn conversation.

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?

No guidance is provided on when to use this tool versus the sibling 'perplexity_chat'. There is no mention of prerequisites, limitations, or alternatives, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

perplexity_chatC

Generate a chat completion using Perplexity AI

ParametersJSON Schema
NameRequiredDescriptionDefault
modelNoThe model to use for completion
messagesYesArray of messages in the conversation
temperatureNoSampling temperature (0-2)

TDQS

C2.8/5.0
Behavior2/5

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

No behavioral traits are disclosed beyond the minimal description. The schema includes a model with 'sonar-small-online' suggesting internet access, but this is not mentioned. With no annotations, the description should provide more context about side effects, permissions, or rate limits.

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

Conciseness3/5

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

The description is a single sentence, which is concise, but it is too brief to convey necessary information. It could be expanded without losing conciseness.

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?

Given the tool has 3 parameters and a sibling tool, the description is insufficient. It does not explain the role of Perplexity AI, the meaning of different models, or how this tool differs from 'perplexity_ask'. The lack of output schema increases the need for a more complete description.

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?

Schema description coverage is 100%, so all parameters are documented in the schema. The description adds no additional meaning beyond what is already in the schema. Baseline score of 3 is appropriate.

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 tool's purpose: generating a chat completion using Perplexity AI. However, it does not differentiate from the sibling tool 'perplexity_ask', which likely performs a similar but distinct function.

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 the sibling tool 'perplexity_ask'. The context hints at a distinction (chat vs. ask), but it is not explicitly stated.

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. 2 tool updatesv1.0.1
    • First observedperplexity_ask
    • First observedperplexity_chat

TDQS

C2.9/5.0

Scored across 2 tools

Disambiguation2/5

Both tools involve querying Perplexity AI, with only subtle differences in description ('simple query' vs 'chat completion'). An agent would likely struggle to decide which to use, as the boundaries are unclear.

Naming Consistency4/5

Both tools follow a consistent 'perplexity_<verb>' pattern. The verbs 'ask' and 'chat' are different but semantically related, and no mixing of naming conventions is present.

Tool Count3/5

With only 2 tools, the server feels minimal for a service like Perplexity AI, which typically offers more nuanced capabilities (e.g., different models, streaming). However, it covers basic query and chat needs.

Completeness3/5

The tool surface covers basic query and chat interactions but lacks operations such as specifying model parameters, context handling, or result streaming. This may limit agent flexibility.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    F
    maintenance
    A custom Model Context Protocol implementation that integrates Perplexity AI with Claude Desktop, allowing users to access Perplexity's AI models for both single questions and multi-turn conversations.
    35 npm
    15
    ISC
  • A
    license
    B
    quality
    D
    maintenance
    A Node.js implementation of the Kagi Model Context Protocol server that enables Claude AI to search the web and summarize documents, videos, and audio using Kagi's APIs.
    2
    18 npm
    MIT