mirror of
https://github.com/D4Vinci/Scrapling.git
synced 2026-09-14 20:07:02 +08:00
73ad18be58
A better fix than #418 is to eliminate this bug class and keep the AI agent knowing the default parameter values. I have also shortened the docstrings where possible to save tokens.
1.4 KiB
1.4 KiB
search
| search | ||
|---|---|---|
|
MCP Server API Reference
The Scrapling MCP Server provides eleven powerful tools for web scraping through the Model Context Protocol (MCP). This server integrates Scrapling's capabilities directly into AI chatbots and agents, allowing conversational web scraping with advanced anti-bot bypass features.
You can start the MCP server by running:
scrapling mcp
Or import the server class directly:
from scrapling.core.ai import ScraplingMCPServer
server = ScraplingMCPServer()
server.serve(http=False, host="127.0.0.1", port=8000)
To set a custom Chromium-compatible browser executable for browser-based MCP tools, pass executable_path:
server = ScraplingMCPServer(executable_path="/path/to/chromium")
Response Model
The standardized response structure that's returned by all MCP server tools:
::: scrapling.core.ai.ResponseModel
handler: python
:docstring:
Session Models
Model classes for session management:
::: scrapling.core.ai.SessionInfo
handler: python
:docstring:
::: scrapling.core.ai.SessionCreatedModel
handler: python
:docstring:
::: scrapling.core.ai.SessionClosedModel
handler: python
:docstring:
MCP Server Class
The main MCP server class that provides all web scraping tools:
::: scrapling.core.ai.ScraplingMCPServer
handler: python
:docstring: