🌐 WebSnatch
Your friendly neighborhood file-snatching superhero! 🦸♂️
Meet WebSnatch - your lightning-fast file butler powered by MCP! It fetches web files with style, grace, and a dash of pizzazz. Simple, efficient, and ready to serve! ✨
🚀 Features That'll Make You Go "Wow!"
- 🔒 URL Validation - Because we don't just let any sketchy URL into our party
- 📁 Auto-Magic Directory Creation - Like a digital Marie Kondo, keeping your downloads tidy
- 🎯 Custom File Naming - Give your files the names they deserve (no more "download_123.txt")
- 🌊 Streaming HTTP Transport - Smooth like butter, efficient like a ninja
- 🛡️ Session Management - Keeping track of your downloads like a responsible adult
- 📝 Content Type Detection - We know what's what, so you don't have to
🛠️ Tech Stack of Awesomeness
- Node.js (≥18.0.0) - Because we're modern like that
- Express - The trusty steed of web servers
- MCP SDK - Our secret sauce for magical file handling
- Zod - Keeping our data types in check (and our sanity intact)
🏃♂️ Quick Start
Install dependencies (because we can't do magic without our wands)
cd web-agent-mcp/server npm install
Fire it up! 🔥
npm start
## 🎮 Example
```javascript
// Your file-downloading dreams are just an API call away!
POST /mcp
Headers: { 'mcp-session-id': 'your-session-id' }
Body: {
"jsonrpc": "2.0",
"method": "downloadFromWeb",
"params": {
"url": "https://example.com/awesome-file.pdf",
"fileName": "my-awesome-file.pdf"
},
"id": 1
}
