> For the complete documentation index, see [llms.txt](https://docs.scraperapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scraperapi.com/integrations/llm-integrations/mcp-server.md).

# MCP Server

The **ScraperAPI MCP Server** connects your LLM to ScraperAPI, making scraping as easy as writing a prompt. It supports two modes: a remote server (no local setup required) and a local server (self-hosted via Python or Docker).

## How It Works

* Connects your LLM client to ScraperAPI via a **remote server** ([`https://mcp.scraperapi.com/mcp`](https://mcp.scraperapi.com/mcp)) or a **locally hosted** instance.
* Starts **automatically** when your client needs it.
* Supports a range of **ScraperAPI parameters** (geotargeting, premium proxies, JS Rendering, etc.)
* Uses **ScraperAPI's infrastructure** to scrape and fetch the data.
* Delivers the response directly to your AI, ready to be processed as you decide.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scraperapi.com/integrations/llm-integrations/mcp-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
