Digital Invoice Web MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
digital-invoice-web — Independent Web-MCP Server
A standalone, multi-tenant Model Context Protocol (MCP) server that automates UI-only operations on Digital Invoicing Software using Playwright browser automation, FastAPI, and Central Auth token verification.
1. Architectural Highlights
Zero Coupling: Operates completely independently from any backend invoicing API servers. No shared databases, imports, or session states.
Strict Multi-Tenancy: Every tool call resolves the calling tenant strictly from the Central Auth JWT
tenant_idclaim. Browser contexts, cookies, and credentials are completely isolated per tenant.Session Caching: Playwright
storage_state(cookies and localStorage) is encrypted at rest in Supabase (AES-256-GCM), reusing authenticated sessions to eliminate repetitive logins while falling back cleanly to UI login on session expiration.Concurrency & Resource Protection: Limits active concurrent browser contexts via an asyncio semaphore to protect VPS RAM and CPU.
Related MCP server: browser-smoke
2. Registering Audience with Central Auth
This server sits behind the Central Auth server and verifies incoming JWT tokens using the official drop-in McpAuthMiddleware.
Open your Central Auth Server Admin Console (or API).
Register a new MCP Server:
Server Name:
Digital Invoice Web MCPAudience:
digital-invoice-web(must matchMCP_AUTH_AUDIENCEin your.env)Server URL:
https://web-mcp.<your-domain>/sse(or Streamable HTTP/mcp)Required Token Claims: Ensure
tenant_idis included in token payloads.
Keep the audience distinct from any other server (e.g.
digital-invoice-api) to prevent cross-token usage.
3. Required Environment Variables
Copy .env.sample to .env and fill in every blank value before running — the server will refuse to start otherwise.
(Reference illustrative values can be inspected in .env.example).
Security-critical settings have no silent defaults; the server will fail fast at startup if any of these are missing, empty, or using placeholder values:
MCP_AUTH_AUDIENCE— Must match exact audience registered in Central Auth.SUPABASE_URL— Supabase project API URL.SUPABASE_SERVICE_ROLE_KEY— Supabase backend service role key.ENCRYPTION_MASTER_KEY— 32-byte AES key generated viapython scripts/generate_master_key.py.
Template (.env.sample):
# Server & Port
HOST=0.0.0.0
PORT=8000
LOG_LEVEL=INFO
# Central Auth (JWKS)
JWKS_URI=https://t91cvjn5boilhilaixggt5y9.s0226.digitalsofts.com/.well-known/jwks.json
MCP_AUTH_AUDIENCE=digital-invoice-web
REVOCATIONS_URI=https://t91cvjn5boilhilaixggt5y9.s0226.digitalsofts.com/revocations
# Supabase (Database & RLS)
SUPABASE_URL=https://your-project.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key
# Cryptography (AES-256-GCM)
# Generate with: python scripts/generate_master_key.py
ENCRYPTION_MASTER_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
CURRENT_KEY_VERSION=1
# Playwright Browser Automation
PORTAL_BASE_URL=https://www.digitalinvoicingsoftware.com
HEADLESS=true
MAX_CONCURRENT_BROWSERS=3
NAVIGATION_TIMEOUT_MS=20000
ACTION_TIMEOUT_MS=15000
SESSION_TTL_HOURS=244. Supabase Database Setup
Run the SQL migration in your Supabase SQL Editor:
This script provisions:
tenants: Registered organizations and active kill-switch status.tenant_credentials: AES-256-GCM encrypted portal login credentials.tenant_sessions: Encrypted Playwrightstorage_statecaching.tool_call_logs: Execution audit and diagnostic error logging.Row-Level Security (RLS) policies on all tables.
5. Onboarding a New Tenant's Credentials
Option A: Self-Service Web UI (Recommended)
New users can onboard directly through the self-service web interface without needing terminal access or manual tenant UUID handling:
Navigate to
https://<deployed-domain>/onboarding(e.g.http://localhost:8000/onboarding).Step 1 — Central Auth Authentication: Click "Sign in with Central Auth" (or enter a valid token). The server verifies your token and cryptographically resolves your
tenant_idfrom claims. Manual tenant entry is prohibited to prevent tenant spoofing.Step 2 — Credential Configuration & Test: Enter your Company Name, Portal Email, and Password (masked input,
autocomplete="new-password"). Credentials are encrypted with AES-256-GCM. Click "Test Connection" to trigger an instant headless browser login check.Step 3 & 4 — LLM Client Connect: Copy the MCP endpoint (
https://<deployed-domain>/mcp), note that no API key is required (uses OAuth 2.1), and follow the step-by-step guides for Claude, Claude Code, ChatGPT, Cursor, and Antigravity.
Note: All onboarding pages include <meta name="robots" content="noindex, nofollow"> to prevent search engine indexing, and credential endpoints are rate-limited.
Option B: CLI Onboarding Utility (Admin/Developer Alternative)
# 1. Generate an encryption master key (if not already set in .env):
python scripts/generate_master_key.py
# 2. Add tenant credentials to Supabase via CLI:
python scripts/add_tenant.py \
--tenant-id "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11" \
--company-name "Acme Logistics Inc" \
--email "billing@acme.com" \
--password "SecurePassword123!"(You can also run python scripts/add_tenant.py without arguments for interactive masked input).
6. Local Development & Testing
# 1. Create and activate virtual environment
python -m venv .venv
source .venv/bin/activate # Or on Windows: .venv\Scripts\activate
# 2. Install dependencies & Playwright browser
pip install -r requirements.txt
playwright install --with-deps chromium
# 3. Configure environment
# Copy .env.sample to .env and fill in every blank value before running — the server will refuse to start otherwise
cp .env.sample .env
# 4. Run automated tests
python -m pytest -v tests
# 5. Start local server
python main.pyServer endpoints:
SSE Stream:
http://localhost:8000/sseSSE Messages:
http://localhost:8000/messagesStreamable HTTP:
http://localhost:8000/mcpHealth Check:
http://localhost:8000/health(unauthenticated)
7. Deployment on Coolify (VPS)
Create a new service in your Coolify dashboard: Application -> Dockerfile.
Point Coolify to this repository.
Set your custom subdomain (e.g.
web-mcp.yourdomain.com).Paste all environment variables from Section 3 into Coolify's Environment Variables tab.
Deploy. The Dockerfile automatically handles:
System Chromium dependencies (
playwright install --with-deps chromium).Unprivileged user permissions.
Built-in container health checks on
/health.
8. Exposed MCP Tools
Tool | Category | Description |
| Plumbing | Verifies active session on portal |
| Plumbing | Direct navigation to portal sections |
| Diagnostic | Returns visible DOM text for element discovery |
| Diagnostic | Returns base64 PNG data URL of current view |
| High | Scrapes overview metrics and quick links |
| High | Extracts failed invoices with error reasons |
| High | Applies date-picker filters and returns report table |
| Medium | Checks invoice checkboxes and triggers validation |
| Medium | Edits specified draft invoice field and saves |
| Medium | Fills add-user form and handles confirmation dialog |
| Low | Triggers invoice duplicate action |
| Low | Triggers UI export and captures file download |
9. DOM Selectors & Discovery Workflow
All selectors are isolated in browser/selectors.py.
When testing with a live sandbox account:
Call
tool_check_login_statusto ensure login is operational.If any element differs from candidate selectors, use
tool_get_page_textandtool_take_screenshotto inspect the live markup.Update
browser/selectors.pywith the exact attributes discovered.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Invoice Simple MCP server for ChatGPT, Claude and any AI agent: create invoice, send invoice, create estimate, list unpaid invoices and mark invoice paid in your own Invoice Simple account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Invoice Simple yourself; Cotlet does not store your password and you need no Invoice Simple API key. About the official Invoice Simple API: Invoice Simple publishes no public API, API keys or developer documentation; its plans offer built-in payment integrations instead (checked 8 Nov 2026). It has no official MCP server. Setup and FAQ: https://cotlet.dev/integrations/invoice-simple-api-mcp-server
Invoice Ninja MCP server for ChatGPT, Claude and any AI agent: create invoice, send invoice, create quote, record payment and list overdue invoices in your own Invoice Ninja account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Invoice Ninja yourself; Cotlet does not store your password and you need no Invoice Ninja API key. About the official Invoice Ninja API: Yes, Invoice Ninja has a full REST API (checked 14 Oct 2026): invoices, quotes, clients, payments, products and more, authenticated with an API token you create in Settings. REST API access comes with the Ninja Pro, Enterprise and Premium plans, and the Free plan has none. Setup and FAQ: https://cotlet.dev/integrations/invoice-ninja-api-mcp-server
Fakturownia (InvoiceOcean) MCP server for ChatGPT, Claude and any AI agent: issue invoice, send invoice, mark invoice paid, add client and list unpaid invoices in your own Fakturownia (InvoiceOcean) account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Fakturownia (InvoiceOcean) yourself; Cotlet does not store your password and you need no Fakturownia (InvoiceOcean) API key. About the official Fakturownia (InvoiceOcean) API: Yes. Fakturownia has a documented REST API that creates invoices, clients and payments, sends invoices by email and sends them to KSeF (checked 14 Oct 2026). Setup and FAQ: https://cotlet.dev/integrations/fakturownia-api-mcp-server
Invoice2go MCP server for ChatGPT, Claude and any AI agent: create invoice, send invoice, send payment reminder, create estimate and list unpaid invoices in your own Invoice2go account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Invoice2go yourself; Cotlet does not store your password and you need no Invoice2go API key. About the official Invoice2go API: Invoice2go publishes no public API or self-serve API keys; its integrations site lists a REST API only as "Request this integration" (checked 8 Nov 2026). It connects through built-in integrations and a Zapier app, and has no official MCP server. Setup and FAQ: https://cotlet.dev/integrations/invoice2go-api-mcp-server
Related MCP Servers
- AlicenseBqualityCmaintenanceAutomates Salesforce via browser using Playwright with persistent session. Supports Data Cloud, Setup, and other UI-only areas through generic tools.30MIT
- AlicenseNot gradedqualityBmaintenanceEnables browser automation and smoke testing via Playwright, with tools for navigation, DOM interaction, screenshots, network capture, and more.5 npm2MIT
- AlicenseAqualityDmaintenanceEnables automated testing and demo video creation using Playwright, with login, session orchestration, narration, and video compilation.8MIT
- FlicenseNot gradedqualityBmaintenanceEnables MCP clients to remotely control a headless Chromium browser via Playwright, including navigation, clicking, typing, form filling, screenshots, and network request monitoring, over Streamable HTTP and deployable to Azure Container Apps.-