lilFetch

lilFetch

Scrapes webpages and converts them to clean Markdown using browser automation, ideal for creating READMEs, documentation, or processing dynamic web content.

Category
访问服务器

README

UNDER CONSTRUCTION

lilFetch

An MCP (Model Context Protocol) server that scrapes webpages using crawl4ai and Playwright for more robust scraping. Tested on CoPilot in VSCode but may work for others.

Features

  • Enables html and/or text scraping of one or more urls directly in your chat prompt. Use the scraped response in followup queries for market research summarization, context for new file creation, etc.
  • Leverages Playwright and a headless instance of Chromium to load JS heavy sites and web apps where basic #fetch and curl commands fall short.
  • Strong focus on minimal commands and configuration to install and get scraping.

Prerequisites

Before installing, ensure:

  • Node.js 14+: Download from nodejs.org or via Homebrew (brew install node on macOS).
  • Python 3.10+: Auto-detected during setup. Install from python.org or Homebrew (brew install python@3.12 on macOS). If using pyenv, set a 3.10+ version active (pyenv global 3.12.0).
  • First Run Time: Setup downloads ~200MB (Playwright browsers) and takes 1-2 minutes.

Installation

Install globally for use across workspaces, or restrict to local installation if you just want to test in this repo or enhance it further.

Option 1: Global Install

For running npx lilfetch from any directory (portable CLI).

  1. Clone the Repo

    git clone https://github.com/jphdevsf/lilfetch-mcp.git lilfetch-mcp
    cd lilfetch-mcp
    
  2. Install Globally

    npm run global-install
    
    • Sets up Python venv in ~/.lilfetch-venv (user-wide).
  3. Configure in Any VS Code Workspace (add to .vscode/mcp.json or global MCP settings):

    {
      "servers": {
        "lilFetch": {
          "type": "stdio",
          "command": "npx",
          "args": ["lilfetch"]
        }
      }
    }
    
  4. Test It

    • In new terminal window, run npx lilfetch to start MCP server.
    • In VS Code, prompt with something like...
    Use lilFetch to scrape top news headlines from www.cnn.com and write to a markdown file in root of my repo.
    

Option 2: Local Install

For testing/extending in the repo.

  1. Clone the Repo

    git clone https://github.com/jphdevsf/lilfetch-mcp.git lilfetch-mcp
    cd lilfetch-mcp
    
  2. Install Locally

    npm install
    
    • Sets up ./node_modules/lilfetch/ and .bin/lilfetch.
    • Python venv in repo .venv (local to this project).
  3. MCP.json Workspace Configuration Navigate to .vscode/mcp.json (create if missing) and add:

    {
      "servers": {
        "lilFetch": {
          "type": "stdio",
          "command": "node",
          "args": ["bin/lilfetch.js"]
        }
      }
    }
    

    Note: Ensure bin/lilfetch.js is executable: Run chmod +x bin/lilfetch.js in the terminal.

  4. Test It

    • In new terminal window, navigate to this repo and run npm run dev or ./node_modules/.bin/lilfetch.
    • In VS Code, prompt with something like...
    Use lilFetch to scrape top news headlines from www.cnn.com and write to a markdown file in root of my repo.
    

Uninstallation

To fully remove a global installation (including the npm package and Python virtual environment):

Global Uninstall

From the repo directory (or anywhere):

npm run global-uninstall
  • This runs npm uninstall -g lilfetch to remove the global npm package and binary.
  • Followed by rm -rf ~/.lilfetch-venv to delete the user-wide Python venv (including installed deps and Playwright browsers).
  • Warning: The rm -rf command is irreversible. It only affects the .lilfetch-venv directory in your home folder. Back up if needed (unlikely).

Manual Uninstall (Alternative)

  1. Remove npm package:
    npm uninstall -g lilfetch
    
  2. Remove Python venv:
    rm -rf ~/.lilfetch-venv
    
    • On Windows: rmdir /s /q %USERPROFILE%\.lilfetch-venv

Local Uninstall

For local installs (e.g., after npm install):

npm uninstall
rm -rf .venv
  • This removes the local Node modules and repo-specific Python venv.

Verification

  • npm list -g --depth=0 (no lilfetch).
  • which lilfetch (empty).
  • ls ~/.lilfetch-venv (no such file).

For local: rm -rf node_modules .venv and verify no ./.bin/lilfetch.

Development

  • Edit mcp_server.py for Python logic.
  • Update bin/lilfetch.js for wrapper changes.
  • Bump version in package.json, then npm run pack.
  • For global testing: npm install -g . then npx lilfetch.

Troubleshooting

  • Permission Errors (Global Install): See Prerequisites for user-owned NPM setup. Avoid sudo—use the config steps.
  • Python Not Found/Version Error: Ensure Python 3.8+ is in PATH. For pyenv: pyenv install 3.12.0 && pyenv global 3.12.0, then re-run install. Check: python3 --version.
  • Venv/Deps Fail: For local: Delete .venv and re-run npm install. For global: Delete ~/.lilfetch-venv and re-run npm install -g .. Manual fix (local): python3 -m venv .venv && .venv/bin/pip install -r requirements.txt && .venv/bin/python -m playwright install. Manual fix (global): python3 -m venv ~/.lilfetch-venv && ~/.lilfetch-venv/bin/pip install -r requirements.txt && ~/.lilfetch-venv/bin/python -m playwright install.
  • Playwright Browsers Missing: Run python -m playwright install in the venv (or manually as logged).
  • MCP Not Detected in VS Code: Restart VS Code after config; ensure workspace is open correctly.
  • Uninstall:
    • Global: npm uninstall -g lilfetch + rm -rf ~/.lilfetch-venv.
    • Local: rm -rf node_modules package-lock.json .venv.

License: MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选