Spider Cloud MCP Server
Enables AI assistants to scrape, crawl, search, and extract data from websites via the Spider Cloud API, with anti-bot bypass and JavaScript rendering.
README
Spider Cloud MCP Server
A high-performance Model Context Protocol (MCP) server that provides comprehensive web scraping, crawling, and data extraction capabilities through the Spider Cloud API. This server enables AI assistants like Claude to interact with web content using Spider Cloud's advanced scraping infrastructure.
🌟 Features
Core Tools
spider_scrape- Advanced single-page scraping with JavaScript rendering and anti-bot bypassspider_crawl- Intelligent website crawling with depth control and filteringspider_search- Google-like web search with content fetching capabilitiesspider_links- Comprehensive link extraction and analysisspider_screenshot- High-quality webpage screenshots with customizationspider_transform- HTML to markdown/text conversion with readability processing
Advanced Capabilities
- 🛡️ Anti-bot Detection Bypass - Stealth mode and advanced evasion techniques
- 🌐 Premium Proxy Support - Geographic targeting with country-specific proxies
- 🎭 JavaScript Rendering - Full browser emulation for dynamic content
- 📊 Metadata Extraction - Comprehensive page metadata and analytics
- 🔍 CSS Selectors - Precise content targeting and extraction
- 💾 Cloud Storage - Optional data persistence in Spider Cloud
- ⚡ High Performance - Optimized for speed with configurable timeouts
- 🔒 Secure Authentication - Bearer token authentication with API key
- 📈 Cost Tracking - Real-time API usage cost monitoring
- 🐛 Debug Mode - Comprehensive logging for troubleshooting
📋 Prerequisites
- Node.js 18 or higher
- Spider Cloud API key (Get one free at spider.cloud)
- MCP-compatible client (Claude Desktop, Claude Code, Cursor, etc.)
🚀 Quick Start
Option 1: Install from npm (Recommended)
# Global installation
npm install -g @willbohn/spider-mcp
# Or use with npx (no installation needed)
npx @willbohn/spider-mcp
Option 2: Clone from GitHub
Windows:
# Clone and install
git clone https://github.com/willbohn/spider-mcp.git
cd spider-mcp
# Run the Windows installer (PowerShell)
.\install-windows.ps1
# Or use the batch file (Command Prompt)
install-windows.bat
# Test the installation
$env:SPIDER_API_KEY="your_key"
node test.js
macOS/Linux:
# Clone and install
git clone https://github.com/willbohn/spider-mcp.git
cd spider-mcp
./install-local.sh
# Or manually:
npm install
npm link
# Test the installation
SPIDER_API_KEY=your_key node test.js
Option 3: Direct Path Configuration
Skip installation and point directly to the built files in your MCP client configuration.
⚙️ Configuration
Platform-Specific Setup Instructions
<details> <summary><b>🪟 Windows Users</b></summary>
Claude Desktop (Windows)
-
Find your configuration file:
- Press
Win + R, type%APPDATA%\Claudeand press Enter - Open
claude_desktop_config.json(create it if it doesn't exist)
- Press
-
Add the Spider MCP configuration:
{
"mcpServers": {
"spider": {
"command": "npx",
"args": ["@willbohn/spider-mcp"],
"env": {
"SPIDER_API_KEY": "your_spider_api_key_here"
}
}
}
}
- Alternative: Using direct path (if npm doesn't work):
{
"mcpServers": {
"spider": {
"command": "node",
"args": ["C:\\Users\\YourName\\spider-mcp\\dist\\index.js"],
"env": {
"SPIDER_API_KEY": "your_spider_api_key_here"
}
}
}
}
Note: On Windows, use double backslashes (\\) in paths or forward slashes (/).
Testing on Windows
# PowerShell
$env:SPIDER_API_KEY="your_key"
node test.js
# Command Prompt
set SPIDER_API_KEY=your_key
node test.js
</details>
<details> <summary><b>🍎 macOS Users</b></summary>
Claude Desktop (macOS)
-
Find your configuration file:
open ~/Library/Application\ Support/Claude/Open
claude_desktop_config.json(create it if it doesn't exist) -
Add the Spider MCP configuration:
{
"mcpServers": {
"spider": {
"command": "npx",
"args": ["@willbohn/spider-mcp"],
"env": {
"SPIDER_API_KEY": "your_spider_api_key_here"
}
}
}
}
Testing on macOS
export SPIDER_API_KEY="your_key"
node test.js
</details>
<details> <summary><b>🐧 Linux Users</b></summary>
Claude Desktop (Linux)
-
Find your configuration file:
# Location varies by distribution, commonly: ~/.config/Claude/claude_desktop_config.json # or ~/.claude/claude_desktop_config.json -
Add the Spider MCP configuration:
{
"mcpServers": {
"spider": {
"command": "npx",
"args": ["@willbohn/spider-mcp"],
"env": {
"SPIDER_API_KEY": "your_spider_api_key_here"
}
}
}
}
Testing on Linux
export SPIDER_API_KEY="your_key"
node test.js
</details>
Other MCP Clients
<details> <summary><b>Claude Code Configuration</b></summary>
Claude Code automatically detects MCP servers. Simply:
-
Install the package globally:
npm install -g @willbohn/spider-mcp -
Set your API key:
- Windows (PowerShell):
$env:SPIDER_API_KEY="your_key" - Windows (CMD):
set SPIDER_API_KEY=your_key - macOS/Linux:
export SPIDER_API_KEY="your_key"
- Windows (PowerShell):
-
The server will be available in Claude Code
</details>
<details> <summary><b>Cursor IDE Configuration</b></summary>
Add to your Cursor settings:
{
"mcp.servers": {
"spider": {
"command": "npx",
"args": ["@willbohn/spider-mcp"],
"env": {
"SPIDER_API_KEY": "your_spider_api_key_here"
}
}
}
}
</details>
<details> <summary><b>VS Code with Continue Extension</b></summary>
Add to your Continue configuration:
{
"mcpServers": [
{
"name": "spider",
"command": "npx",
"args": ["@willbohn/spider-mcp"],
"env": {
"SPIDER_API_KEY": "your_spider_api_key_here"
}
}
]
}
</details>
Environment Variables
| Variable | Required | Description | Default |
|---|---|---|---|
SPIDER_API_KEY |
Yes | Your Spider Cloud API key | - |
SPIDER_API_BASE_URL |
No | API endpoint URL | https://api.spider.cloud |
SPIDER_REQUEST_TIMEOUT |
No | Request timeout in milliseconds | 60000 |
DEBUG |
No | Enable debug logging | false |
🛠️ Tool Documentation
spider_scrape
Scrape content from a single URL with advanced options.
Parameters:
url(required): Target URL to scrapereturn_format: Output format (markdown,raw,text,html,screenshot,links)js: Enable JavaScript renderingwait_for: Wait time for page load (0-60000ms)css_selector: CSS selector for specific contentproxy_enabled: Use premium proxyproxy_country: Two-letter country codestealth: Enable stealth modeanti_bot: Advanced anti-bot bypassheaders: Custom HTTP headerscookies: Cookie stringmetadata: Include metadataclean_html: Clean and sanitize HTMLmedia: Include media elements
Example:
{
"url": "https://example.com",
"return_format": "markdown",
"js": true,
"stealth": true,
"css_selector": ".main-content"
}
spider_crawl
Crawl an entire website with intelligent navigation.
Parameters:
url(required): Starting URLlimit: Max pages to crawl (1-10000)depth: Max crawl depth (0-10)return_format: Output formatwhitelist: URL patterns to includeblacklist: URL patterns to excludebudget: Crawl budget configurationsubdomains: Include subdomainssitemap: Use sitemap.xmlrespect_robots: Respect robots.txt- Plus all proxy and rendering options from scrape
Example:
{
"url": "https://docs.example.com",
"limit": 50,
"depth": 3,
"whitelist": ["*/api/*"],
"return_format": "markdown"
}
spider_search
Search the web with Google-like results.
Parameters:
query(required): Search querysearch_limit: Max results (1-100)fetch_page_content: Fetch full contenttbs: Time-based search (qdr:d,qdr:w,qdr:m,qdr:y)gl: Country code (e.g.,us,uk)hl: Language code (e.g.,en,es)safe: SafeSearch level (off,medium,high)- Plus content fetching options
Example:
{
"query": "artificial intelligence news",
"search_limit": 10,
"tbs": "qdr:w",
"gl": "us",
"fetch_page_content": true
}
spider_links
Extract and analyze links from a webpage.
Parameters:
url(required): Target URLlimit: Max links (1-5000)depth: Extraction depth (0-5)unique: Return only unique linkssubdomains: Include subdomain linksexternal: Include external links- Plus standard options
spider_screenshot
Capture webpage screenshots.
Parameters:
url(required): Target URLfullpage: Full page screenshotviewport_width: Width in pixels (320-3840)viewport_height: Height in pixels (240-2160)format: Image format (png,jpeg,webp)quality: JPEG/WebP quality (0-100)omit_background: Transparent background (PNG only)clip: Region to capture
spider_transform
Transform HTML to clean, readable formats.
Parameters:
data(required): HTML/text to transformreturn_format(required): Target format (markdown,text,raw,clean_html)readability: Apply readability processingclean: Remove unnecessary elementsinclude_links: Include hyperlinksinclude_images: Include images
🧪 Testing
Run the comprehensive test suite:
Windows
# PowerShell
$env:SPIDER_API_KEY="your_api_key_here"
node test.js
# With debug output
$env:DEBUG="true"
$env:SPIDER_API_KEY="your_api_key_here"
node test.js
# Command Prompt
set SPIDER_API_KEY=your_api_key_here
node test.js
macOS/Linux
# Set your API key
export SPIDER_API_KEY=your_api_key_here
# Run tests
node test.js
# With debug output
DEBUG=true SPIDER_API_KEY=your_api_key_here node test.js
Test Suites
# Quick smoke tests
npm run test:quick
# Full comprehensive suite (100+ tests)
npm run test:full
# LinkedIn-specific tests
npm run test:linkedin
# Run specific category
npm run test:category -- --category scraping
📊 API Response Format
All tools return responses in a consistent format:
{
"success": true,
"results": [...],
"count": 10,
"costs": {
"total_cost": 0.00012,
"compute_cost": 0.00008,
"bandwidth_cost": 0.00004
},
"metadata": {
"duration": 1234,
"status": 200
}
}
🔧 Development
Building from Source
npm install
npm run build
Running in Development Mode
npm run dev
Project Structure
spider-mcp/
├── src/
│ └── index.ts # Main server implementation
├── dist/ # Compiled JavaScript
├── examples/ # Configuration examples
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
└── README.md # This file
🐛 Troubleshooting
Common Issues
"SPIDER_API_KEY environment variable is required"
- Ensure your API key is set in the environment or configuration
- Check the key is valid at spider.cloud
"Payment required" error
- Your API key needs credits
- Add credits at spider.cloud
"Rate limit exceeded"
- You've hit the API rate limit
- Wait a few minutes or upgrade your plan
Search tool timeout
- Search operations can take 15-30 seconds
- This is normal behavior for comprehensive searches
Debug Mode
Enable detailed logging:
Windows (PowerShell):
$env:DEBUG="true"
$env:SPIDER_API_KEY="your_key"
node dist/index.js
Windows (Command Prompt):
set DEBUG=true
set SPIDER_API_KEY=your_key
node dist/index.js
macOS/Linux:
DEBUG=true SPIDER_API_KEY=your_key node dist/index.js
📝 Error Handling
The server provides detailed error messages:
- 401: Invalid API key
- 402: Payment required (add credits)
- 429: Rate limit exceeded
- 500+: Server errors (contact support)
🔒 Security
- API keys are never logged or stored
- All requests use HTTPS
- Bearer token authentication
- Input validation on all parameters
- Sanitized error messages
📈 Performance
- Configurable timeouts (default: 60s)
- Automatic retry logic for transient failures
- Connection pooling for efficiency
- Response caching at API level
- Optimized for concurrent requests
🤝 Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
📄 License
MIT License - see LICENSE file for details
🔗 Resources
💬 Support
- MCP Server Issues: GitHub Issues
- Spider API Support: spider.cloud/support
- API Status: status.spider.cloud
Built with ❤️ for the MCP ecosystem
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。