Fourth Playwright MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "FOURTH_USERNAME=${FOURTH_USERNAME}" -e "FOURTH_PASSWORD=${FOURTH_PASSWORD}" fourth-playwright -- uv run src/server.py
Required:FOURTH_USERNAMEFOURTH_PASSWORD+ 1 optional
README.md

Hybrid Python and Node.js MCP server for Fourth platform automation

Fourth Playwright MCP Server

Remote MCP server combining FastMCP v3 (Python) orchestration with @playwright/mcp (Node.js) browser automation. Designed for deployment to Railway as a Claude.ai Custom Connector.

Architecture

FastMCP v3 (Python) ─── SSE/Streamable HTTP ──→ Claude.ai
       │
       └── subprocess (stdio) ──→ @playwright/mcp (Node.js)
  • FastMCP v3: OAuth 2.1 proxy, Skills system, custom tools, HTTP transport
  • @playwright/mcp: 70+ browser automation tools via stdio subprocess
  • Custom tools: Fourth-specific authentication, navigation, data extraction

Setup

Prerequisites

  • Python 3.11+
  • Node.js 18+
  • uv (Python package manager)

Install

# Python dependencies
uv sync

# Node dependencies (installs @playwright/mcp + Chromium)
npm install

Run locally

uv run python src/server.py
# Server starts on http://localhost:8000
# Health check: curl http://localhost:8000/health
# MCP endpoint: http://localhost:8000/mcp

List tools

uv run fastmcp list src/server.py

Deployment (Railway)

  1. Connect this repo to Railway
  2. Railway auto-detects the Dockerfile
  3. Set environment variables (see .env.example)
  4. Railway sets PORT automatically

Claude.ai Custom Connector

  1. Go to Claude.ai → Settings → Connectors → Add Custom
  2. SSE URL: https://<app>.railway.app/mcp
  3. Configure OAuth with your Client ID/Secret

Custom Fourth Tools

Tool Description
fourth_login Automated login with credentials/SSO
fourth_navigate_module Navigate to Fourth module by name
fourth_extract_table Extract structured data from tables
fourth_extract_report Generate structured report from page
fourth_wait_for_load Smart wait for Fourth SPA
fourth_get_user_context Get current user/permissions/restaurant

Skills

Skills are exposed as MCP resources from the skills/ directory:

  • browser-automation - General browser automation patterns
  • fourth-workflows - Fourth-specific workflow instructions

Environment Variables

See .env.example for all configuration options.

Tools (6)

fourth_loginAutomated login with credentials or SSO
fourth_navigate_moduleNavigate to Fourth module by name
fourth_extract_tableExtract structured data from tables
fourth_extract_reportGenerate structured report from page
fourth_wait_for_loadSmart wait for Fourth SPA
fourth_get_user_contextGet current user, permissions, and restaurant context

Environment Variables

FOURTH_USERNAMErequiredUsername for Fourth platform authentication
FOURTH_PASSWORDrequiredPassword for Fourth platform authentication
PORTPort for the SSE server (set automatically by Railway)

Configuration

claude_desktop_config.json
{"mcpServers": {"fourth-playwright": {"command": "uv", "args": ["run", "src/server.py"], "env": {"FOURTH_USERNAME": "your_user", "FOURTH_PASSWORD": "your_pass"}}}}

Try it

Log in to the Fourth platform and navigate to the inventory module.
Extract the current table data from the labor report page.
Get my current user context and permissions for the restaurant.
Generate a structured report from the current page data.

Frequently Asked Questions

What are the key features of Fourth Playwright MCP Server?

Hybrid architecture combining FastMCP v3 and @playwright/mcp. Automated authentication for Fourth platform SSO and credentials. Smart navigation and data extraction for Fourth SPA interfaces. SSE/Streamable HTTP transport for Claude.ai integration. Exposes browser automation patterns as MCP resources.

What can I use Fourth Playwright MCP Server for?

Automating daily labor report generation from the Fourth platform. Streamlining navigation to specific modules for restaurant managers. Extracting structured inventory or scheduling data for external analysis. Integrating Fourth platform data directly into Claude.ai workflows.

How do I install Fourth Playwright MCP Server?

Install Fourth Playwright MCP Server by running: uv sync && npm install

What MCP clients work with Fourth Playwright MCP Server?

Fourth Playwright MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Fourth Playwright MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare