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:
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