web-search-extract-mcp
v1.0.1
Published
A Model Context Protocol server for web search with content extraction
Downloads
10
Maintainers
Readme
Web Search MCP
A Model Context Protocol (MCP) server for web search with content extraction, using the web-content-extract library.
Features
- 🔍 Web search using Bing search engine
- 📄 Content extraction using Mozilla Readability
- 🏷️ SEO metadata extraction
- 🧠 Integration with AI assistants through the Model Context Protocol
- 🛠️ MCP tool for searching and extracting web content
Installation
As an MCP Server
To use this as an MCP server, configure it in your MCP settings:
{
"mcpServers": {
"web-search": {
"command": "npx",
"args": ["web-search-extract-mcp"],
"disabled": false
}
}
}Direct Installation
npm install web-search-extract-mcpUsage
Once configured as an MCP server, you can use the search_web_content tool:
{
"query": "latest AI developments",
"maxResults": 5,
"includeContent": true
}Tool Parameters
query(string, required): The search querymaxResults(number, optional): Maximum number of results to return (default: 10)includeContent(boolean, optional): Whether to include extracted content (default: true)
Tool Response
The tool returns extracted content from web pages along with metadata:
{
"content": [
{
"type": "text",
"text": "Extracted content from web pages..."
}
],
"sources": [
{
"title": "Page Title",
"url": "https://example.com",
"snippet": "Page snippet"
}
]
}Development
Prerequisites
- Node.js 18+
- npm or yarn
Setup
git clone https://github.com/your-username/web-search-extract-mcp.git
cd web-search-extract-mcp
npm installBuilding
npm run buildRunning Locally
npm startOr for development with auto-reload:
npm run devAPI
search_web_content
Performs a web search and extracts content from the results.
Parameters:
query: Search query stringmaxResults: Maximum number of results to returnincludeContent: Whether to extract content from pages
Returns:
content: Extracted content in Markdown formatsources: List of sources with titles, URLs, and snippets
How It Works
- Search: Uses Bing to search for the query
- Extract: Uses
web-content-extractto extract main content from search results - Format: Formats the content for AI consumption
- Return: Returns structured data with sources
License
MIT
