Skip to main content
Glama
defuddle-mcp

defuddle-mcp

by ryanxili
README.md
# defuddle-mcp

[![npm version](https://img.shields.io/npm/v/defuddle-mcp.svg)](https://www.npmjs.com/package/defuddle-mcp)
[![npm downloads](https://img.shields.io/npm/dm/defuddle-mcp.svg)](https://www.npmjs.com/package/defuddle-mcp)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that extracts clean article content from web pages, removing clutter like ads, sidebars, and navigation elements.

## Features

- ๐Ÿงน **Clean Content Extraction** - Removes ads, sidebars, and other distractions
- ๐Ÿ“ **Markdown Output** - Returns content in clean Markdown format with frontmatter
- ๐Ÿš€ **Zero Dependencies** - Built with Node.js built-ins only
- โšก **Fast & Lightweight** - Minimal overhead, quick startup

## Requirements

- Node.js >= 18 (for built-in `fetch` support)

## Installation

### Install from npm

```bash
npm install -g defuddle-mcp
```

### Install from source

```bash
git clone https://github.com/ryanxili/defuddle-mcp.git
cd defuddle-mcp
npm install -g .
```

## Usage

### As a Global CLI Tool

```bash
defuddle-mcp
```

### With MCP Host (e.g., Claude Desktop)

Add to your MCP configuration:

```json
{
  "mcpServers": {
    "defuddle": {
      "command": "npx",
      "args": ["-y", "defuddle-mcp"]
    }
  }
}
```

Or with global install:

```json
{
  "mcpServers": {
    "defuddle": {
      "command": "defuddle-mcp"
    }
  }
}
```

### Programmatically

```bash
node index.js
```

The server runs on stdio and communicates via JSON-RPC 2.0.

## Tool: defuddle

Extract clean article content from a web page.

| Property | Type | Description |
|----------|------|-------------|
| `url` | string | The URL of the web page to extract content from (required) |

### Example Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "defuddle",
    "arguments": {
      "url": "https://example.com/article"
    }
  }
}
```

### Example Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "---\ntitle: Example Article\nsource: https://example.com/article\nlanguage: en\nword_count: 1234\n---\n\n# Article Content\n\n..."
      }
    ]
  }
}
```

## API Reference

### Methods

| Method | Description |
|--------|-------------|
| `initialize` | Initialize the MCP session |
| `tools/list` | List available tools |
| `tools/call` | Call a specific tool |

### Error Codes

| Code | Message | Description |
|------|---------|-------------|
| -32700 | Parse error | Invalid JSON received |
| -32601 | Method not found | Requested method does not exist |

## License

MIT ยฉ [Defuddle](https://github.com/ryanxili/defuddle-mcp)

## Related

- [Model Context Protocol](https://modelcontextprotocol.io/) - MCP specification
- [defuddle.md](https://defuddle.md/) - Content extraction API used by this server

TDQS

A3.6/5.0

Scored across 1 tool

Disambiguation5/5

With only a single tool in the set, there is no possibility of confusion or misselection between tools. The tool's purpose (clean article extraction from a web page) is unambiguous.

Naming Consistency4/5

The lone tool name 'defuddle' is short, lowercase, and readable, matching the server name. There is no verb_noun convention to violate, though a more descriptive name like 'extract_article' would be clearer.

Tool Count3/5

A single non-trivial tool is borderline thin for a server surface; there is no companion operation such as fetching raw HTML or batch extraction. The count is defensible for a narrowly focused utility but feels minimal.

Completeness3/5

The core extraction operation exists, but there are notable gaps: no options for output format (markdown vs. text), metadata/frontmatter retrieval, or batch URL processing. Agents can work around this by calling the tool repeatedly, but the surface is shallow.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues