MCP NPX Fetch

by tokenizin-agency

14 stars
653 downloads
Not rated
GitHub

About

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

Details

Author
tokenizin-agency
Repository
tokenizin-agency/mcp-npx-fetch
GitHub stars
14
Downloads
653
License
MIT License
Categories
Web Scraping, Developer Tools, Automation

- 🌐 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

Setting up with Highlight

Follow these steps to add this server as a custom Highlight plugin:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP NPX Fetch
    Command (node, npx, python, etc.) npx
    Arguments
    • Argument 1 -y
    • Argument 2 @tokenizin/mcp-npx-fetch

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

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

npx @tokenizin/mcp-npx-fetch

Start the MCP server directly:

mcp-npx-fetch

Or via npx:

npx @tokenizin/mcp-npx-fetch

fetch_html

Fetches and returns raw HTML content from any URL. Parameters: url (string, required), headers (optional object with custom request headers)

fetch_json

Fetches and parses JSON data from any URL. Parameters: url (string, required), headers (optional object with custom request headers)

fetch_txt

Fetches and returns clean plain text content, removing HTML tags and scripts. Parameters: url (string, required), headers (optional object with custom request headers)

fetch_markdown

Fetches content and converts it to well-formatted Markdown. Parameters: url (string, required), headers (optional object with custom request headers)

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;
  };
}

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

Linux

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

Macos

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

Windows

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

MCP NPX Fetch

<div align="center">

npm version
License: MIT
TypeScript
Model Context Protocol

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

</div>

<a href="https://glama.ai/mcp/servers/m2a0ue08n2">NPX Fetch MCP server</a>

---

πŸš€ 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

2. Install dependencies:

npm install

3. Start development mode:

npm run dev

4. Run tests:

npm test

πŸ›  Technical Stack

- Model Context Protocol SDK - Core MCP functionality
- JSDOM - HTML parsing and manipulation
- Turndown - HTML to Markdown conversion
- TypeScript - Type safety and modern JavaScript features
- Zod - Runtime type validation

🀝 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 - see the LICENSE file for details.

---

<div align="center">
Made with ❀️ by <a href="https://github.com/tokenizin-agency">PT Tokenizin Technology Agency</a>
</div>

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.