Token导航 LogoToken导航TokenDH.com
MCP Perplexica logo
搜索检索stdio官方级别未说明来源级核验

MCP Perplexica

MCP Server

MCP Perplexica是一个为Perplexica搜索API提供代理服务的工具,允许LLMs通过模型上下文协议(MCP)执行网页搜索,支持多种搜索模式和传输方式。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
PythonClaude搜索Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Kaiohz

提供方

Kaiohz

最后核验

2026/5/17 20:22

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run python src/main.py

详细介绍

MCP困惑

MCP服务器代理 困惑 搜索API。

该服务器允许LLM使用模型上下文协议(MCP)通过Perplexica执行网络搜索。

特性

  • 🔍 通过Perplexica进行网络搜索
  • 📚 多种聚焦模式(网络、学术、YouTube、Reddit等)
  • ⚡ 可配置的优化模式(速度、平衡、质量)
  • 🔧 可定制的模型配置
  • 📖 答复中的来源引用
  • 🚀 多种传输模式(stdio、SSE、流式HTTP)

先决条件

安装

  1. 克隆存储库:
git clone https://github.com/Kaiohz/mcp-perplexica.git
cd mcp-perplexica
  1. 使用UV安装依赖项:
uv sync
  1. 创建环境文件:
cp .env.example .env
  1. 编辑 .env 根据您的配置:
# Perplexica API
PERPLEXICA_URL=http://localhost:3000

# Transport: stdio (default), sse, or streamable-http
TRANSPORT=stdio
HOST=127.0.0.1
PORT=8000

# Model configuration
DEFAULT_CHAT_MODEL_PROVIDER_ID=your-provider-id
DEFAULT_CHAT_MODEL_KEY=anthropic/claude-sonnet-4.5
DEFAULT_EMBEDDING_MODEL_PROVIDER_ID=your-provider-id
DEFAULT_EMBEDDING_MODEL_KEY=openai/text-embedding-3-small

用法

运输方式

服务器支持三种传输模式:

运输描述用例
stdio标准输入/输出CLI工具,Claude Desktop
sse服务器通过HTTP发送事件Web客户端
streamable-http流式HTTP(建议用于生产)生产部署

使用Docker Compose运行

同时运行Perplexica和MCP Perplexiica的最简单方法:

# Copy and configure environment files
cp .env.example .env
cp .env.perplexica.example .env.perplexica

# Edit .env with your MCP Perplexica settings
# Edit .env.perplexica with your Perplexica settings

# Start services
docker compose up -d

这将开始:

  • 困惑http://localhost:3000
  • MCP困惑 连接到Perplexica

运行MCP服务器(无Docker)

标准模式(默认)

uv run python src/main.py

SSE模式

TRANSPORT=sse PORT=8000 uv run python src/main.py

流式HTTP模式

TRANSPORT=streamable-http PORT=8000 uv run python src/main.py

Claude桌面配置

添加到您的Claude Desktop配置(~/Library/Application Support/Claude/claude_desktop_config.json 在macOS上):

{
  "mcpServers": {
    "perplexica": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/mcp-perplexica", "python", "-m", "main"],
      "env": {
        "PERPLEXICA_URL": "http://localhost:3000",
        "TRANSPORT": "stdio",
        "DEFAULT_CHAT_MODEL_PROVIDER_ID": "your-provider-id",
        "DEFAULT_CHAT_MODEL_KEY": "anthropic/claude-sonnet-4.5",
        "DEFAULT_EMBEDDING_MODEL_PROVIDER_ID": "your-provider-id",
        "DEFAULT_EMBEDDING_MODEL_KEY": "openai/text-embedding-3-small"
      }
    }
  }
}

Claude代码配置

对于基于HTTP的传输,您可以将服务器添加到Claude Code中:

# Start the server with streamable-http transport
TRANSPORT=streamable-http PORT=8000 uv run python -m main

# Add to Claude Code
claude mcp add --transport http perplexica http://localhost:8000/mcp

可用工具

search

使用Perplexica进行网络搜索。

参数:

参数类型必填说明
querystring搜索查询
focus_modestring搜索焦点: webSearch, academicSearch, writingAssistant, wolframAlphaSearch, youtubeSearch, redditSearch
optimization_modestring优化: speed, balanced, quality
system_instructionsstringAI响应的自定义指令
chat_model_provider_idstring覆盖默认聊天模型提供程序
chat_model_keystring覆盖默认聊天模式
embedding_model_provider_idstring覆盖默认嵌入提供程序
embedding_model_keystring覆盖默认嵌入模型

例子:

Search for "latest developments in AI" using academic focus

发展

安装开发依赖项

uv sync --dev

运行测试

uv run pytest

运行门楣

uv run ruff check .
uv run ruff format .
uv run black src/

建筑

该项目采用六边形建筑:

src/
├── main.py              # MCP server entry point
├── config.py            # Pydantic Settings
├── dependencies.py      # Dependency injection
├── domain/              # Business core (pure Python)
│   ├── entities.py      # Dataclasses
│   └── ports.py         # ABC interfaces
├── application/         # Use cases
│   ├── requests.py      # Pydantic DTOs
│   └── use_cases.py     # Business logic
└── infrastructure/      # External adapters
    └── perplexica/
        └── adapter.py   # HTTP client

许可证

麻省理工学院

目录标签

目录标签

PythonClaude搜索搜索代理本地部署LLM集成多模式搜索可配置优化API代理

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP