Skip to main content

Overview

LiteLLM ships a built-in MCP gateway that lets the LiteLLM Proxy connect to Model Context Protocol servers and surface their tools to any model you route through it. ScrapeGraphAI is available as a first-party MCP server, so a single config entry gives every LiteLLM client access to smart scraping, web crawling, search scraping, and agentic scraping workflows. LiteLLM ships ScrapeGraph in its default mcp_servers.json, pointing at the ScrapeGraph MCP server hosted on Smithery.

LiteLLM MCP docs

How LiteLLM connects to MCP servers

ScrapeGraph MCP server

The MCP server LiteLLM connects to

Prerequisites

Configure the MCP server

Add ScrapeGraph to the mcp_servers block of your LiteLLM proxy config. This is the same entry LiteLLM ships in its default mcp_servers.json — the Smithery-hosted server exposes both HTTP and SSE transports.
config.yaml
The raw mcp_servers.json entry added in LiteLLM looks like this:
mcp_servers.json
The ScrapeGraph MCP server reads your ScrapeGraphAI API key from SGAI_API_KEY. Set it in the environment where the proxy runs, or pass it through the Smithery config of your MCP server deployment.

Start the proxy

The proxy boots on http://localhost:4000 and registers the ScrapeGraph tools under the MCP gateway.

List the available tools

LiteLLM exposes connected MCP tools over its MCP endpoint. Point any MCP-aware client at http://localhost:4000/mcp to discover them:
The ScrapeGraph server registers these tools:

Use it from a model

With the gateway running, any model routed through LiteLLM can call the ScrapeGraph tools during a completion. Pass the proxy’s MCP tools through your client of choice:
The model decides when to call scrape, search, or extract, receives the structured result, and writes its final answer from the scraped data.

Support

GitHub Issues

Report bugs and request features

Discord Community

Get help from our community