home / mcp / perplexity2 mcp server

Perplexity2 MCP Server

Provides access to Perplexity2 API via a stdio-based MCP server with flexible run options.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bach-ai-tools-bachai-perplexity2": {
      "command": "python",
      "args": [
        "server.py"
      ],
      "env": {
        "API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

This MCP server provides access to the Perplexity2 API through a stdio-based interface, enabling you to connect your applications to Perplexity2 with minimal setup and flexible run options.

How to use

You can run this MCP server from the command line using several approaches. Pick a method that fits your workflow and then connect your MCP client to the local server. If you prefer a zero-install experience, use the uvx runner; for development, you can start the server directly with Python or invoke the installed binary after you have installed the package.

Recommended patterns include:
- Start with uvx to pull in the server and run it in one step using the provided package source.
- Run the development server via Python when you want to work directly from the source tree.
- Use the installed command after installation for a straightforward, single-command start.

How to install

Prerequisites you need before installation:
- Python 3.8+ (for pip-based installation and development mode)
- pip (Python package manager)
- uvx (optional helper to run MCPs with automatic installation)
# Option A: install via pip (recommended for production usage)
pip install bach-perplexity2

# Option B: install in development mode from source
pip install -e .
Run options you can use after installation:
- Use uvx to run from the bach-perplexity2 package
- Run the Python entry point directly from the source
- Use the installed executable name if you installed the package normally
# Option 1: uvx (recommended, auto-installs the package)
uvx --from bach-perplexity2 bach_perplexity2

# Option 1b: uvx with latest version
uvx --from bach-perplexity2@latest bach_perplexity2

# Option 2: development mode
python server.py

# Option 3: after installation, run the installed command
bach_perplexity2

Configuration and environment

This API requires authentication. Set your API key in the environment before starting the server.

export API_KEY="your_api_key_here"

Example MCP configurations

You can configure multiple MCP connections for bach-perplexity2. Each entry uses the stdio mode and includes the command, arguments, and any required environment variables.

{
  "mcpServers": {
    "bach_par_uvx": {
      "command": "uvx",
      "args": ["--from", "bach-perplexity2", "bach_perplexity2"],
      "env": {
        "API_KEY": "your_api_key_here"
      }
    },
    "bach_par_uvx_latest": {
      "command": "uvx",
      "args": ["--from", "bach-perplexity2@latest", "bach_perplexity2"],
      "env": {
        "API_KEY": "your_api_key_here"
      }
    },
    "bach_par_py": {
      "command": "python",
      "args": ["server.py"],
      "env": {
        "API_KEY": "your_api_key_here"
      }
    },
    "bach_par_bin": {
      "command": "bach_perplexity2",
      "args": [],
      "env": {
        "API_KEY": "your_api_key_here"
      }
    }
  }
}

Available tools

post

Provides a POST endpoint to search Google data, analyze and organize information using AI to unlock insights.