webSearch Tools
Built as a Model Context Protocol (MCP) server that provides advanced web search, content extraction, web crawling, and scraping capabilities using the Firecrawl API.
Built as a Model Context Protocol (MCP) server that provides advanced web search, content extraction, web crawling, and scraping capabilities using the Firecrawl API.
A powerful web search and content extraction tool built with Python, leveraging the Firecrawl API for advanced web scraping, searching, and content analysis capabilities.
# On Windows (using pip)
pip install uv
# On Unix/MacOS
curl -LsSf https://astral.sh/uv/install.sh | sh
# Add uv to PATH (Unix/MacOS)
export PATH="$HOME/.local/bin:$PATH"
# Add uv to PATH (Windows - add to Environment Variables)
# Add: %USERPROFILE%.localin
git clone https://github.com/yourusername/websearch.git
cd websearch
# Create virtual environment
uv venv
# Activate on Windows
..venvScriptsactivate.ps1
# Activate on Unix/MacOS
source .venv/bin/activate
# Install from requirements.txt
uv sync
# Create .env file
touch .env
# Add your API keys
FIRECRAWL_API_KEY=your_firecrawl_api_key
OPENAI_API_KEY=your_openai_api_key
Instead of running the server directly, you can configure Claude for Desktop to access the WebSearch tools:
Locate or create your Claude for Desktop configuration file:
Windows: %env:AppData%Claudeclaude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Add the WebSearch server configuration to the mcpServers
section:
{
"mcpServers": {
"websearch": {
"command": "uv",
"args": [
"--directory",
"D:ABSOLUTEPATHTOWebSearch",
"run",
"main.py"
]
}
}
}
Make sure to replace the directory path with the absolute path to your WebSearch project folder.
Save the configuration file and restart Claude for Desktop.
Once configured, the WebSearch tools will appear in the tools menu (hammer icon) in Claude for Desktop.
Search
Extract Information
Crawl Websites
Scrape Content
query
(str): The search queryurls
(List[str]): List of URLs to extract information fromprompt
(str): Instructions for extractionenableWebSearch
(bool): Enable supplementary web searchshowSources
(bool): Include source referencesurl
(str): Starting URLmaxDepth
(int): Maximum crawl depthlimit
(int): Maximum pages to crawlurl
(str): Target URLThe tool requires certain API keys to function. We provide a .env.example
file that you can use as a template:
# On Unix/MacOS
cp .env.example .env
# On Windows
copy .env.example .env
.env
file with your API keys:# OpenAI API key - Required for AI-powered features
OPENAI_API_KEY=your_openai_api_key_here
# Firecrawl API key - Required for web scraping and searching
FIRECRAWL_API_KEY=your_firecrawl_api_key_here
OpenAI API Key:
Visit OpenAI's platform
Create a new secret key
Firecrawl API Key:
If everything is configured correctly, you should receive a JSON response with search results.
If you encounter errors:
.env
file.env
file is in the root directory of the projectgit checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)This project is licensed under the MIT License - see the LICENSE file for details.
José Martín Rodriguez Mortaloni - @m4s1t425 - [email protected]
Made with ❤️ using Python and Firecrawl
[
{
"description": "Performs web searches and retrieves up-to-date information from the internet. Args: - prompt: Specific query or topic to search for on the internet - limit: Maximum number of results to return (between 1 and 20) Returns: - Search results with relevant information about the requested topic ",
"inputSchema": {
"properties": {
"query": {
"title": "Query",
"type": "string"
}
},
"required": [
"query"
],
"title": "searchArguments",
"type": "object"
},
"name": "search"
},
{
"description": "Crawls a website starting from the specified URL and extracts content from multiple pages. Args: - url: The complete URL of the web page to start crawling from - maxDepth: The maximum depth level for crawling linked pages - limit: The maximum number of pages to crawl Returns: - Content extracted from the crawled pages in markdown and HTML format ",
"inputSchema": {
"properties": {
"limit": {
"title": "Limit",
"type": "integer"
},
"maxDepth": {
"title": "Maxdepth",
"type": "integer"
},
"url": {
"title": "Url",
"type": "string"
}
},
"required": [
"url",
"maxDepth",
"limit"
],
"title": "crawlArguments",
"type": "object"
},
"name": "crawl"
},
{
"description": "Extracts specific information from a web page based on a prompt. Args: - url: The complete URL of the web page to extract information from - prompt: Instructions specifying what information to extract from the page - enabaleWebSearch: Whether to allow web searches to supplement the extraction - showSources: Whether to include source references in the response Returns: - Extracted information from the web page based on the prompt ",
"inputSchema": {
"properties": {
"enabaleWebSearch": {
"title": "Enabalewebsearch",
"type": "boolean"
},
"prompt": {
"title": "Prompt",
"type": "string"
},
"showSources": {
"title": "Showsources",
"type": "boolean"
},
"url": {
"items": {
"type": "string"
},
"title": "Url",
"type": "array"
}
},
"required": [
"url",
"prompt",
"enabaleWebSearch",
"showSources"
],
"title": "extractArguments",
"type": "object"
},
"name": "extract"
},
{
"description": "",
"inputSchema": {
"properties": {
"url": {
"title": "Url",
"type": "string"
}
},
"required": [
"url"
],
"title": "scrapeArguments",
"type": "object"
},
"name": "scrape"
}
]