mcpField
M
MCP NPX Fetch

MCP NPX Fetch

Local
github.com/tokenizin-agencyBrowser Automation42Updated 96w ago

About MCP NPX Fetch

MCP NPX Fetch is an MCP server that retrieves web content and converts it into HTML, JSON, Markdown or plain text. It can be run through npx and suits users who want web data available to an AI assistant. Custom request headers are supported for authenticated requests.

Key features

  1. 01Fetches HTML, JSON, plain text and Markdown
  2. 02Supports custom request headers
  3. 03Built-in format conversion
  4. 04Written in TypeScript with type definitions

Use cases

  1. 01Converting web pages to Markdown for an LLM to read
  2. 02Retrieving parsed data from JSON endpoints
  3. 03Fetching web content within Claude Desktop

MCP support

This project is an MCP server that exposes four tools, fetch_html, fetch_json, fetch_txt and fetch_markdown, to MCP clients.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"npx-fetch": {
"command": "npx",
"args": [
"-y",
"@tokenizin/mcp-npx-fetch"
]
}
}
}
Run commandnpx -y @tokenizin/mcp-npx-fetch

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@tokenizin/mcp-npx-fetch

Tools

4

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
urlstringYesURL of the website to fetch
headersobjectNoOptional headers to include in the request

Details

From the project README

MCP NPX Fetch

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

NPX Fetch MCP server


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


Made with ❤️ by PT Tokenizin Technology Agency

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.