Skip to main content

Overview

The Perplexity MCP Server enables AI assistants to access Perplexity’s powerful search and reasoning capabilities directly within their workflows. Using the Model Context Protocol (MCP), you can integrate real-time web search, conversational AI, and advanced reasoning into any MCP-compatible client. There are two ways to connect:
  • Remote MCP server (recommended): hosted by Perplexity at https://api.perplexity.ai/mcp. No installation, nothing to update, works with any client that supports remote MCP servers. Sign in with your Perplexity account or use an API key.
  • Local MCP server: run the open-source server on your machine over stdio. Use this if your client only supports stdio servers or you need to pin a version.
The hosted and local options are intended to expose the same Perplexity tools, but transport, authentication, release timing, and client behavior can differ.
The Model Context Protocol (MCP) is an open standard that connects AI assistants with external data sources and tools. Learn more at modelcontextprotocol.io.
This page is for adding Perplexity as an MCP tool inside clients such as Google Antigravity, Claude Code, Cursor, VS Code, and Claude Desktop. To call the Perplexity API from application code, start with the Quickstart. To select Claude models through the Agent API, use Anthropic model IDs from Agent API models.

Remote MCP Server

Connect to https://api.perplexity.ai/mcp over Streamable HTTP. There are two ways to authenticate:
  • Sign in with Perplexity (OAuth): add the server without any credentials. On first use your client opens a browser where you sign in to your Perplexity account, choose the API organization to bill, and approve the connection. Works with any client that supports OAuth for remote MCP servers, including Claude Code, Cursor, VS Code, and claude.ai (add it as a custom connector using the URL above).
  • API key: send your key as a bearer token. Use this for clients that do not support OAuth, or for server-side setups such as the Anthropic API MCP connector.

Generate API Key

Navigate to the API Portal and generate a new key.
Run /mcp inside Claude Code and follow the sign-in prompt for perplexity. To use an API key instead, add --header "Authorization: Bearer YOUR_API_KEY" to the command.
Tool calls are billed at standard API pricing to the API key you connect with, or to the organization you chose when signing in. Your organization’s rate limits apply.

Signing in with Perplexity

Signing in uses your regular Perplexity account. During sign-in you choose which API organization the connection bills to.
  • API usage only. The connection can call the Perplexity API on behalf of that organization. It cannot create API keys, view balances, or manage the organization.
  • Needs an API organization. You must be an admin of an API organization that can pay for usage. If you do not have one, the sign-in page links you to create one in the console. Then restart the connection from your client.

Local MCP Server

Run the same server locally over stdio.

One-Click Install

Install in Cursor

Automatically configure the Perplexity MCP server in Cursor with one click.

Install in VS Code

Automatically configure the Perplexity MCP server in VS Code with one click.

Agent Plugin Install

The open-source repository includes an Agent Plugins 1.0 declaration for the local stdio server. If your client supports Agent Plugins, install it from perplexityai/modelcontextprotocol, then set PERPLEXITY_API_KEY in the environment that starts the plugin. The plugin does not include credentials, and installation steps vary by client.

Manual Setup

1

Get Your API Key

Generate API Key

Navigate to the API Portal and generate a new key.
2

Configure Your Client

Add the MCP server to your client configuration:
The remote server is the recommended Claude Code setup. Use one of these options only when you need to run the local stdio server.Every local option requires PERPLEXITY_API_KEY in the environment that launches Claude Code:
Option 1: CLI CommandAdd the server to Claude Code’s private configuration for the current project. Single quotes preserve the environment variable reference instead of saving the key value in the configuration:
Option 2: Claude Code PluginAdd the repository as a Claude Code marketplace, install the fully qualified plugin, then start Claude Code from the same environment:
Option 3: Manual ConfigurationAdd this configuration to .mcp.json in your project root. Claude Code expands PERPLEXITY_API_KEY from its launch environment:
When you first start Claude Code in the project, approve the .mcp.json server when prompted. If PERPLEXITY_API_KEY is not set, claude mcp list reports it as missing and tool calls cannot authenticate.
Do not replace the environment variable reference with your actual API key or commit a key to source control.
3

Start Using

Restart your MCP client and start using Perplexity’s tools in your AI workflows.

Available Tools

perplexity_search

Direct web search using the Perplexity Search API. Returns ranked search results with titles, URLs, snippets, and metadata.Best for: Finding current information, news, facts, or specific web content.

perplexity_ask

General-purpose conversational AI with real-time web search, backed by the Agent API fast preset.Best for: Quick questions, everyday searches, and conversational queries that benefit from web context.

perplexity_research

Deep, comprehensive research backed by the Agent API high preset. Provides thorough analysis with citations.Best for: Complex topics requiring detailed investigation, comprehensive reports, and in-depth analysis.

perplexity_reason

Advanced reasoning and problem-solving backed by the Agent API medium preset.Best for: Logical problems, complex analysis, decision-making, and tasks requiring step-by-step reasoning.
For detailed setup instructions, troubleshooting, and proxy configuration, visit our GitHub repository.