MCP WebSearch
Provides web search through Perplexity Sonar models, returning answers, sources, and query costs. It defaults to the cheaper Sonar model and can optionally use Sonar Pro Search when needed.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP WebSearchSearch the web for the latest trends in AI image generation"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP WebSearch
MCP server for Claude Code: web search via Perplexity Sonar and image generation — all with one OpenRouter key.
Built for one task: not letting the agent accidentally overspend. The expensive search model is not the default, and image generation has a separate tool to estimate the cost before calling.
Installation
git clone git@github.com:DrSeedon/mcp-websearch.git ~/.claude/mcp-servers/websearch
cd ~/.claude/mcp-servers/websearch
npm install
cp .env.example .env # и вписать свой ключRegistration in Claude Code:
claude mcp add websearch node ~/.claude/mcp-servers/websearch/index.js \
-e OPENROUTER_API_KEY=sk-or-v1-...Requires Node 18+ (uses native fetch and ESM).
Related MCP server: sysauto Ask MCP Server
Environment variables
Variable | Required | Purpose |
| yes | OpenRouter key. Checked at startup |
| no | Proxy, if direct access to |
The key is only read from the environment — it is not and must not be in the code.
Tools
search
Web search via Perplexity Sonar. Returns the answer, sources, and request cost.
Model | Cost | When |
| ~$0.006 | Default. Facts, documentation, regular research |
| ~$0.03 | Only if |
There are no other search models — the list is hardcoded.
Why it matters: the price difference is fivefold. If the expensive model were the default, the agent would call it without thinking. Tested on a live setup: 171 out of 425 requests went through the expensive tier simply because the model was not specified explicitly.
generate_image
Image generation. Supports reference images as input and aspect ratios from 21:9 to 9:16.
Model | Purpose |
| Default, good quality |
| Budget option |
| Alternative engine, from fast to high quality |
| Another style option |
generate_image_cost
Estimates the generation cost before the call. Needed so the model choice is deliberate, not "just pick the first one from the list".
Logs
requests.log (in .gitignore) — JSONL, one line per call: [iso] tool: {json}.
search— request, full response, sources, model, tokens, costgenerate_image— prompt, save paths, size, references; base64 is not written to the lognext to the image, a
.jsonfile with the same prompt and metadata is saved ingenerated/
What is not committed
.env, requests.log, generated/ (archive of generated images), node_modules/. Logs and images contain request history — that is private data and has no place in the repository.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that enables Claude to perform web searches using Perplexity's API with intelligent model selection based on query intent and support for domain and recency filtering.64MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that integrates with Sonar API to provide Claude with real-time web search capabilities for comprehensive research.14MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that brings Perplexity's Sonar models with real-time web search capabilities to Claude Desktop and other MCP clients.199MIT
- AlicenseAqualityDmaintenanceMCP server that bridges OpenAI's Agents SDK with Claude Code, enabling web search, file search, and computer use capabilities directly in your development environment.291MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
MCP server for Grok Imagine AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/DrSeedon/mcp-websearch'
If you have feedback or need assistance with the MCP directory API, please join our Discord server