Skip to main content
Glama
nachoal

Perplexity Web Search MCP Server

by nachoal

パープレキシティウェブ検索MCPサーバー

Perplexity APIを用いたウェブ検索機能を提供するシンプルなMCP(Model Context Protocol)サーバー。このサーバーにより、Claudeやその他のMCP対応AIアシスタントはウェブを検索し、最新情報を取得できます。

特徴

  • Perplexity の強力な検索機能でウェブを検索

  • 出典と引用を含む包括的な検索結果を取得

  • 期間(日、週、月、年)で結果をフィルタリングします

  • すぐに使えるウェブ検索用のプロンプトテンプレートが含まれています

  • 環境変数または.envファイルからのAPIキーの読み込みをサポート

Related MCP server: Perplexity MCP Server

インストール

  1. このリポジトリをクローンする

  2. 依存関係をインストールします:

    pip install -e .

    または

    uv pip install -e .

構成

Perplexity API キーを使用してPERPLEXITY_API_KEY環境変数を設定できます。

export PERPLEXITY_API_KEY="your-api-key-here"

あるいは、プロジェクト ルートに次の内容の.envファイルを作成することもできます。

PERPLEXITY_API_KEY=your-api-key-here

参照用にサンプルの.env.exampleファイルが提供されています。

Perplexity API キーを取得するには:

  1. Perplexity API設定にアクセス

  2. アカウントをお持ちでない場合は作成してください

  3. APIキーを生成する

使用法

サーバーの実行

python server.py

サーバーのテスト

付属のテスト スクリプトを使用すると、完全な MCP サーバーを実行せずにサーバーの機能をテストできます。

python test_server.py "your search query here" --recency month

--recencyのオプションは、日、週、月(デフォルト)、年です。

Claude Desktopでの使用

  1. Claude Desktop 構成ファイルを編集します。

    • macOSの場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json

    • Windows の場合: %APPDATA%/Claude/claude_desktop_config.json

  2. 次の構成を追加します。

    {
      "perplexity-mcp": {
        "env": {
          "PERPLEXITY_API_KEY": "your-api-key-here"
        },
        "command": "python",
        "args": [
          "/path/to/server.py"
        ]
      }
    }
  3. Claudeデスクトップを再起動します

クロードの例題

  • 「人工知能に関する最新ニュースをウェブで検索」

  • 「Perplexity を使って、過去 1 週間に公開された気候変動に関する情報を見つけましょう」

  • 「過去1か月間の量子コンピューティングに関する最新の研究論文を検索する」

APIリファレンス

ツール: search_web(query: str, recency: str = "month") -> str

Perplexity API を使用して Web を検索し、結果を返します。

パラメータ:

  • query : 検索クエリ文字列

  • recency : 期間(「日」、「週」、「月」(デフォルト)、または「年」)で結果をフィルタリングします

**戻り値:**次の内容を含む包括的なテキスト応答:

  1. 検索結果の詳細な要約

  2. 発見された重要な事実と情報

  3. 検証用のURLを含むソース

  4. 矛盾する情報がある場合

プロンプト: web_search_prompt(query: str, recency: str = "month") -> str

Perplexity を使用して Web を検索するためのプロンプト テンプレートを作成します。

パラメータ:

  • query : 検索クエリ

  • recency : 期間フィルター - 「日」、「週」、「月」(デフォルト)、または「年」

戻り値: AI に次のことを指示するフォーマットされたプロンプト文字列:

  1. 指定されたクエリを検索する

  2. 指定された期間の結果に焦点を当てる

  3. 主な調査結果を要約する

  4. 重要な事実を強調する

  5. 矛盾する情報を言及する

  6. リンク付きのソースを引用する

ライセンス

マサチューセッツ工科大学

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Facilitates web search capabilities using Perplexity's API, allowing users to retrieve search results through Claude's interface.
    1
    7
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables web search functionality through Perplexity AI's API with time-based filtering options. Allows users to search the web for recent information within specified time periods (day, week, month, or year).
    1
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables 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.
    1
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to perform web searches and retrieve real-time information using Perplexity AI's Sonar models, with support for multiple search modes and easy integration with MCP clients.
    5
    1
    MIT

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/nachoal/perplexity-mcp'

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