Prerequisites
Before setting up the MCP server, ensure you have:- Python 3.8 or higher installed
- Scrapling installed with extras:
pip install scrapling[all] - (Optional) Playwright browsers:
scrapling install
Installation
Method 1: Using uvx (Recommended)
The fastest way to run the MCP server:Method 2: Using pip
Install Scrapling globally or in a virtual environment:Method 3: Using Docker
Run the MCP server in a container:Configuration for AI Clients
Claude Desktop
Add to your Claude Desktop configuration file: MacOS:~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Cline (VS Code Extension)
Add to Cline’s MCP settings:- Open VS Code settings
- Search for “Cline MCP”
- Add server configuration:
Custom MCP Clients
For custom implementations, connect to the server using: Stdio transport:Server Options
The MCP server supports several command-line options:Use streamable-http transport instead of stdio
Host address for HTTP transport
Port number for HTTP transport
Transport Modes
Stdio Mode (Default)
Best for local AI assistants:- Standard input/output communication
- No network configuration needed
- Ideal for Claude Desktop, Cline
- Lower latency for local operations
HTTP Mode
Best for network-accessible services:- Streamable HTTP transport
- Network accessible
- Can be used by remote clients
- Requires port configuration
Verification
After configuration, verify the setup:Test with uvx
Test HTTP Transport
Check in AI Client
- Restart your AI client (Claude Desktop, Cline, etc.)
- Look for “Scrapling” in available tools/servers
- Try a simple request: “Fetch the content from example.com”
Troubleshooting
Server not found in AI client
Server not found in AI client
- Ensure the configuration file path is correct
- Verify the command is accessible in your PATH
- Restart the AI client after configuration changes
- Check for syntax errors in the JSON configuration
Playwright browsers missing
Playwright browsers missing
Run the install command:This installs Chromium and required dependencies.
Permission errors
Permission errors
- Ensure Python has proper permissions
- On Unix systems, check file ownership
- Try running with appropriate user privileges
Port already in use (HTTP mode)
Port already in use (HTTP mode)
- Choose a different port:
--port 8001 - Check for other services using the port
- Use
lsof -i :8000(Unix) ornetstat -ano | findstr :8000(Windows)
Environment Variables
Optional environment variables for advanced configuration:Docker Configuration
For Docker deployments:Basic Docker Run
HTTP Transport with Port Mapping
Docker Compose
Next Steps
MCP Server Overview
Learn about MCP server features
Capabilities
Explore available tools and operations