Perplexity MCP サーバー
概要
Perplexity MCPサーバーは、Anthropicのモデルコンテキストプロトコル(MCP)のNode.js実装であり、ClaudeがPerplexityの言語モデルとやり取りできるようにします。このサーバーは、ClaudeとPerplexity AIの機能の間に安全な橋渡しを提供し、ツールの使用を通じてAIとのやり取りを強化します。
利用可能なツール
現在、サーバーは次の 2 つの主要なツールを実装しています。
1. パープレキシティチャット
完全なメッセージ履歴をサポートする高度なチャット完了ツール。
2. 困惑の質問
簡単な質問のための簡素化された単一クエリ インターフェース。
インストール
- リポジトリをクローンします。
- 依存関係をインストールします:
.env
ファイルを作成します:- プロジェクトをビルドします。
クロードデスクトップ構成
このサーバーをClaude Desktopに追加するには、 claude_desktop_config.json
を更新します。
構成ファイルは通常、次の場所にあります。
- Windows:
%APPDATA%/Claude/config/claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/config/claude_desktop_config.json
- Linux:
~/.config/Claude/config/claude_desktop_config.json
発達
自動再コンパイルで開発サーバーを起動します。
サーバーは TypeScript を使用し、 @modelcontextprotocol/sdk
パッケージを使用して MCP プロトコルを実装します。
建築
コアコンポーネント
- PerplexityServer クラス
- MCPサーバープロトコルを実装
- ツールの登録と実行を処理する
- エラー処理とサーバーのライフサイクルを管理します
- ツールシステム
- モジュラーツールの定義
- 型安全なツールハンドラー
- 構造化された入力検証
技術的な詳細
- 型安全性のためにTypeScriptで構築
- MCP実装には
@modelcontextprotocol/sdk
を使用します - stdioトランスポート経由で通信する
- 環境ベースの構成
エラー処理
サーバーは包括的なエラー処理を実装します。
- APIエラー報告
- 無効なツール要求の処理
- 接続エラー管理
- プロセス信号処理
依存関係
@modelcontextprotocol/sdk
: ^1.0.3dotenv
:^16.4.7isomorphic-fetch
: ^3.0.0
貢献
- リポジトリをフォークする
- 機能ブランチを作成します(
git checkout -b feature/amazing-feature
) - 変更をコミットします (
git commit -m 'Add some amazing feature'
) - ブランチにプッシュする (
git push origin feature/amazing-feature
) - プルリクエストを開く
安全
- APIキーは環境変数を通じて管理されます
- すべてのツールパラメータの入力検証
- エラーメッセージは出力前にサニタイズされます
- MCPプロトコルによるプロセス分離
ライセンス
このプロジェクトは ISC ライセンスに基づいてライセンスされています。
トラブルシューティング
よくある問題と解決策:
- サーバーが見つかりません
claude_desktop_config.json
のパスが正しいことを確認します- サーバーがビルドされていることを確認する(
npm run build
) - Node.jsがPATHにあるか確認する
- 認証エラー
- .env で Perplexity API キーを確認します
- APIキーに必要な権限があるか確認する
- ツール実行エラー
- ツールパラメータがスキーマと一致していることを確認する
- ネットワーク接続を確認する
- 詳細なエラーメッセージについてはサーバーログを確認してください
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Claude が Anthropic のモデル コンテキスト プロトコルを介して Perplexity AI の言語モデルと対話できるようにし、高度なチャット補完とクイック クエリのためのツールを提供する Node.js 実装。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityEnables integration of Perplexity's AI API with LLMs, delivering advanced chat completion by utilizing specialized prompt templates for tasks like technical documentation, code review, and API documentation.Last updated -1948JavaScriptMIT License
- AsecurityFlicenseAqualityThis server provides access to the Perplexity AI API, enabling interaction through chatting, searching, and documentation retrieval within MCP-based systems.Last updated -52JavaScript
- -securityAlicense-qualityProvides access to Perplexity AI models through two tools: ask\_perplexity for expert programming assistance and chat\_perplexity for maintaining ongoing conversations with context preservation.Last updated -PythonMIT License
- -securityFlicense-qualityA server implementing the Model Context Protocol that enables AI assistants like Claude to interact with Google's Gemini API for text generation, text analysis, and chat conversations.Last updated -Python