Ave.McpServer.Fetch
MCP server providing web content fetching tools for AI assistants
Ask AI about Ave.McpServer.Fetch
Powered by Claude · Grounded in docs
I know everything about Ave.McpServer.Fetch. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Fetch MCP Server
A web content fetch server implementing the Model Context Protocol (MCP). This server provides functionality to fetch content from URLs and convert HTML to markdown for easy consumption by AI systems.
Overview
The Fetch MCP server is built with .NET Core using the Model Context Protocol C# SDK (github.com/modelcontextprotocol/csharp-sdk). It provides tools for fetching web content and converting it to markdown. The server is designed to be lightweight and can be deployed either directly on a machine or as a Docker container.
Features
- Fetch web content from URLs and convert HTML to markdown
- Support for paginated content retrieval with start index and max length
- Option to get raw HTML content instead of markdown
- Customizable user agent, timeout, and content length settings
- Built on the Model Context Protocol standard
Getting Started
Prerequisites
- .NET 10 (for local development/deployment)
- Docker (for container deployment)
Build Instructions (for development)
If you want to build the project from source:
-
Clone this repository:
git clone https://github.com/yourusername/fetch-mcp-server.git -
Navigate to the project root directory:
cd fetch-mcp-server -
Build the project using:
dotnet build src/fetch.sln -
Run the tests:
dotnet test src/fetch.sln
.NET Tool
The Fetch MCP Server is available as a .NET global tool on NuGet.
Installation
dotnet tool install --global Ave.McpServer.Fetch
Running
ave-mcpserver-fetch
One-shot execution (without permanent installation)
With .NET 10 SDK, you can run the tool without installing it globally using dotnet tool exec:
dotnet tool exec -y ave.mcpserver.fetch
The -y flag accepts prompts automatically. The tool is cached locally but not added to your PATH.
Docker Support
Manual Docker Build
To build the Docker image yourself:
# Navigate to the repository root
cd fetch-mcp-server
# Build the Docker image
docker build -f src/Core.Infrastructure.McpServer/Dockerfile -t fetch-mcp-server:latest src/
# Run the locally built image
docker run -d --name fetch-mcp fetch-mcp-server:latest
MCP Protocol Usage
Client Integration
To connect to the Fetch MCP Server from your applications:
- Use the Model Context Protocol C# SDK or any MCP-compatible client
- Configure your client to connect to the server's endpoint
- Call the available tools described below
Available Tools
fetch_url
Fetches content from a URL and returns it as markdown.
Parameters:
url(required): The URL to fetch content from.maxLength(optional): The maximum length of content to return (default is 5000 characters).startIndex(optional): The index to start from for chunked reading (default is 0).raw(optional): If true, returns the raw HTML content instead of converting to markdown (default is false).ignoreCertificateErrors(optional): If true, ignores SSL certificate errors such as expired or self-signed certificates. If not specified, uses the default setting from configuration (default is false).
Example request:
{
"name": "fetch_url",
"parameters": {
"url": "https://example.com",
"maxLength": 10000,
"startIndex": 0,
"raw": false,
"ignoreCertificateErrors": false
}
}
Example response:
# Example Domain
This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.
[More information...](https://www.iana.org/domains/example)
To paginate through large content, use the startIndex parameter with the value suggested in the truncation message.
Configuration
Server Settings
The Fetch MCP server has several configuration settings that can be customized:
| Setting | Description | Default |
|---|---|---|
UserAgent | User agent string for HTTP requests | "MCPFetchServer/1.0" |
DefaultMaxLength | Default maximum content length in characters | 5000 |
HttpTimeoutSeconds | HTTP request timeout in seconds | 30 |
IgnoreCertificateErrors | If true, ignores SSL certificate errors globally | false |
You can set these settings in two ways:
- appsettings.json file (for local deployment):
{
"MessageFormat": "Server says: {message}",
"UserAgent": "Custom/1.0",
"DefaultMaxLength": 10000,
"HttpTimeoutSeconds": 15
}
- Environment Variables (for containerized deployments):
When using MCP server with Claude, environment variables are passed through the Claude Desktop configuration as shown in the "Configuring Claude Desktop / Claude Code" section below.
Configuring Claude Desktop / Claude Code
Add the server configuration to the mcpServers section in your configuration file.
Using .NET Tool
Requires .NET 10 SDK. This approach automatically downloads the tool on first use and updates to the latest version on subsequent runs.
"fetch": {
"command": "dotnet",
"args": [
"tool",
"exec",
"-y",
"ave.mcpserver.fetch"
],
"env": {
"UserAgent": "Claude/1.0",
"DefaultMaxLength": "10000",
"HttpTimeoutSeconds": "30"
}
}
Using Global Installation
Requires .NET 10 SDK. Install the tool once, then use it directly.
dotnet tool install --global Ave.McpServer.Fetch
"fetch": {
"command": "ave-mcpserver-fetch",
"env": {
"UserAgent": "Claude/1.0",
"DefaultMaxLength": "10000",
"HttpTimeoutSeconds": "30"
}
}
To update: dotnet tool update --global Ave.McpServer.Fetch
Using Docker
Does not require .NET 10 SDK.
"fetch": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "UserAgent=Claude/1.0",
"-e", "DefaultMaxLength=10000",
"-e", "HttpTimeoutSeconds=30",
"aadversteeg/fetch-mcp-server:latest"
]
}
Using Docker with Custom Configuration File
To use a custom configuration file from your host system:
- Create a custom configuration file on your host machine (e.g.,
fetch-appsettings.json):
{
"UserAgent": "Custom/1.0",
"DefaultMaxLength": 10000,
"HttpTimeoutSeconds": 30,
"IgnoreCertificateErrors": false,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning"
}
}
}
- Update the configuration to mount this file:
"fetch": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v", "C:/path/to/fetch-appsettings.json:/app/appsettings.json",
"aadversteeg/fetch-mcp-server:latest"
]
}
Important Notes:
- The configuration file must exist on your host system before starting the container
- You can use any filename on the host (e.g.,
fetch-appsettings.json), but it must be mounted to/app/appsettings.jsoninside the container - Make sure the path is correct for your operating system (Windows uses backslashes or forward slashes, Linux/macOS use forward slashes)
- After changing the configuration file, restart Claude Desktop to apply the changes
License
This project is licensed under the MIT License - see the LICENSE file for details.
