mcp-internet
by Sonesh-2202
README.md
# ๐ MCP Internet Server v3.0
[](https://www.python.org/downloads/)
[](https://modelcontextprotocol.io/)
[](https://opensource.org/licenses/MIT)
[](#)
[](https://lmstudio.ai/)
> **Give your local LLMs the power of the internet โ with real data extraction, not just links!** ๐
An open-source Model Context Protocol (MCP) server providing **25 internet tools** for local Large Language Models. The v3.0 upgrade adds **intelligent search with auto-extraction**, **multi-source aggregation**, **result caching**, and **structured output** โ making your AI return actual data instead of raw links.
Seamlessly deployable across **Windows, macOS, and Linux**. **No API keys required!**
---
## ๐ What's New in v3.0
| Feature | Before (v2.0) | After (v3.0) |
|---------|---------------|--------------|
| **Search Results** | Links + snippets only | Full data extraction from pages |
| **Tool Calls Needed** | 5-10+ per query | 1-2 per query |
| **Output Format** | Plain text | Markdown tables, bullet points |
| **Caching** | None | SQLite with TTL (30min-24h) |
| **Rate Limiting** | None | Per-domain throttling |
| **Multi-Source** | Manual per source | Auto-aggregation from top results |
| **Content Extraction** | Generic text only | Domain-aware (Wikipedia, IMDb, LinkedIn) |
### New Tools
- **`smart_search`** โ ๐ Searches + scrapes + extracts + formats in one call
- **`deep_search`** โ Like smart_search but examines more sources
- **`clear_cache`** โ Manage the result cache
---
## โจ Key Features
- **๐ง Smart Search:** One tool call returns extracted data โ movie lists, profiles, technical docs โ not just links.
- **๐ Auto-Extraction:** Automatically scrapes top results and extracts structured data (JSON-LD, tables, meta tags).
- **๐ Structured Output:** Results come as markdown tables, bullet points, and organized sections.
- **โก Cached Results:** Repeated queries are served from SQLite cache in milliseconds.
- **๐ก๏ธ Rate Limiting:** Per-domain request throttling prevents IP bans.
- **๐ UA Rotation:** Pool of 7 browser user-agents for stealth.
- **๐ Domain-Aware:** Special extractors for Wikipedia, IMDb, LinkedIn, and more.
- **๐ Zero Config:** No API keys, no external subscriptions, no setup hassle.
---
## ๐ ๏ธ Available Tools (25 Total)
| Category | Tools |
|----------|-------|
| ๐ **Smart Search** | `smart_search`, `deep_search` |
| ๐ **Basic Search** | `search_web`, `quick_lookup`, `search_site` |
| ๐ **Reading** | `read_webpage`, `read_pdf` |
| ๐ฐ **News/Social** | `get_news`, `search_reddit`, `search_twitter` |
| ๐ฌ **YouTube** | `search_youtube`, `get_video_info` |
| ๐ป **GitHub** | `search_github`, `get_repo_info` |
| ๐ค๏ธ **Info / Utils** | `get_weather`, `get_current_time`, `translate_text`, `calculate` |
| ๐ **URLs/IP** | `shorten_url`, `get_my_ip`, `geolocate_ip` |
| ๐ฑ **Generation** | `generate_qr`, `generate_wifi_qr`, `send_email` |
| ๐๏ธ **Cache** | `clear_cache` |
---
## ๐ Quick Start
### Prerequisites
- [Python 3.10+](https://www.python.org/downloads/)
- [uv](https://github.com/astral-sh/uv) (recommended) or pip
### Installation
```bash
# 1. Clone the repository
git clone https://github.com/Sonesh-2202/mcp-internet.git
cd mcp-internet
# 2. Install dependencies
uv sync
```
### LM Studio Configuration
Add to your LM Studio `mcp.json`:
```json
{
"mcpServers": {
"mcp-internet": {
"command": "uv",
"args": ["run", "mcp-internet"],
"cwd": "/absolute/path/to/mcp-internet"
}
}
}
```
*(Replace `/absolute/path/to/mcp-internet` with your actual project path)*
### ๐ Detailed OS Guides
For complete, step-by-step instructions for **Windows, macOS, and Linux**, see the ๐ **[Multi-Platform Usage Guide](MULTI_PLATFORM_GUIDE.md)**.
---
## ๐ก How It Works: smart_search vs search_web
### Before (v2.0): Multiple tool calls, manual scraping
```
User: "What are the upcoming Bollywood movies in 2026?"
Tool call 1: search_web("upcoming Bollywood movies 2026")
โ Returns 10 links with snippets
Tool call 2: read_webpage("https://www.imdb.com/...")
โ Returns raw text
Tool call 3: read_webpage("https://www.wikipedia.org/...")
โ Returns raw text
AI must manually piece together the answer from raw text.
```
### After (v3.0): One tool call, structured data
```
User: "What are the upcoming Bollywood movies in 2026?"
Tool call 1: smart_search("upcoming Bollywood movies 2026")
โ Returns:
- Extracted movie list with titles, dates, genres
- Markdown tables with ratings
- Data from multiple sources combined
- All in one response, ready to present
```
---
## ๐๏ธ Architecture
```
mcp-internet/
โโโ pyproject.toml # Dependencies & Config
โโโ README.md # This file
โโโ MULTI_PLATFORM_GUIDE.md # OS-specific setup guide
โโโ src/mcp_internet/
โโโ server.py # Entry point โ 25 MCP tools
โโโ tools/
โ โโโ smart_search.py # ๐ Intelligent search + extraction
โ โโโ search.py # Basic DuckDuckGo search
โ โโโ webpage.py # Page reader with structured extraction
โ โโโ news.py # News headlines
โ โโโ youtube.py # YouTube search & video info
โ โโโ github.py # GitHub repos & users
โ โโโ reddit.py # Reddit search
โ โโโ twitter.py # Twitter/X via Nitter
โ โโโ ... # weather, time, translate, math, etc.
โโโ utils/
โโโ http_client.py # Async HTTP with UA rotation & rate limiting
โโโ cache.py # SQLite TTL cache
โโโ extractors.py # Domain-specific data extractors
```
### Data Flow
```
User Query โ smart_search
โโโ 1. Check cache (return if fresh)
โโโ 2. Optimize query & classify (person/movie/news/tech/general)
โโโ 3. Search DuckDuckGo (HTML scraping + ddgs fallback)
โโโ 4. Prioritize results by domain authority
โโโ 5. Scrape top 3 pages in parallel (asyncio.gather)
โโโ 6. Apply domain-specific extractors
โ โโโ Wikipedia โ infobox, summary, key facts
โ โโโ IMDb โ titles, ratings, cast, genres
โ โโโ LinkedIn โ name, role, skills, experience
โ โโโ Generic โ JSON-LD, OpenGraph, tables
โโโ 7. Aggregate & format as structured markdown
โโโ 8. Cache result
โโโ 9. Return comprehensive response
```
---
## ๐ง Supported Data Sources
| Source | What's Extracted | Extractor Type |
|--------|-----------------|----------------|
| **Wikipedia** | Infobox, summary, key facts | Domain-specific |
| **IMDb** | Movie/show details, ratings, cast, genres | Domain-specific (JSON-LD) |
| **LinkedIn** | Name, role, skills, experience, education | Domain-specific (Googlebot UA) |
| **GitHub** | Repos, stars, forks, languages, topics | API-based |
| **Reddit** | Posts, scores, comments, subreddit info | JSON API |
| **YouTube** | Video titles, channels, views, duration | HTML parsing |
| **Any website** | JSON-LD, OpenGraph, HTML tables, main text | Generic fallback |
---
## โก Performance
| Metric | Value |
|--------|-------|
| **Cache hit** | < 50ms |
| **Simple search** | 1-3 seconds |
| **Smart search (3 sources)** | 3-8 seconds |
| **Deep search (5+ sources)** | 5-15 seconds |
| **Rate limiting** | 2 req/sec per domain |
| **UA rotation** | 7 browser user-agents |
---
## ๐งช Testing
```bash
# Run the integration test suite
uv run python test_v3.py
```
### Recommended LM Studio Test Queries:
1. **`"What are the upcoming Bollywood movies in 2026?"`** โ Should return movie lists
2. **`"Search the web for Sundar Pichai"`** โ Should return profile data
3. **`"Latest albums by Taylor Swift"`** โ Should return music data
4. **`"Python asyncio tutorial"`** โ Should return technical content
---
## ๐ License & Contributing
This project is licensed under the MIT License - See [LICENSE](LICENSE) for details.
Contributions, bug reports, and feature requests are highly welcome!
---
**Made with โค๏ธ for the Local Developer & LLM community**
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues