WebSearch-MCP
WebSearch-MCP
stdioトランスポート経由でWeb検索機能を提供するモデルコンテキストプロトコル(MCP)サーバー実装。このサーバーはWebSearch Crawler APIと統合して検索結果を取得します。
目次
Related MCP server: MCP Server for Google Search
について
WebSearch-MCPは、MCPをサポートするAIアシスタントにウェブ検索機能を提供するモデルコンテキストプロトコル(MCP)サーバーです。ClaudeのようなAIモデルは、Webをリアルタイムで検索し、あらゆるトピックに関する最新情報を取得できます。
サーバーは、実際の Web 検索を処理するクローラー API サービスと統合され、標準化されたモデル コンテキスト プロトコルを使用して AI アシスタントと通信します。
インストール
Smithery経由でインストール
Smithery経由で Claude Desktop の WebSearch を自動的にインストールするには:
npx -y @smithery/cli install @mnhlt/WebSearch-MCP --client claude手動インストール
npm install -g websearch-mcpまたはインストールせずに使用します:
npx websearch-mcp構成
WebSearch MCP サーバーは環境変数を使用して構成できます。
API_URL: WebSearch Crawler APIのURL(デフォルト:http://localhost:3001)MAX_SEARCH_RESULT: リクエストで指定されていない場合に返される検索結果の最大数(デフォルト:5)
例:
# Configure API URL
API_URL=https://crawler.example.com npx websearch-mcp
# Configure maximum search results
MAX_SEARCH_RESULT=10 npx websearch-mcp
# Configure both
API_URL=https://crawler.example.com MAX_SEARCH_RESULT=10 npx websearch-mcpセットアップと統合
WebSearch-MCP のセットアップには、実際の Web 検索を実行するクローラー サービスの構成と、MCP サーバーと AI クライアント アプリケーションの統合という 2 つの主要な部分が含まれます。
クローラーサービスの設定
WebSearch MCPサーバーでは、実際のウェブ検索を実行するためにクローラーサービスが必要です。クローラーサービスはDocker Composeを使って簡単に設定できます。
前提条件
クローラーサービスの開始
次の内容を含む
docker-compose.ymlという名前のファイルを作成します。
version: '3.8'
services:
crawler:
image: laituanmanh/websearch-crawler:latest
container_name: websearch-api
restart: unless-stopped
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- PORT=3001
- LOG_LEVEL=info
- FLARESOLVERR_URL=http://flaresolverr:8191/v1
depends_on:
- flaresolverr
volumes:
- crawler_storage:/app/storage
flaresolverr:
image: 21hsmw/flaresolverr:nodriver
container_name: flaresolverr
restart: unless-stopped
environment:
- LOG_LEVEL=info
- TZ=UTC
volumes:
crawler_storage:Mac Apple Siliconの回避策
version: '3.8'
services:
crawler:
image: laituanmanh/websearch-crawler:latest
container_name: websearch-api
platform: "linux/amd64"
restart: unless-stopped
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- PORT=3001
- LOG_LEVEL=info
- FLARESOLVERR_URL=http://flaresolverr:8191/v1
depends_on:
- flaresolverr
volumes:
- crawler_storage:/app/storage
flaresolverr:
image: 21hsmw/flaresolverr:nodriver
platform: "linux/arm64"
container_name: flaresolverr
restart: unless-stopped
environment:
- LOG_LEVEL=info
- TZ=UTC
volumes:
crawler_storage:サービスを開始します。
docker-compose up -dサービスが実行されていることを確認します。
docker-compose psクローラー API ヘルス エンドポイントをテストします。
curl http://localhost:3001/health予想される応答:
{
"status": "ok",
"details": {
"status": "ok",
"flaresolverr": true,
"google": true,
"message": null
}
}クローラー API はhttp://localhost:3001で利用できます。
クローラーAPIのテスト
curl を使用してクローラー API を直接テストできます。
curl -X POST http://localhost:3001/crawl \
-H "Content-Type: application/json" \
-d '{
"query": "typescript best practices",
"numResults": 2,
"language": "en",
"filters": {
"excludeDomains": ["youtube.com"],
"resultType": "all"
}
}'カスタム構成
docker-compose.ymlファイル内の環境変数を変更することで、クローラー サービスをカスタマイズできます。
PORT: クローラーAPIがリッスンするポート(デフォルト: 3001)LOG_LEVEL: ログレベル(オプション: debug、info、warn、error)FLARESOLVERR_URL: FlareSolverr サービスの URL (Cloudflare 保護を回避するため)
MCPクライアントとの統合
クイックリファレンス: MCP 構成
さまざまなクライアント間の MCP 構成のクイック リファレンスを次に示します。
{
"mcpServers": {
"websearch": {
"command": "npx",
"args": [
"websearch-mcp"
],
"environment": {
"API_URL": "http://localhost:3001",
"MAX_SEARCH_RESULT": "5" // reduce to save your tokens, increase for wider information gain
}
}
}
}Windowsの問題に対する回避策
{
"mcpServers": {
"websearch": {
"command": "cmd",
"args": [
"/c",
"npx",
"websearch-mcp"
],
"environment": {
"API_URL": "http://localhost:3001",
"MAX_SEARCH_RESULT": "1"
}
}
}
}使用法
このパッケージは、次のパラメータを持つweb_searchツールを公開する stdio トランスポートを使用して MCP サーバーを実装します。
パラメータ
query(必須): 検索する検索クエリnumResults(オプション): 返される結果の数 (デフォルト: 5)language(オプション): 検索結果の言語コード(例:'en')region(オプション): 検索結果の地域コード(例:'us')excludeDomains(オプション): 結果から除外するドメインincludeDomains(オプション): 結果にこれらのドメインのみを含めるexcludeTerms(オプション): 結果から除外する用語resultType(オプション): 返される結果の種類 ('all'、'news'、または 'blogs')
検索応答の例
検索応答の例を次に示します。
{
"query": "machine learning trends",
"results": [
{
"title": "Top Machine Learning Trends in 2025",
"snippet": "The key machine learning trends for 2025 include multimodal AI, generative models, and quantum machine learning applications in enterprise...",
"url": "https://example.com/machine-learning-trends-2025",
"siteName": "AI Research Today",
"byline": "Dr. Jane Smith"
},
{
"title": "The Evolution of Machine Learning: 2020-2025",
"snippet": "Over the past five years, machine learning has evolved from primarily supervised learning approaches to more sophisticated self-supervised and reinforcement learning paradigms...",
"url": "https://example.com/ml-evolution",
"siteName": "Tech Insights",
"byline": "John Doe"
}
]
}ローカルテスト
WebSearch MCP サーバーをローカルでテストするには、付属のテスト クライアントを使用できます。
npm run test-clientこれにより、MCP サーバーと、検索クエリを入力して結果を表示できるシンプルなコマンド ライン インターフェイスが起動します。
テスト クライアントの API_URL を構成することもできます。
API_URL=https://crawler.example.com npm run test-client図書館として
このパッケージはプログラムで使用できます。
import { createMCPClient } from '@modelcontextprotocol/sdk';
// Create an MCP client
const client = createMCPClient({
transport: { type: 'subprocess', command: 'npx websearch-mcp' }
});
// Execute a web search
const response = await client.request({
method: 'call_tool',
params: {
name: 'web_search',
arguments: {
query: 'your search query',
numResults: 5,
language: 'en'
}
}
});
console.log(response.result);トラブルシューティング
クローラーサービスの問題
API に到達できません: クローラー サービスが実行されており、構成された API_URL でアクセスできることを確認してください。
検索結果が利用できません: クローラー サービスのログをチェックして、エラーがないか確認してください。
docker-compose logs crawlerFlareSolverr の問題:一部のウェブサイトは Cloudflare による保護を使用しています。これに関連するエラーが表示される場合は、FlareSolverr が動作しているかどうかを確認してください。
docker-compose logs flaresolverr
MCP サーバーの問題
インポート エラー: MCP SDK が最新バージョンであることを確認してください。
npm install -g @modelcontextprotocol/sdk@latest接続の問題: stdio トランスポートがクライアントに対して適切に構成されていることを確認してください。
発達
このプロジェクトに取り組むには:
リポジトリをクローンする
依存関係をインストール:
npm installプロジェクトをビルドします:
npm run build開発モードで実行:
npm run dev
サーバーは、付属のswagger.jsonファイルに定義されているWebSearch Crawler APIを期待しています。設定されたAPI_URLでAPIが実行されていることを確認してください。
プロジェクト構造
.gitignore: Git が無視するファイル (node_modules、dist、logs など) を指定します。.npmignore: npm に公開するときに含めないファイルを指定しますpackage.json: プロジェクトのメタデータと依存関係src/: ソースTypeScriptファイルdist/: コンパイルされたJavaScriptファイル(ビルド時に生成)
npmへの公開
このパッケージを npm に公開するには:
npm アカウントがあり、ログインしていることを確認してください (
npm login)package.json のバージョンを更新します (
npm version patch|minor|major)npm publish実行する
.npmignoreファイルは、公開されたパッケージに必要なファイルのみが含まれるようにします。
dist/内のコンパイルされたコードREADME.md および LICENSE ファイル
パッケージ.json
貢献
貢献を歓迎します!お気軽にプルリクエストを送信してください。
ライセンス
ISC
Available Tools
1 toolweb_searchB
Search the web for information. Use this tool when you need to search the web for information. You can use this tool to search for news, blogs, or all types of information. You can also use this tool to search for information about a specific company or product. You can also use this tool to search for information about a specific person. You can also use this tool to search for information about a specific product. You can also use this tool to search for information about a specific company. You can also use this tool to search for information about a specific event. You can also use this tool to search for information about a specific location. You can also use this tool to search for information about a specific thing. If you request search with 1 result number and failed, retry with bigger results number.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query to look up | |
| numResults | No | Number of results to return (default: 5) | |
| language | No | Language code for search results (e.g., 'en') | |
| region | No | Region code for search results (e.g., 'us') | |
| excludeDomains | No | Domains to exclude from results | |
| includeDomains | No | Only include these domains in results | |
| excludeTerms | No | Terms to exclude from results | |
| resultType | No | Type of results to return |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It does not mention potential side effects, rate limits, or permissions. The only behavioral detail is the retry advice, which is insufficient for a tool performing external web requests.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is overly repetitive, listing 'You can also use this tool to search for...' multiple times, which adds no value and wastes tokens. The retry advice is useful but could be condensed. A single sentence covering the core function and filtering options would suffice.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 8 parameters and no output schema, the description provides a basic overview but lacks details on pagination, error handling beyond the retry note, and the structure of results. The schema covers parameter details, but the description does not fully fill the gaps for a complex tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
All 8 parameters have descriptions in the schema, so the schema coverage is 100%. The description adds no additional parameter-specific information beyond what is in the schema, matching the baseline expectation. The retry advice does not relate to parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Search the web for information,' which defines the tool's purpose. However, it lacks specificity and reads as a general search tool rather than highlighting unique capabilities. There are no sibling tools, so no need for differentiation, but the description could be more concise.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes explicit guidance on when to use ('when you need to search the web') and a specific retry strategy for failed requests with small result numbers. No siblings exist, so no alternatives to discuss, but the guidance is clear and actionable.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
1 tool update
v1.0.0- First observed
web_search
TDQS
Scored across 1 tool
Only one tool exists, so there is no ambiguity. The single tool's purpose is clearly defined as searching the web.
With only one tool, naming consistency is trivially maintained. The name 'web_search' follows a clear verb_noun pattern.
A single tool for a web search server is minimal but acceptable for basic functionality. However, a more complete server might include tools for fetching page content or image search, making the count borderline.
The server provides only a search tool, missing common complementary tools like fetching web page content or performing advanced searches. This leaves notable gaps for typical workflows.
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 Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Scrape, crawl and search the web for AI agents via MCP.
Live AI-native web search with citations. One tool for every MCP client. Flat per-request pricing.
Related MCP Servers
- AlicenseAqualityBmaintenanceA Model Context Protocol server that provides real-time web search capabilities to AI assistants through pluggable search providers, currently integrated with the Brave Search API.516MIT
- FlicenseAqualityCmaintenanceA Model Context Protocol server that provides web search capabilities using Google Custom Search API and webpage content extraction functionality.262-
- FlicenseCqualityDmaintenanceA Model Context Protocol server that enables web search capabilities using the Tavily API, allowing AI models to retrieve current information from the internet through natural language commands.3-
- AlicenseBqualityDmaintenanceA Model Context Protocol server that provides web search capabilities using Google Custom Search API and webpage content extraction functionality.2MIT
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/mnhlt/WebSearch-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server