A Model Context Protocol (MCP) server for fetching web content with recursive exploration capabilities. This server enables LLMs to autonomously explore web pages and documentation to learn about specific topics.
The Docs Fetch MCP Server provides a simple but powerful way for LLMs to retrieve and explore web content. It enables:
This tool is particularly useful when users want an LLM to learn about a specific topic by exploring documentation or web content.
The server exposes a single MCP tool:
fetch_doc_content
Fetches web page content with the ability to explore linked pages up to a specified depth.
Parameters:
url
(string, required): URL of the web page to fetchdepth
(number, optional, default: 1): Maximum depth of directory/link exploration (1-5)Returns:
{
"rootUrl": "https://example.com/docs",
"explorationDepth": 2,
"pagesExplored": 5,
"content": [
{
"url": "https://example.com/docs",
"title": "Documentation",
"content": "Main page content...",
"links": [
{
"url": "https://example.com/docs/topic1",
"text": "Topic 1"
},
...
]
},
...
]
}
git clone https://github.com/wolfyy970/docs-fetch-mcp.git
cd docs-fetch-mcp
npm install
npm run build
{
"mcpServers": {
"docs-fetch": {
"command": "node",
"args": [
"/path/to/docs-fetch-mcp/build/index.js"
],
"env": {
"MCP_TRANSPORT": "pipe"
}
}
}
}
@modelcontextprotocol/sdk
: MCP server SDKpuppeteer
: Headless browser for web page interactionaxios
: HTTP client for making requestsTo run the server in development mode:
npm run dev
MIT