Website to Markdown MCP Server

by sunzhi-will

Not rated
GitHub

About

Fetches and converts website content to Markdown with AI-powered cleanup, OpenAPI support, and stealth browsing.

Details

Author
sunzhi-will
Categories
Web Scraping

Method 1 Npx Installation Recommended

πŸ’‘Easiest way: No local installation needed!

{ "websites": [ { "name": "your_website", "url": "https://your-website.com", "description": "Your Project Website" }, { "name": "api_docs", "url": "https://api.example.com/openapi.json", "description": "Your API Specification" } ] }
{ "mcpServers": { "website-to-markdown": { "command": "npx", "args": ["-y", "website-to-markdown-mcp"], "disabled": false, "env": { "WEBSITES_CONFIG_PATH": "./my-websites.json" } } } }

- Restart Cursor
- Open Chat and use Agent mode
- Test command:Please list all configured websites

πŸ’‘Best Practice: Use this method for development or customization!

git clone https://github.com/your-username/website-to-markdown-mcp.git cd website-to-markdown-mcp npm install npm run build
{ "mcpServers": { "website-to-markdown": { "command": "cmd", "args": ["/c", "node", "./website-to-markdown-mcp/dist/index.js"], "disabled": false, "env": { "WEBSITES_CONFIG_PATH": "./my-websites.json" } } } }

- πŸ“ Content Summary: AI-generated summary of the main content
- ⏱️ Reading Time: Estimated reading time based on content length
- πŸ”’ Word Count: Accurate word count for both English and Chinese
- 🌍 Language Detection: Automatic language identification
- 🎯 Content Quality Score: Assessment of content relevance

# πŸš€ Example Website Source: https://example.com Website: example_site - Example Website πŸ“Š Reading Time: 5 minutes πŸ”’ Word Count: 1,250 words 🌍 Language: English πŸ“ Summary: This article discusses the latest developments in web technology... --- [Enhanced Markdown content with better formatting...]
{ "websites": [ { "name": "petstore_openapi", "url": "https://petstore3.swagger.io/api/v3/openapi.json", "description": "πŸ• Swagger Petstore OpenAPI 3.0 Spec (Demo)" }, { "name": "petstore_swagger", "url": "https://petstore.swagger.io/v2/swagger.json", "description": "🐱 Swagger Petstore Swagger 2.0 Spec (Demo)" }, { "name": "github_api", "url": "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json", "description": "πŸ™ GitHub REST API OpenAPI Spec" } ] }

- Node.js20.18.1+ (Recommended: v22.15.0 LTS)
- npm10.0.0+ oryarn
- CursorEditor

⚠️Important: Some dependencies require Node.js v20.18.1 or higher. Please update your Node.js version if you encounter engine compatibility warnings.

# Global installation npm install -g website-to-markdown-mcp # Or use directly with npx (recommended) npx website-to-markdown-mcp
# 1. Clone repository git clone https://github.com/your-username/website-to-markdown-mcp.git cd website-to-markdown-mcp # 2. Install dependencies npm install # 3. Build project npm run build
graph TD A[πŸ” Check Environment Variable<br/>WEBSITES_CONFIG_PATH] --> B{File exists?} B -->|Yes| C[βœ… Load External Config File] B -->|No| D[πŸ” Check Environment Variable<br/>WEBSITES_CONFIG] D --> E{Valid JSON?} E -->|Yes| F[βœ… Load Embedded Config] E -->|No| G[πŸ” Check config.json] G --> H{File exists?} H -->|Yes| I[βœ… Load Local Config] H -->|No| J[πŸ”§ Use Default Config]

Method 1 External Configuration File Recommended

πŸ’‘Advantages: Easy to edit, syntax highlighting, version control friendly

# Can be placed anywhere touch my-api-configs.json
{ "websites": [ { "name": "my_docs", "url": "https://docs.example.com", "description": "πŸ“š My Documentation Website" } ] }
{ "env": { "WEBSITES_CONFIG_PATH": "./my-api-configs.json" } }

Fetches and converts website content to Markdown with AI-powered cleanup, OpenAPI support, and stealth browsing.

A powerful Model Context Protocol (MCP) server designed for fetching website content and converting it to Markdown format, making it easier for AI to understand and process website information.

🎯 Method 1: NPX Installation (🌟 Recommended)

πŸ’‘Easiest way: No local installation needed!

{ "websites": [ { "name": "your_website", "url": "https://your-website.com", "description": "Your Project Website" }, { "name": "api_docs", "url": "https://api.example.com/openapi.json", "description": "Your API Specification" } ] }
{ "mcpServers": { "website-to-markdown": { "command": "npx", "args": ["-y", "website-to-markdown-mcp"], "disabled": false, "env": { "WEBSITES_CONFIG_PATH": "./my-websites.json" } } } }

- Restart Cursor
- Open Chat and use Agent mode
- Test command:Please list all configured websites

πŸ’‘Best Practice: Use this method for development or customization!

git clone https://github.com/your-username/website-to-markdown-mcp.git cd website-to-markdown-mcp npm install npm run build
{ "mcpServers": { "website-to-markdown": { "command": "cmd", "args": ["/c", "node", "./website-to-markdown-mcp/dist/index.js"], "disabled": false, "env": { "WEBSITES_CONFIG_PATH": "./my-websites.json" } } } }

- πŸ“ Content Summary: AI-generated summary of the main content
- ⏱️ Reading Time: Estimated reading time based on content length
- πŸ”’ Word Count: Accurate word count for both English and Chinese
- 🌍 Language Detection: Automatic language identification
- 🎯 Content Quality Score: Assessment of content relevance

# πŸš€ Example Website Source: https://example.com Website: example_site - Example Website πŸ“Š Reading Time: 5 minutes πŸ”’ Word Count: 1,250 words 🌍 Language: English πŸ“ Summary: This article discusses the latest developments in web technology... --- [Enhanced Markdown content with better formatting...]
{ "websites": [ { "name": "petstore_openapi", "url": "https://petstore3.swagger.io/api/v3/openapi.json", "description": "πŸ• Swagger Petstore OpenAPI 3.0 Spec (Demo)" }, { "name": "petstore_swagger", "url": "https://petstore.swagger.io/v2/swagger.json", "description": "🐱 Swagger Petstore Swagger 2.0 Spec (Demo)" }, { "name": "github_api", "url": "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json", "description": "πŸ™ GitHub REST API OpenAPI Spec" } ] }

- Node.js20.18.1+ (Recommended: v22.15.0 LTS)
- npm10.0.0+ oryarn
- CursorEditor

⚠️Important: Some dependencies require Node.js v20.18.1 or higher. Please update your Node.js version if you encounter engine compatibility warnings.

# Global installation npm install -g website-to-markdown-mcp # Or use directly with npx (recommended) npx website-to-markdown-mcp
# 1. Clone repository git clone https://github.com/your-username/website-to-markdown-mcp.git cd website-to-markdown-mcp # 2. Install dependencies npm install # 3. Build project npm run build
graph TD A[πŸ” Check Environment Variable<br/>WEBSITES_CONFIG_PATH] --> B{File exists?} B -->|Yes| C[βœ… Load External Config File] B -->|No| D[πŸ” Check Environment Variable<br/>WEBSITES_CONFIG] D --> E{Valid JSON?} E -->|Yes| F[βœ… Load Embedded Config] E -->|No| G[πŸ” Check config.json] G --> H{File exists?} H -->|Yes| I[βœ… Load Local Config] H -->|No| J[πŸ”§ Use Default Config]

πŸ“‹ Method 1: External Configuration File (🌟 Recommended)

πŸ’‘Advantages: Easy to edit, syntax highlighting, version control friendly

# Can be placed anywhere touch my-api-configs.json
{ "websites": [ { "name": "my_docs", "url": "https://docs.example.com", "description": "πŸ“š My Documentation Website" } ] }
{ "env": { "WEBSITES_CONFIG_PATH": "./my-api-configs.json" } }

πŸ“‹ Method 2: Embedded JSON (Backward Compatible)

{ "mcpServers": { "website-to-markdown": { "command": "cmd", "args": ["/c", "node", "./website-to-markdown-mcp/dist/index.js"], "disabled": false, "env": { "WEBSITES_CONFIG": "{\"websites\":[{\"name\":\"example\",\"url\":\"https://example.com\",\"description\":\"Example Website\"}]}" } } } }

Directly editconfig.jsonin the project root directory:

{ "websites": [ { "name": "local_site", "url": "https://local.example.com", "description": "🏠 Local Test Website" } ] }

Each configured website automatically generates corresponding dedicated tools:

- fetch_petstore_openapi- Fetch Petstore OpenAPI 3.0 spec
- fetch_petstore_swagger- Fetch Petstore Swagger 2.0 spec
- fetch_github_api- Fetch GitHub API spec
- fetch_tailwind_css- Fetch Tailwind CSS documentation

🌐 General Website Content with Analytics

# Website Title Source: https://example.com Website: example_site - Example Website πŸ“Š Reading Time: 3 minutes πŸ”’ Word Count: 650 words 🌍 Language: English πŸ“ Summary: This article provides a comprehensive overview of modern web development practices, covering frontend frameworks, backend technologies, and deployment strategies. --- [Enhanced cleaned Markdown content with ads removed and main content extracted...]
# πŸš€ Example API (v2.1.0) Source: https://api.example.com/openapi.json OpenAPI Version: 3.0.3 Validation Status: βœ… Valid πŸ“Š Processing Time: 1.2 seconds πŸ”’ Endpoints: 25 endpoints 🌍 Server Locations: 3 servers --- ## πŸ“‹ API Basic Information - API Name: Example API - Version: 2.1.0 - OpenAPI Version: 3.0.3 - Description: A powerful example API for modern applications ## 🌐 Servers 1. https://api.example.com - 🏒 Production server 2. https://staging-api.example.com - πŸ§ͺ Testing server ## πŸ› οΈ API Endpoints Total of 25 endpoints: ### πŸ‘₯ /users - GET: Get user list - POST: Create new user ### πŸ” /users/{id} - GET: Get specific user - PUT: Update user information - DELETE: Delete user ## 🧩 Components - Schemas: 12 data models - Parameters: 8 reusable parameters - Responses: 15 reusable responses - Security Schemes: 3 security mechanisms
Please fetch the content from https://docs.example.com and convert to markdown
Please use the fetch_petstore_openapi tool to fetch Petstore OpenAPI specification
Please fetch React official documentation content

πŸ“‹Complete Troubleshooting Guide: SeeTROUBLESHOOTING.mdfor detailed solutions to common issues.

Error:npm WARN EBADENGINE Unsupported engine

- Solution: Update Node.js to v20.18.1 or higher
- Download:
Node.js Official Website
- Verify:node --version

Error:Cannot find module './db.json'

- Solution 1: Clear npm cache:npm cache clean --force
- Solution 2: Update Node.js version
- Solution 3: Use local installation instead of npx

Q: Configuration changes not taking effect?

- βœ… Confirm JSON format is correct
- βœ… Restart Cursor
- βœ… Check environment variable names

- πŸ› οΈ UseJSON Validator
- πŸ› οΈ Confirm using double quotes
- πŸ› οΈ Check for extra commas

Detailed logs are output to stderr at startup:

# View debug messages npm run dev 2> debug.log

- πŸš€Smart Retry: Intelligent retry with exponential backoff
- πŸ’ΎRate Limiting: Built-in rate limiting to prevent overload
- 🎯Content Filtering: Remove irrelevant content for faster processing
- 🧹Ad Removal: Automatic ad and popup removal
- πŸ“ŠStealth Mode: Anti-detection browsing capabilities

- πŸ”’ HTTPS websites only (recommended)
- πŸ› οΈ Auto filter malicious scripts
- πŸ“ Limit output content length
- πŸ” Stealth browsing to avoid detection

- ✨AddedEnhanced content processing with AI-powered cleanup
- ✨AddedSmart analytics: word count, reading time, content summary
- ✨AddedLanguage detection and multi-language support
- ✨AddedStealth browser capabilities for anti-detection
- ✨AddedBuilt-in rate limiting and retry mechanisms
- ✨AddedAdvanced content filtering and ad removal
- πŸ”§EnhancedMarkdown processing with more HTML element support
- πŸ“ŠImprovedOutput format with rich metadata
- 🎯FixedVarious technical issues and dependencies

- ✨AddedFull OpenAPI 3.x/Swagger 2.0 support
- ✨AddedJSON/YAML format auto-detection
- ✨AddedProfessional-grade spec validation and reference resolution
- ✨AddedVersion auto-adaptation mechanism
- ✨AddedStructured API documentation summary
- πŸ”§Pre-configuredMultiple OpenAPI/Swagger examples
- πŸ“¦AddedNPM package distribution with npx support
- 🎯EnhancedInstallation methods for better user experience

- πŸŽ‰Initial Release
- 🌐Basic FunctionsWebsite content fetching
- πŸ“Core FunctionsMarkdown conversion
- βš™οΈConfiguration SupportMulti-website management
- 🍴 Forkthis project
- 🌟 Createfeature branch (git checkout -b feature/AmazingFeature)
- πŸ“ Commitchanges (git commit -m 'Add some AmazingFeature')
- πŸ“€ Pushto branch (git push origin feature/AmazingFeature)
- πŸ”„ OpenPull Request

Report issues on theIssuespage, please include:

- πŸ”Issue Description
- πŸ”„Reproduction Steps
- πŸ’»Environment Information
- πŸ“ΈScreenshots or Logs

This project is licensed under the MIT License - see theLICENSEfile for details.

🌟 If this project helps you, please give it a Star!

πŸ’¬ Have questions or suggestions? Feel free to open an Issue!

Made by Sun❀️for the Developer Community

Enable AI agents to get structured data from unstructured web with AgentQL.

Web scraping, crawling, and change detection with AI

Official Apify MCP server for AI agents to run Actors, extract website data, and automate web scraping and crawling workflows.

1GB Free Trial, World's Leading Proxy Service Platform, Efficient Data Collection

Discover, extract, and interact with the web - one interface powering automated access across the public internet.

Automate browser interactions in the cloud (e.g. web navigation, data extraction, form filling, and more)

Easy web data access. Simplified retrieval of information from websites and online sources.

Adds powerful web scraping and search capabilities to LLM clients like Cursor and Claude.

Real-time web data, structured for agents

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.