TechSuvam/mcp-multimodel-webscraper
3.1
If you are the rightful owner of mcp-multimodel-webscraper and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This project is a Model Context Protocol (MCP) server that provides tools for web scraping, sentiment analysis, and text generation using Python.
Tools
3
Resources
0
Prompts
0
Simple Multi-Model Web Scraper MCP Server
This project is an example of a Model Context Protocol (MCP) server that exposes multiple tools for web scraping, sentiment analysis, and text generation using Python.
Features
- scrape_webpage: Fetches the title and visible text from any given URL.
- analyze_sentiment: Analyzes the sentiment of a given text using HuggingFace Transformers.
- generate_text: Generates text based on a prompt using HuggingFace Transformers.
Requirements
- Python 3.8+
- Install dependencies:
pip install -r requirements.txt- (If not present, create a
requirements.txtwith:requests beautifulsoup4 transformers torch mcp)
Usage
- Activate your virtual environment
- Windows PowerShell:
./mcp-env/Scripts/Activate.ps1
- Windows PowerShell:
- Run the server
python mcp-env/webscraper_server.py
- Connect via MCP client or VS Code MCP extension
- Use the MCP sidebar to call tools interactively.
Example Tools
scrape_webpage(url): Returns the page title and first 1000 characters of visible text.analyze_sentiment(text): Returns sentiment label and score.generate_text(prompt, max_length=100): Returns generated text for a prompt.
Notes
- Some websites (like YouTube or Flipkart) may restrict scraping or require custom headers.
- For dynamic content (e.g., JavaScript-heavy sites), consider using Selenium or Playwright.
License
MIT