The Docs Fetch MCP Server enables large language models to retrieve and explore web content autonomously. This specialized server can fetch clean web content, recursively explore linked pages, and provide comprehensive information about specific topics by traversing documentation.
Clone the repository:
git clone https://github.com/wolfyy970/docs-fetch-mcp.git
cd docs-fetch-mcp
Install dependencies:
npm install
Build the project:
npm run build
To use the MCP server with Claude, add the following configuration to your Claude Client settings:
{
"mcpServers": {
"docs-fetch": {
"command": "node",
"args": [
"/path/to/docs-fetch-mcp/build/index.js"
],
"env": {
"MCP_TRANSPORT": "pipe"
}
}
}
}
Be sure to replace /path/to/docs-fetch-mcp
with the actual path where you cloned the repository.
The server provides a single MCP tool called fetch_doc_content
that retrieves web content with recursive exploration capabilities.
url
(string, required): The URL of the web page you want to fetchdepth
(number, optional): Controls how deep the server should explore linked pages
When invoking the tool through an MCP-enabled Claude model, use the following format:
I need to learn about [topic]. Please use fetch_doc_content to explore the documentation at [url].
The server returns a structured JSON response with the following information:
{
"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"
}
]
}
]
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "docs-fetch" '{"command":"node","args":["/path/to/docs-fetch-mcp/build/index.js"],"env":{"MCP_TRANSPORT":"pipe"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"docs-fetch": {
"command": "node",
"args": [
"/path/to/docs-fetch-mcp/build/index.js"
],
"env": {
"MCP_TRANSPORT": "pipe"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"docs-fetch": {
"command": "node",
"args": [
"/path/to/docs-fetch-mcp/build/index.js"
],
"env": {
"MCP_TRANSPORT": "pipe"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect