基本能力
产品定位
Perplexity MCP Server 是一个基于 Perplexity AI 的网络搜索服务,旨在为用户提供高效的网络搜索能力。
核心功能
- 提供
perplexity_search
工具,用于执行网络搜索查询。 - 支持开发和生产模式运行。
- 提供 Windows 批处理文件简化运行流程。
适用场景
- 需要集成网络搜索功能的应用程序。
- 开发者在开发过程中需要快速获取网络信息。
- 生产环境中需要稳定的网络搜索服务。
工具列表
perplexity_search
:用于执行网络搜索查询,参数为query
。
常见问题解答
- 权限错误:以管理员身份运行命令提示符或 PowerShell。
- 环境变量问题:确保
.env
文件位于根目录,且格式正确。 - Node.js 问题:验证 Node.js 和 npm 的安装。
使用教程
使用依赖
- Node.js 18+:从 nodejs.org 下载。
- Git:从 git-scm.com 下载。
- Perplexity AI API 密钥。
安装教程
- 克隆仓库:
bash
git clone [repository-url]
cd perplexity-mcp-server - 安装依赖:
bash
npm install - 创建环境文件
.env
并添加 API 密钥:
env
PERPLEXITY_API_KEY=your_api_key_here
调试方式
- 开发模式:
bash
npm run dev - 生产模式:
bash
npm run build
npm start - 使用批处理文件:
bash
.\run-perplexity-server.bat