Logo van Web2mcp

Web2mcp

Community
neelsomani

Generate an MCP for any web app

Uitgeverneelsomani
Repositoryweb2mcp
TaalTypeScript
Forks
6
Sterren
57
Beschikbare tools
0
Transporttypestdio
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    Web2mcp biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    57 sterren en 6 forks in de gekoppelde 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.

Gebruik Web2mcp MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Web2mcp is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Web2mcp toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Web2mcp.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "web2mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Web2mcp in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Web2mcp in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Web2mcp gebruiken om me hiermee te helpen?
Web2mcp
Zeker. Ik heb het gelezen.
Dit vond ik met Web2mcp.

Veelgestelde vragen

Waarvoor wordt de MCP-server Web2mcp gebruikt?

Web2mcp is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Web2mcp MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Web2mcp gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Web2mcp MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Web2mcp verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Web2mcp MCP met TypingMind?

Web2mcp werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt Web2mcp MCP in TypingMind?

Web2mcp biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Web2mcp MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Web2mcp authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇