Get the FREE Ultimate OpenClaw Setup Guide →

mcp -perplexity

MCP server from tanigami/mcp-server-perplexity

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio tanigami-mcp-server-perplexity uvx mcp-server-perplexity \
  --env PERPLEXITY_API_KEY="your-perplexity-api-key"

How to use

This MCP server exposes the Perplexity integration as a single tool named ask_perplexity. It enables you to request chat completions from the Perplexity API and obtain citations in responses. Clients can connect to this MCP server and invoke the Perplexity tool to generate replies that incorporate Perplexity's capabilities. Use cases include crafting informed responses with source citations or leveraging Perplexity for specialized Q&A tasks.

To use it, ensure your MCP client is configured to connect to the Perplexity server entry (the Perplexity node shown in the mcp_config). When you call the Perplexity tool, provide your user prompt and any optional parameters supported by the integration. The server will forward the request to Perplexity using your API key and return the generated completion along with citations where applicable.

How to install

Prerequisites:

  • Python 3.11+ (or a compatible Python environment)
  • pip (or pipx) available on your system
  • A Perplexity API key (required for authentication)

Installation steps:

  1. Install the Perplexity MCP server package runner (uvx):

    • If you don’t already have uvx, install it (example): python3 -m pip install --user uvx
  2. Ensure your Perplexity API key is available to the environment or provided in the MCP config (as shown in the example). You'll need this to authenticate requests to Perplexity.

  3. Run the MCP server using uvx with the specified package name:

    • Command: uvx mcp-server-perplexity
  4. Verify the server starts and is reachable by your MCP client. If you encounter authentication or networking issues, double-check the PERPLEXITY_API_KEY environment variable and network access to Perplexity services.

Additional notes

Notes and tips:

  • You must provide a valid PERPLEXITY_API_KEY in the environment to authorize requests to Perplexity.
  • The server may experience timeouts or delays if Perplexity processing takes long; consider adjusting client timeouts accordingly.
  • Keep your API key secure and do not expose it in public configurations.
  • If you switch runtimes or deployment environments, ensure the uvx runner is installed and the Perplexity configuration is preserved.
  • This MCP server currently exposes the ask_perplexity tool for generating chat completions with citations from Perplexity.

Related MCP Servers

Sponsor this space

Reach thousands of developers