Files
Karim shoair 73ad18be58 refactor(mcp)!: More reliable structure + new tools
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.
2026-08-21 03:16:17 +03:00

1.4 KiB

search
search
exclude
true

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: