mcp fetch
Model Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.
Model Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.
Model Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.
To use this tool with Claude Desktop, simply add the following to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"tools": {
"fetch": {
"command": "npx",
"args": ["-y", "@kazuph/mcp-fetch"]
}
}
}
This will automatically download and run the latest version of the tool when needed.
This accessibility setting is required for automated clipboard operations (Cmd+V) to work properly.
enableFetchImages: true
)The following sections are for those who want to develop or modify the tool.
npm install -g tsx
)git clone https://github.com/kazuph/mcp-fetch.git
cd mcp-fetch
npm install
npm run build
When processing images from web content, the following optimizations are applied:
Make sure Claude Desktop is installed and running.
Install tsx globally if you haven't:
npm install -g tsx
# or
pnpm add -g tsx
Modify your Claude Desktop config located at:
~/Library/Application Support/Claude/claude_desktop_config.json
You can easily find this through the Claude Desktop menu: 1. Open Claude Desktop 2. Click Claude on the Mac menu bar 3. Click "Settings" 4. Click "Developer"
Add the following to your MCP client's configuration:
{
"tools": {
"fetch": {
"args": ["tsx", "/path/to/mcp-fetch/index.ts"]
}
}
}
url
(required): The URL to fetchmaxLength
(default: 20000): Maximum length of content to returnstartIndex
(default: 0): Starting position in contentimageStartIndex
(default: 0): Starting position for image collectionraw
(default: false): Return raw content instead of processed markdownimageMaxCount
(default: 3): Maximum number of images to process per requestimageMaxHeight
(default: 4000): Maximum height of merged imageimageMaxWidth
(default: 1000): Maximum width of merged imageimageQuality
(default: 80): JPEG quality (1-100)enableFetchImages
(default: false): Enable fetching and processing of images. FOR CLAUDE USERS ONLY: YOU ARE ALLOWED TO ENABLE THIS FEATURE!!! CLAUDE CAN FETCH AND PROCESS IMAGES!!! ENJOY THIS CAPABILITY!!!!!ignoreRobotsTxt
(default: false): Ignore robots.txt restrictions{
"url": "https://example.com"
}
{
"url": "https://example.com",
"enableFetchImages": true,
"imageMaxCount": 3
}
{
"url": "https://example.com",
"enableFetchImages": true,
"imageStartIndex": 3,
"imageMaxCount": 3
}
enableFetchImages: false
)disableImages
in favor of enableFetchImages
parameter[
{
"description": "nRetrieves URLs from the Internet and extracts their content as markdown.nImages from the page will be processed and included with the response automatically.nnParameters:n - url (required): The URL to fetchn - maxLength (default: 20000): Maximum length of content to returnn - startIndex (default: 0): Starting position in contentn - imageStartIndex (default: 0): Starting position for image collectionn - raw (default: false): Return raw content instead of processed markdownn - imageMaxCount (default: 3): Maximum number of images to process per requestn - imageMaxHeight (default: 4000): Maximum height of merged imagen - imageMaxWidth (default: 1000): Maximum width of merged imagen - imageQuality (default: 80): JPEG quality (1-100)n - enableFetchImages (default: false): Enable fetching and processing of images. FOR CLAUDE AI ONLY: YOU CAN ENABLE THIS FEATURE!!! CLAUDE IS ALLOWED TO USE IMAGES!!!n - ignoreRobotsTxt (default: false): Ignore robots.txt restrictionsnnImage Processing:n - Multiple images are merged vertically into a single JPEGn - Images are automatically optimized and resizedn - GIF animations are converted to static images (first frame)n - Use imageStartIndex and imageMaxCount to paginate through all imagesn - Response includes remaining image count and current positionnnIMPORTANT: All parameters must be in proper JSON format - use double quotes for keysnand string values, and no quotes for numbers and booleans.nnExamples:n# Initial fetch:n{n "url": "https://example.com",n "maxLength": 10000,n "imageMaxCount": 2n}nn# Fetch next set of images:n{n "url": "https://example.com",n "imageStartIndex": 2,n "imageMaxCount": 2n}",
"inputSchema": {
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"enableFetchImages": {
"default": false,
"type": [
"boolean",
"string"
]
},
"ignoreRobotsTxt": {
"default": false,
"type": [
"boolean",
"string"
]
},
"imageMaxCount": {
"allOf": [
{
"type": [
"number",
"string"
]
},
{
"maximum": 10,
"minimum": 0,
"type": "number"
}
],
"default": 3
},
"imageMaxHeight": {
"allOf": [
{
"type": [
"number",
"string"
]
},
{
"maximum": 10000,
"minimum": 100,
"type": "number"
}
],
"default": 4000
},
"imageMaxWidth": {
"allOf": [
{
"type": [
"number",
"string"
]
},
{
"maximum": 10000,
"minimum": 100,
"type": "number"
}
],
"default": 1000
},
"imageQuality": {
"allOf": [
{
"type": [
"number",
"string"
]
},
{
"maximum": 100,
"minimum": 1,
"type": "number"
}
],
"default": 80
},
"imageStartIndex": {
"allOf": [
{
"type": [
"number",
"string"
]
},
{
"minimum": 0,
"type": "number"
}
],
"default": 0
},
"maxLength": {
"allOf": [
{
"type": [
"number",
"string"
]
},
{
"exclusiveMinimum": 0,
"maximum": 1000000,
"type": "number"
}
],
"default": 20000
},
"raw": {
"default": false,
"type": [
"boolean",
"string"
]
},
"startIndex": {
"allOf": [
{
"type": [
"number",
"string"
]
},
{
"minimum": 0,
"type": "number"
}
],
"default": 0
},
"url": {
"format": "uri",
"type": "string"
}
},
"required": [
"url"
],
"type": "object"
},
"name": "fetch"
}
]