@glutamateapp/fetchts
v1.0.1
Published
Fetch MCP server for retrieving and processing web content with support for HTML to Markdown conversion.
Readme
Fetch MCP Server (TypeScript)
A Model Context Protocol server that provides web content fetching capabilities with Server-Sent Events (SSE) support, written in TypeScript. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.
Features
- Written in TypeScript for better type safety and developer experience
- Uses Cheerio for HTML processing and Turndown for markdown conversion
- Server-Sent Events (SSE) support for real-time content streaming
- Fully compatible with the Model Context Protocol
- Configurable user agent
- Automatic removal of script, style, noscript, iframe, and img tags for cleaner content
Available Endpoints
SSE Endpoint
GET /sse- Establishes an SSE connection for streaming contentPOST /messages- Handles message processing for the SSE connection
The server runs on port 3030 by default.
Installation
Option 1: One-Click Installation via Glutamate App (Recommended)
The easiest way to install and set up the Fetch MCP Server is through the Glutamate app:
- Download and install Glutamate
- Open Glutamate and navigate to the Extensions section
- Find Fetch MCP Server and click "Install"
- The app will automatically configure everything for you and runs locally
Option 2: Manual Setup
If you prefer to set up the Fetch MCP Server manually, you have two options:
Global Installation
npm install -g @glutamateapp/fetchtsOnce installed globally, you can run the server directly:
fetchUsing npx
You can run the server without installation using npx:
npx @glutamateapp/fetchtsFrom Source
- Clone the repository
- Install dependencies:
npm install- Build the project:
npm run build- Start the server:
npm startFor development with hot reload:
npm run devUsage
The server implements the Model Context Protocol's fetch tool with the following parameters:
url(string, required): URL to fetchmaxLength(number, optional): Maximum number of characters to return (default: 5000)startIndex(number, optional): Start content from this character index (default: 0)raw(boolean, optional): Get raw content without markdown conversion (default: false)
Example Response Format
{
"content": [
{
"type": "text",
"text": "Processed content here..."
}
],
"metadata": {
"truncated": true,
"totalLength": 10000
}
}Development
Prerequisites
- Node.js (v14 or higher)
- npm or yarn
Testing
npm testContributing
Contributions are welcome! Please feel free to submit pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
