Prism

Prism

Multi-level web search MCP server that wraps Claude, Gemini, Perplexity, and Tavily behind a unified interface, enabling multi-depth searches with session management and provider selection.

Category
访问服务器

README

Prism

CI Release License: MIT

Multi-level web search MCP server. Wraps Claude, Gemini, Perplexity, and Tavily behind a unified interface.

Search Levels

  • Level 0: Instant - direct worker call (default: claude_search), supports multi-provider selection
  • Level 1: Quick - 2-3 workers, parallel dispatch (~60s)
  • Level 2: Standard - 4-6 workers, comprehensive (~150s)
  • Level 3: Deep - 8-12 workers, exhaustive research (~600s)

All 4 worker types (claude_search, tavily_search, perplexity_search, gemini_search) are available at every level. L0 supports explicit provider selection via the providers parameter. Levels 1-3 use a search manager that plans tasks, dispatches parallel workers, and synthesizes results.

Quick Start

Prerequisites

  • Podman with podman compose
  • API keys: copy .dev.env.example to .dev.env and fill in values. Keys already in your OS environment (e.g., via ~/.bashrc) flow through automatically -- only add entries for keys not in your shell.

Development

cp .dev.env.example .dev.env    # fill in missing API keys
make dev                         # start PostgreSQL + Prism with hot-reload
make dev-logs                    # view logs
make dev-down                    # stop

Data lives in /tmp for easy cleanup: /tmp/prism-postgres, /tmp/prism-claude.

Production

cp .prod.env.example .prod.env  # fill in secrets

# Create postgres password
openssl rand -base64 32 > ~/.config/prism/postgres_password
chmod 600 ~/.config/prism/postgres_password

make prod                        # start

Data persists at ~/.local/share/prism/postgres and ~/.local/share/prism/claude.

Configuration

All settings with defaults and comments live in config/config.yaml -- this file IS the config documentation.

Loading chain (highest priority wins):

  • PRISM_SECTION_KEY environment variables
  • Custom override YAML (config-custom/, sparse -- only values that differ)
  • config/config.yaml (defaults, always present in image)

Env var naming: YAML paths joined with underscores, prefixed PRISM_:

  • server.port --> PRISM_SERVER_PORT
  • retry.max_transient_retries --> PRISM_RETRY_MAX_TRANSIENT_RETRIES

Secrets use environment variables injected via --env-file into compose. See .prod.env.example for required variables. Custom config overrides go in config-custom/ (gitignored).

MCP Registration

Add to your MCP client config (e.g., ~/.claude.json for Claude Code):

{
  "mcpServers": {
    "prism": {
      "type": "http",
      "url": "http://localhost:8765/mcp",
      "headers": {
        "X-User-Id": "your-username"
      }
    }
  }
}

The X-User-Id header identifies the user for session scoping. Each user sees only their own sessions. Omitting the header defaults to "default".

API

Tools:

  • search(query, level=0, providers=None) - Execute search at specified depth
    • providers (L0 only): ["claude_search"], ["tavily_search"], ["gemini_search"], ["perplexity_search"], any combination, or ["mix"] for all 4 in parallel. Default (None): claude_search only.
  • cancel_all() - Cancel all running searches for the current user
  • get_session(session_id) - Retrieve session details
  • list_sessions(limit=20, offset=0, search=None) - List recent sessions
  • resume(session_id, follow_up) - Resume L1-L3 session with follow-up

Development

UV for Python

All Python commands through UV (never python or pip directly):

uv run pytest tests/unit/ -v
uv run python -m prism
uv run ruff check src/

Testing

# Unit tests (fast, mocked, no API keys)
uv run pytest tests/unit/ -v

# E2E tests (manages full container lifecycle + requires API keys)
uv run python tests/e2e/run_e2e.py                     # all tests
uv run python tests/e2e/run_e2e.py --only l0_default,l1 # specific tests

Database Migrations

uv run alembic revision --autogenerate -m "Description"
uv run alembic upgrade head

Architecture

                       MCP Client
                           |
                      [FastMCP Server]
                           |
           +---------------+---------------+
           |               |               |
       Level 0         Level 1-3       Session
   (multi-provider)  (orchestrated)   Management
           |               |
    [Worker Factory]  [Search Manager]
           |               |
    +------+------+   [Worker Dispatcher]
    |      |      |        |
  [1-4 workers]    +-------+-------+-------+
    in parallel    |       |       |       |
           [Claude] [Gemini] [Tavily] [Perplexity]
                   |       |       |       |
                   +-------+-------+-------+
                           |
                     [Synthesizer]
                           |
                       Response

Key patterns:

  • Dual CLI executors: core/executor.py (Claude), core/gemini.py (Gemini)
  • Unified worker factory: same 4 worker types available at all levels
  • Two-tier retry: transient errors + schema validation with --resume (Claude only)
  • Time-aware hooks for both Claude and Gemini CLI agents
  • JSON-lines structured logging
  • DI throughout, no global state
  • Multi-tenancy via user_id scoping

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选