WebSearch
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Integrations
Uses .ENV files to manage API keys and configuration settings for the WebSearch server.
Provides integration for repository management, allowing users to fork, clone, and contribute to the WebSearch project.
Supports output of crawled and extracted web content in Markdown format for improved readability and structure.
WebSearch - Advanced Web Search and Content Extraction Tool
A powerful web search and content extraction tool built with Python, leveraging the Firecrawl API for advanced web scraping, searching, and content analysis capabilities.
π Features
- Advanced Web Search: Perform intelligent web searches with customizable parameters
- Content Extraction: Extract specific information from web pages using natural language prompts
- Web Crawling: Crawl websites with configurable depth and limits
- Web Scraping: Scrape web pages with support for various output formats
- MCP Integration: Built as a Model Context Protocol (MCP) server for seamless integration
π Prerequisites
- Python 3.8 or higher
- uv package manager
- Firecrawl API key
- OpenAI API key (optional, for enhanced features)
- Tavily API key (optional, for additional search capabilities)
π οΈ Installation
- Install uv:
- Clone the repository:
- Create and activate a virtual environment with uv:
- Install dependencies with uv:
- Set up environment variables:
π― Usage
Setting Up With Claude for Desktop
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%\Claude\claude_desktop_config.json
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
- Add the WebSearch server configuration to the
mcpServers
section:
- 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.
Available Tools
- Search
- Extract Information
- Crawl Websites
- Scrape Content
π API Reference
Search
query
(str): The search query- Returns: Search results in JSON format
Extract
urls
(List[str]): List of URLs to extract information fromprompt
(str): Instructions for extractionenableWebSearch
(bool): Enable supplementary web searchshowSources
(bool): Include source references- Returns: Extracted information in specified format
Crawl
url
(str): Starting URLmaxDepth
(int): Maximum crawl depthlimit
(int): Maximum pages to crawl- Returns: Crawled content in markdown/HTML format
Scrape
url
(str): Target URL- Returns: Scraped content with optional screenshots
π§ Configuration
Environment Variables
The tool requires certain API keys to function. We provide a .env.example
file that you can use as a template:
- Copy the example file:
- Edit the
.env
file with your API keys:
Getting the API Keys
- OpenAI API Key:
- Visit OpenAI's platform
- Sign up or log in
- Navigate to API keys section
- Create a new secret key
- Firecrawl API Key:
- Visit Firecrawl's website
- Create an account
- Navigate to your dashboard
- Generate a new API key
If everything is configured correctly, you should receive a JSON response with search results.
Troubleshooting
If you encounter errors:
- Ensure all required API keys are set in your
.env
file - Verify the API keys are valid and have not expired
- Check that the
.env
file is in the root directory of the project - Make sure the environment variables are being loaded correctly
π€ Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Firecrawl for their powerful web scraping API
- OpenAI for AI capabilities
- MCPThe MCP community for the protocol specification
π¬ Contact
JosΓ© MartΓn Rodriguez Mortaloni - @m4s1t425 - jmrodriguezm13@gmail.com
Made with β€οΈ using Python and Firecrawl
You must be authenticated.
Built as a Model Context Protocol (MCP) server that provides advanced web search, content extraction, web crawling, and scraping capabilities using the Firecrawl API.
- π Features
- π Prerequisites
- π οΈ Installation
- π― Usage
- π API Reference
- π§ Configuration
- π€ Contributing
- π License
- π Acknowledgments
- π¬ Contact