url-context-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@url-context-mcp fetch https://example.com as markdown"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
url-context-mcp
An MCP (Model Context Protocol) server that fetches web pages and extracts clean, AI-usable context from them. Runs over stdio transport.
It's designed for AI agents that need to:
Read a web page as clean markdown (no boilerplate, no nav/footer noise)
Discover links on a page (with filters) before deciding what to fetch next
Search pages for specific text/code without reading the whole thing
Do all of the above in a single call
Tools
Tool | What it does |
| Fetch a URL → readable article as markdown (or |
| Get all links from a URL or raw HTML. Optional regex |
| Regex search a URL's content; returns matches with surrounding context. |
| One-shot combo: returns content and links and search matches in a single call. The most token-efficient way to understand + navigate a page. |
| Fetch an image by URL (absolute or relative to a base page) and return it as base64 image content the model can see. Resolves relative URLs from page extraction (e.g. |
All tools accept either a url (server fetches it) or raw html (you provide the markup), so they're composable with other fetchers too.
Related MCP server: mult-fetch-mcp-server
Installation (copy-paste into your MCP client config)
{
"mcpServers": {
"url-context": {
"command": "npx",
"args": ["-y", "url-context-mcp"]
}
}
}That's it. npx -y downloads and runs the server on first use; no separate install step needed. Requires Node.js 18+.
Why it's the best design for an AI agent
Readability-first: defaults to Mozilla Readability extraction so the agent gets the article, not the chrome. Reduces tokens and irrelevance.
One-call combo:
fetch_and_searchreturns content + links + matches together — fewer round trips when an agent wants to "understand this page and find X on it".Link discovery before prefetch:
extract_linkslets an agent survey a page's destinations and pick the right one to fetch, instead of guessing or fetching everything.Regex search with context: agents can locate an error string, an API endpoint, a version number, etc. on a page with bounded context windows.
No browser, no head: pure HTTP + jsdom. Fast, sandboxed, works anywhere Node runs. No Playwright/Chromium dependency bloat.
Sane defaults + truncation:
maxChars,limit,maxMatcheskeep responses bounded so context windows don't blow up.
Local development
npm install
node index.js # run the stdio server
npm pack # build the publishable tarballChangelog
1.3.0
fetch_image: optional compression. Oversized images can now be shrunk to fit withinmaxSizeKBinstead of being rejected. Setcompress=true(default false) and the image is resized tocompressMaxWidth×compressMaxHeight(defaults 1024×768, aspect preserved) and re-encoded as JPEG (or PNG when the source has an alpha channel or is animated), loweringcompressQuality(1–100, default 75) in steps of 10 until under the limit. Supports tuning viacompressQuality,compressMaxWidth,compressMaxHeight.fetch_image: hardened DoS guards. The response body is streamed with a hard byte cap (applied regardless ofcompress), so chunked/ lying-header/infinite bodies can't OOM the server. Image decoding runs withfailOn: "error", an explicitlimitInputPixels(≈26 MP) and rejects via a pre-decode dimension check, blocking decompression bombs. The compression encode loop is bounded by iteration count (6) and a 15 s deadline.Server version bumps to 1.3; user-agent string updated accordingly.
1.2.0
New tool:
fetch_image. Resolves an image URL (absolute, or relative to abaseUrl) and returns it as an MCPimagecontent block (base64 with amimeTypederived from the response Content-Type header, falling back to the URL extension). Lets the model actually see images found in pages marked up in markdown. OptionalmaxSizeKB(default 512 KB) protects the context window from oversized payloads. MIME fallback map covers png/jpg/jpeg/gif/webp/svg/bmp/avif/ico.Server version bumps to 1.2; user-agent string updated accordingly.
1.1.0
Preserve dropped headings in extracted content. Mozilla Readability strips the page
<h1>/title from itscontenton minimal pages (e.g.example.com: the# Example Domainheading was never returned byfetch_url, andsearch_contenttherefore couldn't find "Example Domain"). We now detect headings present in the raw body but missing from Readability's cleaned HTML and re-prepend them, so the page title is always part of the returned markdown/text and is searchable.search_contentraw-HTML fallback. When a search of the converted (markdown/text) content finds zero matches and raw HTML is available, the tool re-runs the search against the stripped raw text as a safety net. The result flag notes when the fallback path was used ((raw-HTML fallback)in the header).Misc: user-agent string bumped to
1.1.
License
MIT
Available Tools
5 toolsextract_linksA
Extract all hyperlinks from a URL (or raw HTML). Returns array of {href, text, title, section, isExternal, hash, type} grouped to dedupe. Great for discovering pages/anchors before fetching them.
Inputs: url, html, limit, filter, +2 more.
fetch_and_searchA
One-shot combo: fetch a URL and simultaneously return BOTH the cleaned content AND its links AND any matching search snippets. Most efficient when you want to understand a page and also navigate/search it. Omit pattern/links as needed.
Inputs: url (required), format, pattern, maxChars, +5 more.
fetch_imageA
Fetch an image from a URL (absolute or relative to a base page) and return it as base64 image content that the model can see. Use when a page's markdown contains relative image URLs (e.g.
) and you need to view the image. Optional compression can shrink oversized images to fit within maxSizeKB.
Inputs: url (required), baseUrl, compress, maxSizeKB, +3 more.
fetch_urlA
Fetch a URL and return its main readable content as clean markdown by default (Readability extraction). Options: format=markdown|text|html|readable, includeLinks=false to strip hyperlinks, maxChars to truncate. Useful for reading a web page, understanding a code/docs page, or getting article content without boilerplate.
Inputs: url (required), format, maxChars, includeLinks.
search_contentA
Search the content of a URL (or raw HTML) and return matching snippet(s) with surrounding context and line numbers. Useful to find specific text/code/errors on a page without reading the whole thing.
Inputs: pattern (required), url, html, format, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct output (content, links, search snippets, combined result, or image). The combo tool fetch_and_search is explicitly labeled as a one-shot convenience, so there is no ambiguity about when to use it.
All tools use snake_case and start with a verb (fetch, extract, search). The only deviation is fetch_and_search, which uses a compound verb phrase rather than a strict verb_noun pattern, but it is still readable and consistent in style.
Five tools is a well-scoped size for a URL context server. Each tool covers a distinct need without unnecessary overlap or bloat.
The set covers the core operations of fetching content, extracting links, searching within pages, retrieving images, and a combined mode. No obvious missing functionality for the stated purpose.
Maintenance
Related MCP Connectors
One MCP server for all web data. Scrape, search, crawl, and AI research in one install.
Web search API and MCP server for developers building AI agents.
Turn any public website into an MCP server for agents to search, read and navigate.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that fetches web pages and extracts clean, AI-friendly Markdown content using Mozilla Readability. It provides secure web access for LLMs with built-in SSRF protection and automated content cleaning for improved context retrieval and summarization.198 npmMIT
- AlicenseAqualityBmaintenanceAn MCP server that enables AI assistants to fetch web content in multiple formats (HTML, JSON, text, Markdown) with intelligent content extraction, chunk management, and browser automation support.6152 npm15MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI tools a reliable way to fetch content from the web, handling anti-bot protection and JavaScript-rendered pages.1,986 npmMIT
- FlicenseNot gradedqualityDmaintenanceMCP server that enables AI agents to search the web and extract clean Markdown content, with support for JavaScript rendering, structured data extraction, and screenshots.2-