
内容获取
HTTP-SSESTDIO网页内容获取工具,支持多种格式
网页内容获取工具,支持多种格式
This MCP server provides functionality to fetch web content in various formats, including HTML, JSON, plain text, and Markdown.
fetch_html
url
(string, required): URL of the website to fetchheaders
(object, optional): Custom headers to include in the requestmax_length
(number, optional): Maximum length to fetch (default 5000, can change via environment variable)start_index
(number, optional): Used together with max_length to retrieve contents piece by piece, 0 by defaultfetch_json
url
(string, required): URL of the JSON to fetchheaders
(object, optional): Custom headers to include in the requestmax_length
(number, optional): Maximum length to fetch (default 5000, can change via environment variable)start_index
(number, optional): Used together with max_length to retrieve contents piece by piece, 0 by defaultfetch_txt
url
(string, required): URL of the website to fetchheaders
(object, optional): Custom headers to include in the requestmax_length
(number, optional): Maximum length to fetch (default 5000, can change via environment variable)start_index
(number, optional): Used together with max_length to retrieve contents piece by piece, 0 by defaultfetch_markdown
url
(string, required): URL of the website to fetchheaders
(object, optional): Custom headers to include in the requestmax_length
(number, optional): Maximum length to fetch (default 5000, can change via environment variable)start_index
(number, optional): Used together with max_length to retrieve contents piece by piece, 0 by defaultThis server does not provide any persistent resources. It's designed to fetch and transform web content on demand.
npm install
npm run build
To use the server, you can run it directly:
npm start
This will start the Fetch MCP Server running on stdio.
To integrate this server with a desktop app, add the following to your app's server configuration:
{ "mcpServers": { "fetch": { "command": "npx", "args": [ "mcp-fetch-server" ], "env": { "DEFAULT_LIMIT": "50000" // optionally change default limit } } } }
npm run dev
to start the TypeScript compiler in watch modenpm test
to run the test suiteThis project is licensed under the MIT License.