WebInteractMCP

Vijay-Nirmal/WebInteractMCP

3.2

If you are the rightful owner of WebInteractMCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

WebIntractMCP is a cutting-edge Model Context Protocol (MCP) server solution that transforms any web application into an MCP server, enabling real-time two-way communication and control over client sessions.

WebInteractMCP Logo WebInteractMCP

Transform any web application into an MCP server with real-time two-way communication

Development Status Version

WebInteractMCP is an innovative MCP (Model Context Protocol) ecosystem that enables any web application to become an MCP server, allowing chatbots and other MCP clients to control client sessions and complete intended actions on behalf of users.

Imagine an LLM-powered chatbot not just talking about actions, but directly performing them on your website for the user in real-time. It allows Large Language Models to use pre-defined tools to control a user's session securely and complete tasks.

šŸ“¢ Check out the preview version available now! This project is in active development. Expect breaking changes in future releases as we evolve toward version 1.0.0

šŸš€ Overview

WebInteractMCP consists of two tightly integrated components that work together to create a seamless MCP experience:

✨ Key Features

  • šŸ”§ Support full MCP Tool protocol - including tool discovery, invocation, and all type of response Text, Image, Audio others
  • šŸ”„ Real-time Communication - Robust bidirectional communication using SignalR which support WebSockets, ServerSentEvents, LongPolling
  • šŸ› ļø Dynamic Tool Registration - Configure tools with simple JSON files
  • šŸŽÆ Session-based Control - Per-user session management for secure isolation
  • 🌐 Framework Agnostic - Works with any JavaScript framework (React, Angular, Vue, etc.)
  • ⚔ Production Ready - Comprehensive error handling and performance optimization
  • šŸ”§ Simple Configuration - Easy setup with JSON-based tool definitions
  • šŸ“¦ Docker Support - Ready-to-use Docker image for easy deployment
  • šŸ“„ Page-specific Tools - Define tools that can interact with specific pages or elements
  • šŸŽØ Visual Feedback - Provides visual feedback for tool execution and user actions

šŸŽ¬ Demo

https://github.com/user-attachments/assets/bf9d15a6-fa4a-40a0-8543-cb0fd92bffac

Click to view the demonstration of WebInteractMCP transforming a web application into an MCP server

šŸ—ļø Architecture

sequenceDiagram
    participant U as šŸ‘¤ User
    participant W as 🌐 Website
    participant C as šŸ“¦ @web-interact-mcp/client
    participant CB as šŸ¤– MCP Client<br/>(ChatBot Server)
    participant MS as šŸ–„ļø WebInteractMCPServer

    %% Styling
    Note over U,MS: WebInteractMCP Communication Flow
    
    rect rgba(135, 206, 235, 0.1)
        Note over U,MS: šŸš€ Session Initialization Phase
        U->>+W: šŸ’¬ Opens chat session
        W->>+C: šŸ”§ Initialize MCP session
        C->>+MS: šŸ”— Establish 2-way connection<br/>(SignalR WebSocket)
        MS-->>-C: āœ… Connection established
        C->>+MS: šŸ› ļø Send tools configuration
        MS-->>-C: šŸ†” Return session ID
        C-->>-W: šŸ“‹ Provide session ID
        W-->>-U: 🟢 Session ready
    end

    rect rgba(144, 238, 144, 0.1)
        Note over U,MS: šŸ“ Task Processing Phase
        U->>+W: āŒØļø Enters task/query
        W->>+CB: šŸ“¤ Send request with session ID
        CB->>+MS: šŸ”Œ Connect & register tools
        MS-->>-CB: šŸ› ļø Return available tools
        CB->>CB: 🧠 LLM processes task<br/>& selects tools
    end
    
    rect rgba(255, 182, 193, 0.1)
        Note over U,MS: ⚔ Tool Execution Phase
        CB->>+MS: šŸŽÆ Invoke tool with parameters
        MS->>+C: šŸ“Ø Forward tool invocation
        C->>+W: šŸ–±ļø Execute actions<br/>(DOM manipulation, clicks)
        W-->>-C: šŸ“Š Return execution result
        C-->>-MS: šŸ“¤ Send tool response
        MS-->>-CB: šŸ“„ Forward response to LLM
        CB->>+W: šŸŽØ Return processed result
        W-->>-U: šŸ“ŗ Display response
    end

šŸš€ Quick Start

1. Install the Client Library

# Install the stable version (Not yet available)
npm install @web-interact-mcp/client

# Or install the latest preview version
npm install @web-interact-mcp/client@preview

2. Configure Your Tools

Create a mcp-tools.json file:

[
  {
    "toolId": "click-button",
    "title": "Click Button",
    "description": "Clicks a specific button on the page",
    "mode": "silent",
    "steps": [
      {
        "targetElement": "#submit-btn",
        "action": { "type": "click", "element": "#submit-btn" }
      }
    ]
  }
]

3. Initialize in Your Web App

import { createWebInteractMCPController } from '@web-interact-mcp/client';

const controller = createWebInteractMCPController();
await controller.loadTools('/mcp-tools.json');
await controller.createSession('http://localhost:8080');

4. Run the MCP Server

# Using Docker (Recommended)
docker run -p 8080:8080 vijaynirmalpon/web-interact-mcp-server:latest

# Or build from source
cd server/WebInteractMCPServer
dotnet run

šŸ“ Project Structure

WebInteractMCP/
ā”œā”€ā”€ lib/web-interact-mcp/           # TypeScript MCP Library
│   ā”œā”€ā”€ src/                       # Source code
│   └── README.md                  # Library documentation
ā”œā”€ā”€ server/WebInteractMCPServer/    # .NET MCP Server
│   ā”œā”€ā”€ Program.cs                 # Server entry point
│   └── README.md                  # Server documentation
ā”œā”€ā”€ sample/                        # Reference implementations
│   └── angular-dotnetnet-semantic-kernel/

šŸŽÆ Use Cases

  • Automated Testing - Control web applications for E2E testing
  • User Onboarding - Create guided tours and tutorials
  • Process Automation - Automate repetitive web-based tasks
  • Accessibility - Provide AI-powered navigation assistance
  • Data Entry - Automate form filling and data collection

šŸ”§ Technology Stack

ComponentTechnologies
Client LibraryTypeScript 5.8+, SignalR, Shepherd.js
MCP Server.NET 9, ASP.NET Core, SignalR
Sample AppAngular 20, Semantic Kernel

āš ļø Development Status

Initial preview version will be published soon. This project is in active development and has not yet reached version 1.0.

  • āœ… Core functionality is working
  • āœ… Production-ready components available
  • šŸš€ Check out the preview version available now
  • āš ļø Breaking changes expected in future releases
  • āš ļø API is subject to change before 1.0 release

Feel free to use it in your projects, but be prepared for potential breaking changes as we approach the initial preview release.

šŸ“– Documentation

  • - Complete TypeScript library documentation
  • - MCP server configuration and deployment

šŸ¤ Contributing

We welcome contributions! Please see our for development standards and workflow.

Development Workflow

# Setup
npm install
cd lib/web-interact-mcp && npm install
cd sample/angular-dotnetnet-semantic-kernel && npm install

# Start development environment with sample app
cd sample/angular-dotnetnet-semantic-kernel
npm run start:server    # Web Interact MCP server
npm run start:client    # .NET client backend sample app
npm run start           # Angular frontend sample app

šŸ“„ License

This project is licensed under the MIT License - see the file for details.

šŸ”— Links


Built with ā¤ļø for the MCP ecosystem