MCP server

Local models (Ollama)

Let a local LLM use PyScrappy's scrapers directly with the built-in pyscrappy chat agent, no MCP host required.

Most MCP clients are cloud apps (Claude, Cursor). Local runtimes like Ollama don't speak MCP on their own, so the usual path is to run a separate MCP host (Goose, Cline, LibreChat) in between.

PyScrappy skips that. It ships a small built-in agent, pyscrappy chat, that talks to Ollama directly and lets a local model call the scrapers as tools. Same 22 tools as the MCP server, no host to install.

This uses the same optional extra as the MCP server, so it needs Python 3.10+: pip install 'pyscrappy[mcp]'.

Quick start

1. Install PyScrappy with the MCP extra and pull a model:

pip install 'pyscrappy[mcp]'
ollama pull qwen2.5

2. Ask a question in plain language:

pyscrappy chat --model qwen2.5 "what's the current AAPL quote?"

The agent hands the model PyScrappy's tool definitions, the model decides which scraper to call, PyScrappy runs it, and the model answers from the structured result.

Requirements

The one hard requirement is a model that supports tool calling (also called function calling). Good local choices:

  • Llama 3.1 (8B and up)
  • Qwen 2.5 (7B and up)
  • Mistral / Mixtral instruct models

A model without tool-calling support simply won't use the scrapers. And note that how well a model picks the right tool among the 22 is up to the model. Smaller models can be hit-or-miss at tool selection, so if a call goes to the wrong tool, try a larger or newer model.

Options

pyscrappy chat [--model MODEL] [--host HOST] [--max-steps N] [-v] "your prompt"
FlagDefaultWhat it does
--modelqwen2.5The Ollama model to use.
--hosthttp://localhost:11434Ollama endpoint. Point at a remote or containerized Ollama here.
--max-steps8Maximum tool-calling rounds before the agent stops.
-v, --verboseoffPrint each tool call (name and arguments) to stderr.

See what the model is doing

Pass -v to watch the tool calls as they happen:

pyscrappy chat -v --model qwen2.5 "define 'ephemeral' and get today's weather in Tokyo"
  → define_word({"word": "ephemeral"})
  → get_weather({"location": "Tokyo"})

Point at a remote Ollama

pyscrappy chat --host http://192.168.1.50:11434 --model llama3.1 "top 5 crypto prices"

How it works

pyscrappy chat reads the same tool registry the MCP server exposes, so the tool set never drifts between the two. It converts each tool's schema into Ollama's function-calling format, then runs the loop against Ollama's /api/chat endpoint: send the prompt and tools, run any tool calls the model requests, feed the results back, and repeat until the model produces a final answer (or --max-steps is reached).

Prefer a full MCP host?

If you'd rather route a local model through a general MCP host (so the same server also serves your editor and other tools), that works too — see Self-host as a remote server and Register with a client.