Web2mcp logo

Web2mcp

Community
neelsomani

Generate an MCP for any web app

Publisherneelsomani
Repositoryweb2mcp
LanguageTypeScript
Forks
6
Stars
57
Available tools
0
Transport typestdio
LicenseMIT
Links
  • Connect tools to AI workflows

    Web2mcp exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    57 stars and 6 forks from the linked 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.

Use Web2mcp MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Web2mcp is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Web2mcp as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Web2mcp MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "web2mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Web2mcp MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Web2mcp MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Web2mcp to help me with this task?
Web2mcp
Sure. I read it.
Here is what I found using Web2mcp.

Frequently asked questions

What is the Web2mcp MCP server used for?

Web2mcp is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Web2mcp MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Web2mcp with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Web2mcp MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Web2mcp connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Web2mcp MCP to TypingMind?

Web2mcp runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Web2mcp MCP provide in TypingMind?

Web2mcp exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Web2mcp MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Web2mcp requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇