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 defaultmcp_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
- A ScrapeGraphAI API key — set as
SGAI_API_KEY - LiteLLM installed with proxy extras:
Configure the MCP server
Add ScrapeGraph to themcp_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
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
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 athttp://localhost:4000/mcp to discover them:
| Tool | What it does |
|---|---|
scrape | Fetch a page as markdown, HTML, links, or a screenshot |
extract | Extract structured JSON from a URL with a prompt and optional schema |
search | Search the web and return ranked results |
crawl_start | Start an async multi-page crawl |
crawl_get_status | Poll a crawl job’s progress |
crawl_stop / crawl_resume | Control an active crawl |
schema | Generate or augment a JSON Schema from a prompt |
monitor_* | Create, list, pause, resume, and inspect scheduled jobs |
credits | Check remaining account credits |
history | View paginated request history |
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: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