MCP HubMCP Hub
tokenizin-agency

mcp-npx-fetch

by: tokenizin-agency

A powerful MCP server for fetching and transforming web content into various formats (HTML, JSON, Markdown, Plain Text) with ease.

14created 25/12/2024
Visit
web
transformer

πŸ“ŒOverview

Purpose: To provide a powerful MCP server for fetching and transforming web content into various formats such as HTML, JSON, Markdown, and Plain Text with ease.

Overview: MCP NPX Fetch is a server designed to streamline the process of retrieving and converting web content into multiple formats. Its flexibility and compatibility with the Model Context Protocol (MCP) make it an essential tool for developers who need quick access to web data.

Key Features:

  • Universal Content Fetching: Supports fetching data in multiple formats (HTML, JSON, Plain Text, Markdown), enhancing versatility for different use cases.

  • Custom Headers Support: Allows users to include authentication and other custom headers in requests, providing flexibility for various web services.

  • Built-in Transformations: Automatically converts fetched content into the desired format, simplifying the data processing workflow.

  • High Performance: Built using modern JavaScript techniques, ensuring fast response times and efficiency.

  • MCP Compatible: Seamlessly integrates with Claude Desktop and other MCP clients for easy deployment.

  • Type-Safe: Developed in TypeScript, offering full type definitions for improved reliability and development experience.


MCP NPX Fetch

A powerful MCP server for fetching and transforming web content into various formats (HTML, JSON, Markdown, Plain Text) with ease.

Installation β€’ Features β€’ Usage β€’ Documentation β€’ Contributing


πŸš€ Features

  • 🌐 Universal Content Fetching: Supports HTML, JSON, plain text, and Markdown formats
  • πŸ”’ Custom Headers Support: Add authentication and custom headers to your requests
  • πŸ›  Built-in Transformations: Automatic conversion between formats
  • ⚑ High Performance: Built with modern JavaScript features and optimized for speed
  • πŸ”Œ MCP Compatible: Seamlessly integrates with Claude Desktop and other MCP clients
  • 🎯 Type-Safe: Written in TypeScript with full type definitions

πŸ“¦ Installation

NPM Global Installation

npm install -g @tokenizin/mcp-npx-fetch

Direct Usage with NPX

npx @tokenizin/mcp-npx-fetch

πŸ“š Documentation

Available Tools

fetch_html

Fetches and returns raw HTML content from any URL.

{
  url: string;     // Required: Target URL
  headers?: {      // Optional: Custom request headers
    [key: string]: string;
  };
}

fetch_json

Fetches and parses JSON data from any URL.

{
  url: string;     // Required: Target URL
  headers?: {      // Optional: Custom request headers
    [key: string]: string;
  };
}

fetch_txt

Fetches and returns clean plain text content, removing HTML tags and scripts.

{
  url: string;     // Required: Target URL
  headers?: {      // Optional: Custom request headers
    [key: string]: string;
  };
}

fetch_markdown

Fetches content and converts it to well-formatted Markdown.

{
  url: string;     // Required: Target URL
  headers?: {      // Optional: Custom request headers
    [key: string]: string;
  };
}

πŸ”§ Usage

CLI Usage

Start the MCP server directly:

mcp-npx-fetch

Or via npx:

npx @tokenizin/mcp-npx-fetch

Claude Desktop Integration

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%/Claude/claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the following configuration to your mcpServers object:

{
  "mcpServers": {
    "fetch": {
      "command": "npx",
      "args": ["-y", "@tokenizin/mcp-npx-fetch"],
      "env": {}
    }
  }
}

πŸ’» Local Development

  1. Clone the repository:
git clone https://github.com/tokenizin-agency/mcp-npx-fetch.git
cd mcp-npx-fetch
  1. Install dependencies:
npm install
  1. Start development mode:
npm run dev
  1. Run tests:
npm test

πŸ›  Technical Stack

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License.


Made with ❀️ by PT Tokenizin Technology Agency