Описание
MCP Server for web-llm
README
An MCP server that uses Playwright to load and interact with an HTML page containing @mlc-ai/web-llm for local LLM inference.
Features
- Browser-based LLM: Uses @mlc-ai/web-llm running in a Chromium browser instance
- Playwright Integration: Automates browser interactions for seamless LLM operations
- Multiple Tools: Generate text, chat, check status, change models, and take screenshots
- Model Management: Support for various Web-LLM models with dynamic switching
Available Tools
playwright_llm_generate
Generate text using Web-LLM through the browser interface.
Parameters:
prompt(string): The prompt to generate text fromsystemPrompt(string, optional): System prompt to set contextmaxTokens(number, optional): Maximum tokens to generatetemperature(number, optional): Temperature for generation (0-1)model(string, optional): Model to use (will reinitialize if different)
playwright_llm_chat
Start an interactive chat session and return the response.
Parameters:
message(string): Message to send in the chatclearHistory(boolean, optional): Clear chat history before sending
playwright_llm_status
Get the current status of the Web-LLM Playwright interface.
playwright_llm_set_model
Change the current Web-LLM model.
Parameters:
model(string): Model ID to switch to
playwright_llm_screenshot
Take a screenshot of the Web-LLM interface.
Parameters:
path(string, optional): Path to save screenshot
Supported Models
Llama-3.2-1B-Instruct-q4f32_1-MLC(default)Llama-3.2-3B-Instruct-q4f32_1-MLCPhi-3.5-mini-instruct-q4f16_1-MLCgemma-2-2b-it-q4f32_1-MLCMistral-7B-Instruct-v0.3-q4f16_1-MLCQwen2.5-1.5B-Instruct-q4f32_1-MLC
Installation
- Install dependencies:
pnpm install
- Install Playwright browsers:
npx playwright install chromium
Usage
Start the MCP server:
node index.js
Or run the test:
node test.js
Technical Details
The server works by:
- Launching a headless Chromium browser using Playwright
- Loading the
index.htmlfile which contains the Web-LLM interface - Waiting for the Web-LLM model to initialize
- Exposing browser functions through the
window.webllmInterfaceobject - Providing MCP tools that call these browser functions
The HTML interface provides a complete Web-LLM implementation with:
- Model initialization and loading progress
- Chat interface for testing
- JavaScript API for programmatic access
- Error handling and status reporting
Notes
- First run will be slower as it downloads and initializes the LLM model
- The browser runs in headless mode by default
- Screenshots can be taken for debugging the interface
- Model switching requires reinitialization which takes time
- The interface is fully self-contained in the HTML file# project
project
Установка Web Llm
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/ragingwind/web-llm-mcp-serverFAQ
Web Llm MCP бесплатный?
Да, Web Llm MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Web Llm?
Нет, Web Llm работает без API-ключей и переменных окружения.
Web Llm — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Web Llm в Claude Desktop, Claude Code или Cursor?
Открой Web Llm на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Web Llm with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
