appsec-innovation-labs
MCP Serverappsec-innovation-labspublic

secure mcp fetch

Simple secured fetch

Repository Info

1
Stars
1
Forks
1
Watchers
0
Issues
Python
Language
MIT License
License

About This Server

Simple secured fetch

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

Secure Fetch

This project implements a secure URL fetching tool using FastMCP.

Prerequisites

  • Python 3.7+
  • uv (Python package installer and environment manager)

Installation

  1. Install uv if you haven't already:
pip install uv
  1. Create a new virtual environment and install dependencies:
uv venv
source .venv/bin/activate
uv pip install fastmcp requests

Usage

  1. Set the allowlist environment variable (optional):
export SECURE_FETCH_ALLOWLIST="example.com,trusted-domain.org"
  1. Run the script:
uv run main.py

Features

  • Fetches URLs securely
  • Resolves domains to IPs
  • Checks for private/internal IPs
  • Handles redirects (up to 3)
  • Supports custom HTTP methods and headers
  • Uses an allowlist for trusted domains/IPs

Security Considerations

  • The tool prevents access to private/internal IPs unless explicitly allowed
  • Only HTTP and HTTPS schemes are permitted
  • SNI is set to match the hostname for HTTPS connections

Example Usage

Once the script is running, you can use the fetch_url function to securely fetch URLs. The function will return a dictionary containing the status code, response body, and content length.

Note

This tool is designed for secure URL fetching. Always review and understand the code before using it in your environment.

Quick Start

1

Clone the repository

git clone https://github.com/appsec-innovation-labs/secure-mcp-fetch
2

Install dependencies

cd secure-mcp-fetch
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerappsec-innovation-labs
Reposecure-mcp-fetch
LanguagePython
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation