It's a small "web toolkit" — two tools that fetch a web page and return it in a form a model can actually use. No search API, no keys, just plain HTTP + the standard library.
The server is called web-toolkit and exposes two tools:
fetch_url— download a page and return its readable text (strips out<script>/<style>, pulls the<title>, collapses whitespace, truncates tomax_chars). Returns a structured result, not a blob of HTML.extract_links— return every link on a page as{href, text}, with hrefs made absolute.
fetch_url also reports live progress while it works (connecting → parsing →
extracting), so a client can show status instead of staring at a frozen call.
server.py # entrypoint: builds the server and runs it over HTTP
client.py # a real MCP client that calls the tools over HTTP
try_fetch.py # quick scratch script: calls a tool in-process (no server)
web_toolkit/
app.py # build_server() — creates the server, registers tools
tools/
__init__.py # register_all() — one line per tool
fetch.py # fetch_url + the HTML-to-text parser
links.py # extract_links
requirements.txt
I went with a register pattern instead of scattering @mcp.tool() decorators
around: each tool module has a register(mcp) function, and register_all() calls
them. Adding a tool is one new file + one line.
Needs two terminals — one for the server, one for the client.
# one-time setup
python -m venv .venv
.venv/bin/pip install -r requirements.txtTerminal 1 — start the server (stays running):
.venv/bin/python server.py
# serves on http://127.0.0.1:8000/mcpTerminal 2 — run the client:
.venv/bin/python -m clientYou should see it connect, list the two tools, then call both. fetch_url streams
progress lines as it goes:
Calling fetch_url on example.com ...
[progress 0/3] Connecting to URL: https://example.com
[progress 1/3] Downloaded, parsing HTML...
[progress 2/3] Extracting text...
title : Example Domain
status: 200
If you just want to poke a tool without running the server, try_fetch.py calls it
in-process:
.venv/bin/python try_fetch.pyPython 3.12, mcp==2.0.0, httpx2, pydantic v2. Full pin list in
requirements.txt.