Logo vun Web2mcp

Web2mcp

Communautéit
neelsomani

Generate an MCP for any web app

Editeurneelsomani
Repositoryweb2mcp
SproochTypeScript
Forks
6
Stären
57
Disponibel Tools
0
Transporttypstdio
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Web2mcp stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    57 Stären an 6 Forks aus dem verlinkte Repository.

web2mcp

A system that automatically generates expressive Model Context Protocol (MCP) implementations for any web application (SaaS or consumer-facing).

Problem Statement

Design a system that, given any web application (SaaS or consumer-facing), can automatically generate an expressive Model Control Protocol (MCP) implementation.

This is a fairly hard problem for (at least) three reasons:

  • Behavior tree size: Apps have many buttons and pages. We must traverse at least the important subset of these buttons and pages to establish an application's capabilities.

  • Semantic gap: While links/buttons can be easily identified, it's not clear when these links/buttons correspond to a meaningful tool to expose via the MCP. Similarly, what textual information on the page is relevant for read operations?

  • Under-specified hierarchy: We must infer the object hierarchy. What are the "resources" that the MCP should allow agents to act on? Which tools correspond to which resources?

I break the problem into two separate tasks: (1) define the MCP specification and (2) implement the specification.

Installation

Prerequisites

  1. Python Dependencies (for the test application):

    bash
    cd test
    pip3 install -r requirements.txt
  2. Node.js Setup:

    bash
    nvm use 18
    npm install
  3. Environment Variables:

    bash
    cp .env.example .env

    Then edit .env and set the following variables:

    bash
    BROWSERBASE_PROJECT_ID="YOUR_BROWSERBASE_PROJECT_ID"
    BROWSERBASE_API_KEY="YOUR_BROWSERBASE_API_KEY"
    OPENAI_API_KEY="THIS_IS_OPTIONAL_WITH_OPENAI_KEY"
    # SPA Crawler Configuration
    SPA_CRAWLER_URL="http://localhost:8000"
    SPA_CRAWLER_USERNAME="example@example.com"
    SPA_CRAWLER_PASSWORD="password123"
    SPA_CRAWLER_MAX_DEPTH="1"
    SPA_CRAWLER_ENV="LOCAL"

    By default, the SPA_* environment variables work for the demo app.

Getting Started

Example MCP Implementation

You can try a derived MCP for the demo email application:

  1. Run the demo app:

    bash
    cd test
    python3 app.py
  2. In a new terminal in the root directory:

    bash
    npm run build:mcp
    npx @modelcontextprotocol/inspector node dist/dynamicMcpServer.js test/exampleMcpConfig.json test/exampleSummaryPageActions.json
  3. Try the MCP in the launched browser window

Example MCP Derivation

  1. Start the demo app:

    bash
    cd test
    python3 app.py
  2. In the root directory, run the crawler:

    bash
    npx tsx spaCrawler.ts
  3. The resulting output is in outputMcpConfig.json and outputSummaryPageActions.json

  4. Use those with the MCP server:

    bash
    npm run build:mcp
    node dist/dynamicMcpServer.js outputMcpConfig.json outputSummaryPageActions.json

Project Structure

  • spaCrawler.ts - Main crawler that analyzes web applications and generates MCP configurations
  • dynamicMcpServer.ts - Dynamic MCP server implementation
  • sharedUtils.ts - Shared utilities for the project
  • test/ - Demo Flask application for testing
    • app.py - Simple email application demo
    • exampleMcpConfig.json - Example MCP configuration
    • exampleSummaryPageActions.json - Example page action definitions

How It Works

The system works in two phases:

  1. Analysis Phase: The spaCrawler.ts analyzes a web application by:

    • Crawling through pages and identifying interactive elements
    • Inferring the application's object hierarchy
    • Determining which actions correspond to meaningful MCP tools
    • Generating configuration files that define the MCP interface
  2. Execution Phase: The dynamicMcpServer.ts provides:

    • A dynamic MCP server that loads configurations at runtime
    • Tool execution that translates MCP calls into web application actions
    • Real-time interaction with the target web application

Development

Building

bash
npm run build:mcp

Running in Development

bash
npx tsx spaCrawler.ts
npx tsx dynamicMcpServer.ts

Testing with MCP Inspector

bash
npx @modelcontextprotocol/inspector node dist/dynamicMcpServer.js config.json actions.json

License

See LICENSE.txt for details.

Web2mcp MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Web2mcp verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Web2mcp als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Web2mcp an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "web2mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Web2mcp. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Web2mcp.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Web2mcp?
Web2mcp
Jo. Ech hunn et gelies.
Dat hunn ech mat Web2mcp fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Web2mcp benotzt?

Web2mcp ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Web2mcp MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Web2mcp mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Web2mcp MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Web2mcp verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Web2mcp MCP mat TypingMind?

Web2mcp leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Web2mcp MCP an TypingMind zur Verfügung?

Web2mcp stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Web2mcp MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Web2mcp eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇