Name | mcp-server-fetch JSON |
Version |
0.6.1
JSON |
| download |
home_page | None |
Summary | A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs |
upload_time | 2024-11-29 18:08:29 |
maintainer | None |
docs_url | None |
author | Anthropic, PBC. |
requires_python | >=3.10 |
license | MIT |
keywords |
automation
http
llm
mcp
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Fetch MCP Server
A Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.
The fetch tool will truncate the response, but by using the `start_index` argument, you can specify where to start the content extraction. This lets models read a webpage in chunks, until they find the information they need.
### Available Tools
- `fetch` - Fetches a URL from the internet and extracts its contents as markdown.
- `url` (string, required): URL to fetch
- `max_length` (integer, optional): Maximum number of characters to return (default: 5000)
- `start_index` (integer, optional): Start content from this character index (default: 0)
- `raw` (boolean, optional): Get raw content without markdown conversion (default: false)
### Prompts
- **fetch**
- Fetch a URL and extract its contents as markdown
- Arguments:
- `url` (string, required): URL to fetch
## Installation
Optionally: Install node.js, this will cause the fetch server to use a different HTML simplifier that is more robust.
### Using uv (recommended)
When using [`uv`](https://docs.astral.sh/uv/) no specific installation is needed. We will
use [`uvx`](https://docs.astral.sh/uv/guides/tools/) to directly run *mcp-server-fetch*.
### Using PIP
Alternatively you can install `mcp-server-fetch` via pip:
```
pip install mcp-server-fetch
```
After installation, you can run it as a script using:
```
python -m mcp_server_fetch
```
## Configuration
### Configure for Claude.app
Add to your Claude settings:
<details>
<summary>Using uvx</summary>
```json
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
}
```
</details>
<details>
<summary>Using pip installation</summary>
```json
"mcpServers": {
"fetch": {
"command": "python",
"args": ["-m", "mcp_server_fetch"]
}
}
```
</details>
### Customization - robots.txt
By default, the server will obey a websites robots.txt file if the request came from the model (via a tool), but not if
the request was user initiated (via a prompt). This can be disabled by adding the argument `--ignore-robots-txt` to the
`args` list in the configuration.
### Customization - User-agent
By default, depending on if the request came from the model (via a tool), or was user initiated (via a prompt), the
server will use either the user-agent
```
ModelContextProtocol/1.0 (Autonomous; +https://github.com/modelcontextprotocol/servers)
```
or
```
ModelContextProtocol/1.0 (User-Specified; +https://github.com/modelcontextprotocol/servers)
```
This can be customized by adding the argument `--user-agent=YourUserAgent` to the `args` list in the configuration.
## Debugging
You can use the MCP inspector to debug the server. For uvx installations:
```
npx @modelcontextprotocol/inspector uvx mcp-server-fetch
```
Or if you've installed the package in a specific directory or are developing on it:
```
cd path/to/servers/src/fetch
npx @modelcontextprotocol/inspector uv run mcp-server-fetch
```
## Contributing
We encourage contributions to help expand and improve mcp-server-fetch. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.
For examples of other MCP servers and implementation patterns, see:
https://github.com/modelcontextprotocol/servers
Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mcp-server-fetch even more powerful and useful.
## License
mcp-server-fetch is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Raw data
{
"_id": null,
"home_page": null,
"name": "mcp-server-fetch",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Jack Adamson <jadamson@anthropic.com>",
"keywords": "automation, http, llm, mcp",
"author": "Anthropic, PBC.",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/66/f7/3adaed57b7e01cba2e47e36be120856381d997155bf00b9fba32032cffd2/mcp_server_fetch-0.6.1.tar.gz",
"platform": null,
"description": "# Fetch MCP Server\n\nA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.\n\nThe fetch tool will truncate the response, but by using the `start_index` argument, you can specify where to start the content extraction. This lets models read a webpage in chunks, until they find the information they need.\n\n### Available Tools\n\n- `fetch` - Fetches a URL from the internet and extracts its contents as markdown.\n - `url` (string, required): URL to fetch\n - `max_length` (integer, optional): Maximum number of characters to return (default: 5000)\n - `start_index` (integer, optional): Start content from this character index (default: 0)\n - `raw` (boolean, optional): Get raw content without markdown conversion (default: false)\n\n### Prompts\n\n- **fetch**\n - Fetch a URL and extract its contents as markdown\n - Arguments:\n - `url` (string, required): URL to fetch\n\n## Installation\n\nOptionally: Install node.js, this will cause the fetch server to use a different HTML simplifier that is more robust.\n\n### Using uv (recommended)\n\nWhen using [`uv`](https://docs.astral.sh/uv/) no specific installation is needed. We will\nuse [`uvx`](https://docs.astral.sh/uv/guides/tools/) to directly run *mcp-server-fetch*.\n\n### Using PIP\n\nAlternatively you can install `mcp-server-fetch` via pip:\n\n```\npip install mcp-server-fetch\n```\n\nAfter installation, you can run it as a script using:\n\n```\npython -m mcp_server_fetch\n```\n\n## Configuration\n\n### Configure for Claude.app\n\nAdd to your Claude settings:\n\n<details>\n<summary>Using uvx</summary>\n\n```json\n\"mcpServers\": {\n \"fetch\": {\n \"command\": \"uvx\",\n \"args\": [\"mcp-server-fetch\"]\n }\n}\n```\n</details>\n\n<details>\n<summary>Using pip installation</summary>\n\n```json\n\"mcpServers\": {\n \"fetch\": {\n \"command\": \"python\",\n \"args\": [\"-m\", \"mcp_server_fetch\"]\n }\n}\n```\n</details>\n\n### Customization - robots.txt\n\nBy default, the server will obey a websites robots.txt file if the request came from the model (via a tool), but not if\nthe request was user initiated (via a prompt). This can be disabled by adding the argument `--ignore-robots-txt` to the\n`args` list in the configuration.\n\n### Customization - User-agent\n\nBy default, depending on if the request came from the model (via a tool), or was user initiated (via a prompt), the\nserver will use either the user-agent\n```\nModelContextProtocol/1.0 (Autonomous; +https://github.com/modelcontextprotocol/servers)\n```\nor\n```\nModelContextProtocol/1.0 (User-Specified; +https://github.com/modelcontextprotocol/servers)\n```\n\nThis can be customized by adding the argument `--user-agent=YourUserAgent` to the `args` list in the configuration.\n\n## Debugging\n\nYou can use the MCP inspector to debug the server. For uvx installations:\n\n```\nnpx @modelcontextprotocol/inspector uvx mcp-server-fetch\n```\n\nOr if you've installed the package in a specific directory or are developing on it:\n\n```\ncd path/to/servers/src/fetch\nnpx @modelcontextprotocol/inspector uv run mcp-server-fetch\n```\n\n## Contributing\n\nWe encourage contributions to help expand and improve mcp-server-fetch. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.\n\nFor examples of other MCP servers and implementation patterns, see:\nhttps://github.com/modelcontextprotocol/servers\n\nPull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mcp-server-fetch even more powerful and useful.\n\n## License\n\nmcp-server-fetch is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs",
"version": "0.6.1",
"project_urls": null,
"split_keywords": [
"automation",
" http",
" llm",
" mcp"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a0d9f5459f679c91548d28bf553f54e2509213fc4b7fb682c34d9a8c9885e823",
"md5": "c1940248ad3e799b67919f134ad8686e",
"sha256": "9db3cbb9bd4db93569d586d4d426e43abf37b47519a99340d836c1863b52e06d"
},
"downloads": -1,
"filename": "mcp_server_fetch-0.6.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c1940248ad3e799b67919f134ad8686e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 7722,
"upload_time": "2024-11-29T18:08:11",
"upload_time_iso_8601": "2024-11-29T18:08:11.111010Z",
"url": "https://files.pythonhosted.org/packages/a0/d9/f5459f679c91548d28bf553f54e2509213fc4b7fb682c34d9a8c9885e823/mcp_server_fetch-0.6.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "66f73adaed57b7e01cba2e47e36be120856381d997155bf00b9fba32032cffd2",
"md5": "72ef474ed5aa39bba92c476a83938fbe",
"sha256": "8bcdb8a120e7bbd63b0d1270700eeb103b0e391a2029cd28850abdc6c4a4e5dc"
},
"downloads": -1,
"filename": "mcp_server_fetch-0.6.1.tar.gz",
"has_sig": false,
"md5_digest": "72ef474ed5aa39bba92c476a83938fbe",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 42735,
"upload_time": "2024-11-29T18:08:29",
"upload_time_iso_8601": "2024-11-29T18:08:29.576428Z",
"url": "https://files.pythonhosted.org/packages/66/f7/3adaed57b7e01cba2e47e36be120856381d997155bf00b9fba32032cffd2/mcp_server_fetch-0.6.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-29 18:08:29",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mcp-server-fetch"
}