Skip to content

phpmac/fetch_mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fetch MCP Server

English | 中文

This MCP server provides functionality to fetch web content in various formats, including HTML, JSON, plain text, and Markdown.

Tools

  • fetch_html

    • Fetch website content and return as HTML
    • Input parameters:
      • url (string, required): URL of the website to fetch
      • headers (object, optional): Custom headers to include in the request
    • Returns the raw HTML content of the webpage
  • fetch_json

    • Fetch JSON file from URL
    • Input parameters:
      • url (string, required): URL of the JSON to fetch
      • headers (object, optional): Custom headers to include in the request
    • Returns the parsed JSON content
  • fetch_txt

    • Fetch website content and return as plain text (no HTML)
    • Input parameters:
      • url (string, required): URL of the website to fetch
      • headers (object, optional): Custom headers to include in the request
    • Returns the text content of the webpage with HTML tags, scripts, and styles removed
  • fetch_markdown

    • Fetch website content and return as Markdown
    • Input parameters:
      • url (string, required): URL of the website to fetch
      • headers (object, optional): Custom headers to include in the request
    • Returns the webpage content converted to Markdown format

2 Ways to Start

  1. bun
bun i
bun start
  1. docker
docker compose up --build -d

Usage

{
  "mcpServers": {
    "fetch-mcp": {
      "transport": "sse",
      "url": "http://localhost:3000/sse",
      "headers": {
        "Authorization": "Bearer your-token-here",
        "X-Custom-Header": "custom-value"
      },
      "useNodeEventSource": true
    }
  }
}

Resources

This server does not provide any persistent resources. It is designed to fetch and transform web content on demand.

References

About

Fetch MCP Server

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published