puremd-mcp

puremd-mcp is a tool for MCP clients that allows for unblocking, scraping, and searching web content in Markdown format. It provides clients with the functionality of pure.md, enabling them to bypass bot detection and render JavaScript, converting HTML, PDFs, images, and more into Markdown. By using puremd-mcp, MCP clients like Cursor, Windsurf, and Claude Desktop can seamlessly fetch and search web content.

GitHub Stars

35

User Rating

Not Rated

Favorites

0

Views

47

Forks

3

Issues

0

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Node.js: 18.0.0以上
npm: 8.0.0以上
+1 more

Installation

Installation

Prerequisites

Node.js: 18.0.0 or higher
npm: 8.0.0 or higher
Claude Desktop: Latest version

Installation Steps

1. Clone Repository

bash
git clone https://github.com/puremd/puremd-mcp.git
cd puremd-mcp

2. Install Dependencies

bash
npm install

3. Configure Claude Desktop

Edit claude_desktop_config.json to add the MCP server:
json
{
  "mcpServers": {
    "pure.md": {
      "command": "npx",
      "args": ["-y", "puremd-mcp"],
      "env": {
        "PUREMD_API_KEY": ""
      }
    }
  }
}

4. Start Server

bash
npm start

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check Node.js version and reinstall dependencies. Issue: Not recognized by Claude Desktop Solution: Verify configuration file path and syntax.

Configuration

Configuration

Basic Configuration

Claude Desktop Setup

Edit ~/.config/claude-desktop/claude_desktop_config.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
json
{
  "mcpServers": {
    "pure.md": {
      "command": "npx",
      "args": ["-y", "puremd-mcp"],
      "env": {
        "PUREMD_API_KEY": ""
      }
    }
  }
}

Environment Variables

Set the following environment variables as needed:
bash
export PUREMD_API_KEY="your-api-key"
export DEBUG="true"

Advanced Configuration

Security Settings

Store API keys in environment variables or secure configuration files
Set appropriate file access permissions
Adjust logging levels

Performance Tuning

Configure timeout values
Limit concurrent executions
Set up caching

Configuration Examples

Basic Configuration

json
{
  "mcpServers": {
    "pure.md": {
      "command": "npx",
      "args": ["-y", "puremd-mcp"],
      "env": {
        "PUREMD_API_KEY": ""
      }
    }
  }
}

Advanced Configuration

json
{
  "mcpServers": {
    "advanced-mcp": {
      "command": "python",
      "args": ["-m", "server"],
      "cwd": "/path/to/server",
      "env": {
        "PYTHONPATH": "/path/to/modules",
        "CONFIG_FILE": "/path/to/config.json"
      }
    }
  }
}

Examples

Examples

Basic Usage

Here are basic usage examples for the MCP server:

Using with Claude Desktop

1Verify MCP Server Startup
Open Claude Desktop and confirm that the configuration has been loaded correctly.
2Execute Basic Commands

   Available tools from this MCP server:
   - unblock-url: Extract markdown from web pages without getting blocked
   - search-web: Search the web for a query and concatenate results into markdown
   

Programmatic Usage

javascript
// JavaScript example (Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');

const client = new MCPClient();
await client.connect();

// Execute tool
const result = await client.callTool('unblock-url', {
  url: 'https://example.com'
});

console.log(result);

Advanced Examples

Automation Script

bash
#!/bin/bash

Batch processing example

for file in *.txt; do mcp-tool process "$file" done

API Integration

python

Python example

import requests import json def call_mcp_tool(tool_name, params): response = requests.post( 'http://localhost:3000/mcp/call', json={ 'tool': tool_name, 'parameters': params } ) return response.json()

Usage example

result = call_mcp_tool('search-web', { 'query': 'latest news' })

Use Cases

Using Cursor to fetch information in Markdown format from a specific web page.
Conducting web searches on a specific topic through Windsurf and compiling results in Markdown.
Utilizing the features of pure.md with a higher rate limit in Claude Desktop by using an API key.
Creating automation scripts to extract data from multiple web pages and generate Markdown files.