Skip to main content
Glama
perplexityai

Perplexity API Platform MCP Server

by perplexityai

Perplexity API Platform MCP Server

Install in Cursor

Install in VS Code

Add to Kiro

npm version

Perplexity API Platformの公式MCPサーバー実装です。SonarモデルとSearch APIを通じて、AIアシスタントにリアルタイムのウェブ検索、推論、リサーチ機能を提供します。

利用可能なツール

perplexity_search

Perplexity Search 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

Related MCP server: Perplexity Ask MCP Server

設定

APIキーの取得

  1. APIポータルからPerplexity APIキーを取得します。

  2. 以下の設定内のyour_key_hereを自分のAPIキーに置き換えます。

  3. (オプション) タイムアウトの設定: PERPLEXITY_TIMEOUT_MS=600000 (デフォルト: 5分)

  4. (オプション) カスタムベースURLの設定: PERPLEXITY_BASE_URL=https://your-custom-url.com (デフォルト: https://api.perplexity.ai)

  5. (オプション) ログレベルの設定: 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 perplexity

Codex

codex mcp add perplexity --env PERPLEXITY_API_KEY="your_key_here" -- npx -y @perplexity-ai/mcp-server

Cursor, Claude Desktop, Kiro, Windsurf, および VS Code

ほとんどのクライアントは、クライアント設定内の同じmcpServersラッパーを使用して手動で設定できます(Cursorの例を参照)。クライアントのスキーマが異なる場合は、そのドキュメントで正確なラッパー形式を確認してください。

手動設定の場合、これらのクライアントはすべて同じmcpServers構造を使用します:

クライアント

設定ファイル

Cursor

~/.cursor/mcp.json

Claude Desktop

claude_desktop_config.json

Kiro

.kiro/settings/mcp.json

Windsurf

~/.codeium/windsurf/mcp_config.json

VS Code

.vscode/mcp.json

{
  "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:8080

3. 代替案: 標準環境変数

標準の変数を使用したい場合は、HTTPS_PROXYおよびHTTP_PROXYをサポートしています。

[!NOTE] サーバーはPERPLEXITY_PROXYHTTPS_PROXYHTTP_PROXYの順序でプロキシ設定を確認します。いずれも設定されていない場合は、直接インターネットに接続します。 URLにはhttps://を含める必要があります。一般的なポートは8080312880です。

HTTPサーバーのデプロイ

クラウドや共有環境へのデプロイには、サーバーをHTTPモードで実行します。

環境変数

変数

説明

デフォルト

PERPLEXITY_API_KEY

Perplexity APIキー

必須

PERPLEXITY_BASE_URL

APIリクエスト用のカスタムベースURL

https://api.perplexity.ai

PORT

HTTPサーバーポート

8080

BIND_ADDRESS

バインドするネットワークインターフェース

0.0.0.0

ALLOWED_ORIGINS

CORSオリジン (カンマ区切り)

*

Docker

docker build -t perplexity-mcp-server .
docker run -p 8080:8080 -e PERPLEXITY_API_KEY=your_key_here perplexity-mcp-server

Node.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にアクセスするか、issueを報告してください。


Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    Provides 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.
    9
    2
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to perform real-time web searches, company research, content crawling, LinkedIn searches, and deep research using the Exa AI Search API. Provides comprehensive web information retrieval capabilities in a safe and controlled manner.
    2
    27,145
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • The best web search for your AI Agent

  • Web research for agents: quality-scored Google search, webpage extraction, and deep research.

  • LLM-ready web search + instant answers + URL-to-clean-text fetch for agents and RAG.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/perplexityai/modelcontextprotocol'

If you have feedback or need assistance with the MCP directory API, please join our Discord server