multi-api-web-search
This MCP server enables live web search through configured OpenAI-compatible models, with single-model or hybrid multi-model consensus.
Call
multi_api_web_search(or theweb_searchalias) with a required natural-languagequery.Optionally choose a
model/search mode orhybrid; limit results withmax_sourcesfrom 1–30 (default 15).Use hybrid mode to query multiple models in parallel and merge/deduplicate sources.
Benefit from adaptive native/tool search, language-aware querying, stream resilience, retries, and fallback models.
Configure endpoints, API keys, defaults, forced search modes, timeouts, reasoning/focus defaults, and alias registration via environment variables.
Use setup/doctor scripts to benchmark models and auto-select the best search modes.
Provides live web search through OpenAI-compatible API endpoints, using configured models to perform searches in native or tool mode, with optional hybrid multi-model consensus, fallback models, and merged source lists.
Click on "Deploy 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., "@multi-api-web-search Search for the latest breakthroughs in fusion energy with cited sources"
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.
Multi-API Web Search (MCP)
English | 简体中文
Live web search for MCP clients through any OpenAI-compatible /v1 endpoint. A built-in setup tool benchmarks your models, picks the best search mode (native or tool) for each one, and writes .env automatically.
Features
Adaptive search mode: supports both
nativesearch (built-in grounding) andtoolsearch (explicitweb_searchtool call), automatically selecting the best mode per model.Hybrid search: query 2+ models in parallel and get side-by-side answers with a merged, deduplicated source list (and resolved Gemini grounding redirect URLs).
Stream-aware resilience: tracks real streamed output (thinking or answer tokens, ignoring relay keep-alive pings), retries silent or stalled connections, and falls back to
MULTI_WEB_SEARCH_FALLBACK_MODELon failure.Smart query language: automatically searches in the query's language plus English for technical topics and Chinese for China-related topics.
Related MCP server: qsearch
Free Web Search API Backends
Any OpenAI-compatible provider or gateway (such as New API / One API) with search-capable models works out of the box. You can also self-host free web search API backends directly:
ChatGPT Web Search: deploy chatgpt2api (or upstream basketikun/chatgpt2api) to expose ChatGPT's web search as an OpenAI-compatible
/v1API.Gemini Web Search: deploy AIStudio2API (or upstream Mag1cFall/AIStudio2API) to expose Google AI Studio's Gemini models with Google Search grounding.
Point MULTI_WEB_SEARCH_BASE_URL directly at either service, or put both behind an API gateway to run ChatGPT and Gemini together in hybrid mode.
Quick Start
1. Install
git clone https://github.com/Peteroooooooo/multi-api-web-search-mcp.git
cd multi-api-web-search-mcp
npm install2. Configure endpoint
cp .env.example .envSet your endpoint and key in .env:
MULTI_WEB_SEARCH_BASE_URL=https://api.your-provider.com/v1
MULTI_WEB_SEARCH_API_KEY=sk-your-key-here3. Benchmark & auto-configure models
npm run setupInteractive checklist to select which models on your endpoint to test (or pass
-- --models a,b,-- --all,-- --hybrid,-- --single).Benchmarks accuracy, latency, and citation count in both
nativeandtoolmodes, then writes the winning model, fallback model, and per-model modes to.env.Run
npm run doctor(or double-clickdoctor.baton Windows) to inspect the leaderboard and pick models manually.
4. Register in MCP client
The server loads .env from its own directory, so the client config only needs the entry script path.
Claude Code:
claude mcp add -s user multi-api-web-search -- node "/path/to/multi-api-web-search-mcp/src/index.js"Cursor / Claude Desktop (mcp.json):
{
"mcpServers": {
"multi-api-web-search": {
"command": "node",
"args": ["/path/to/multi-api-web-search-mcp/src/index.js"]
}
}
}Tool: multi_api_web_search
Returns an answer with a numbered, deduplicated source list.
Parameter | Type | Default | Description |
|
| - | Search query or question |
|
|
| Specific model name or |
|
|
| Maximum sources to return ( |
|
|
|
|
|
|
| Per-call reasoning effort override |
Environment Variables
Variable | Required | Default | Description |
| Yes | - | OpenAI-compatible |
| Yes | - | API key for the endpoint |
| No | - | Default model name, or |
| No | - | Comma-separated models used when |
| No | - | Fallback model when the primary model fails |
| No | - | Comma-separated models/fragments forced to explicit |
| No | - | Comma-separated models/fragments forced to native search mode |
| No |
| Max wait (ms) for first streamed thinking/answer token before retrying |
| No |
| Max idle gap (ms) after streaming starts before cutting the stream |
| No | unset | Default reasoning effort ( |
| No | unset | Default |
| No |
| Search term language strategy: |
| No | off | Set to |
License
MIT
Available Tools
2 toolsmulti_api_web_searchMulti API Web SearchB
Multi-API Web Search: Live internet search across your configured API models. Supports single model or multi-engine consensus ('hybrid').
Inputs: query (required), model, max_sources.
web_searchWeb Search (Alias)C
Multi-API Web Search: Live internet search across your configured API models. Supports single model or multi-engine consensus ('hybrid').
Inputs: query (required), model, max_sources.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
Both tools have the exact same description and purpose, differing only in the name prefix. An agent cannot reliably choose between them because they appear to be identical duplicates.
Both names use snake_case, but 'web_search' and 'multi_api_web_search' are near-duplicates with no clear convention. The prefixed variant is inconsistent with the generic one, making the naming feel redundant rather than patterned.
Two tools exist but they appear to serve the exact same function. One tool would be appropriate for this simple search server; the extra tool is redundant and does not earn its place.
For a web search server, the tool surface covers the core capability of performing live internet searches. No additional operations like create, update, or delete are relevant to this domain, so there are no obvious gaps.
Maintenance
Related MCP Connectors
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Multi-engine search for AI agents. Trust scoring, local corpus, MCP-native. Self-hostable, BYOK.
Scrape, crawl and search the web for AI agents via MCP.
Free web search for AI agents. No API key required. Hosted MCP in active development.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables web search and site-specific search capabilities through the Deepsearch model. Provides unified access to broad web retrieval and targeted site search functionality within the MCP ecosystem.25Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to perform web searches with full content retrieval and multi-engine provenance, including trust scoring and local corpus persistence, via MCP integration.4Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to perform web search, extraction, and research across multiple provider backends with persistent multi-key rotation and auditable routing. Supports MCP, CLI, and Agent Skill entry points.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and automation tasks to perform structured Google and Bing web searches through an MCP interface, with high-throughput querying and batch/request-status workflows.MIT