MCP Demo
This demo shows a minimal MCP client/server where the server uses Chrome DevTools Protocol (CDP) to fetch the live HTML of a website and answer a question about it.
Example:```powershell
node client/index.js "[https://wandb.ai/site" "What is the main heading on the page?"
Output:```powershell
Response: {
"url": "https://wandb.ai/site",
"question": "What is the main heading on the page?",
"answer": "Weights & Biases: The AI Developer Platform"
}
Requirements
- Node.js 16+
- Chrome or Chromium installed (on Windows adjust path)
Quick start
- Start Chrome with remote debugging enabled (PowerShell):```powershell
& "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="C:\temp\chrome-mcp-profile" --no-first-run
2. Install dependencies and start the server:```powershell
cd mcp_demo
npm install
npm run start-server
- In another terminal run the client to ask a question:
powershell npm run start-client
Files
- server/index.js - MCP server using CDP
- client/index.js - Simple client that posts {url,question}
Notes
- This is a demo and lacks production hardening (no auth, no URL whitelist, no rate-limiting). Be careful when exposing.
