web2mcp
Generate an MCP for any web app
claude mcp add --transport stdio neelsomani-web2mcp node dist/dynamicMcpServer.js
How to use
web2mcp is a dynamic MCP server that generates and serves an expressive MCP interface for an existing web application by crawling its UI and inferring the underlying resources and tools. The workflow starts with a development build or a prebuilt server binary, then loads a configuration that describes the MCP-enabled actions for the target app. You can run the server and then interact with it via an MCP inspector or by sending MCP-style calls to execute UI actions that the crawler discovered (e.g., navigation, form submissions, or tool invocations). The tooling supports generating a configuration from a demo app and then loading it into the dynamic server, enabling automated control of the web app through the MCP protocol.
To use it, first build or prepare the server, then start the dynamic MCP server with the appropriate configuration and actions files generated by the crawler. For example, after building the MCP artifacts you can launch the server with: node dist/dynamicMcpServer.js path/to/config.json path/to/actions.json. You can also run the development workflow by starting the demo app, running the crawler to produce outputMcpConfig.json and outputSummaryPageActions.json, and then starting the server with those outputs to expose the generated MCP interface. Finally, you can connect an MCP inspector or any MCP client to explore and exercise the exposed tools and resources.
How to install
Prerequisites:
- Node.js (v18.x recommended) installed on your system
- npm or yarn for package management
- Optional: Python environment if you plan to run the test/demo apps locally (as described in the repository)
Installation steps:
-
Install dependencies and build the MCP components npm install npm run build:mcp
-
If you want to use the demo workflow, install Python dependencies in the test directory as described in the README cd test pip3 install -r requirements.txt
-
Run the demo application (as described in the README) to generate example MCP configurations cd test python3 app.py
-
After the build, start the dynamic MCP server with the produced configuration and actions files node dist/dynamicMcpServer.js path/to/config.json path/to/actions.json
Prerequisites recap:
- A working Node.js/npm environment
- Access to the repository's test/demo app if you want to reproduce the example workflow
- If using the Python demo app, a configured Python environment and dependencies as outlined in the README
Additional notes
Tips and known considerations:
- The dynamic MCP server loads configurations at runtime, so you can swap in new MCP configurations without rebuilding the server binary.
- The README demonstrates using an inspector to interact with the running MCP server: npx @modelcontextprotocol/inspector node dist/dynamicMcpServer.js config.json actions.json
- When using the demo workflow, ensure the SPA crawler and environment variables (SPA_CRAWLER_*) are configured correctly in .env as shown in the README for consistent results.
- If you modify the underlying web app structure, re-run the spaCrawler and re-generate the MCP config and actions to reflect the new capabilities.
- The npm_package field is null because this repository does not publish a standalone npm package for the server; instead, it builds and runs from dist/dynamicMcpServer.js
Related MCP Servers
apify
The Apify MCP server enables your AI agents to extract data from social media, search engines, maps, e-commerce sites, or any other website using thousands of ready-made scrapers, crawlers, and automation tools available on the Apify Store.
mcp
Enable AI agents to work reliably - giving them secure access to structured data, tools to take action, and the context needed to make smart decisions.
sudocode
Lightweight agent orchestration dev tool that lives in your repo
cursor-background-agent-api
Use Cursor Background Agents as an API or MCP Server
cco
Real-time audit and approval system for Claude Code tool calls.
mymcpspace
An MCP server for posting to the MyMCPSpace "bots only" social network