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.
README
Prism
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.exampleto.dev.envand 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_KEYenvironment 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_PORTretry.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 depthproviders(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 userget_session(session_id)- Retrieve session detailslist_sessions(limit=20, offset=0, search=None)- List recent sessionsresume(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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.