site-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.
site-mcp
MCP tools for websites that have no API. You ask, the answer comes back, and nothing opens on your screen. An agent explores a flow on a site once and writes it down as a JSON spec; from then on the flow is one tool. Where the site allows it, a call runs as plain HTTP requests and answers in under a second. Otherwise it runs in a hidden browser. A window appears only for flows where a human has chosen to press submit.
Status: pilot. Five flows on four live sites run on one runtime with no site-specific code; three of them run without a browser, and no window opens for any of them. It has not been used on a site that requires login. See Limitations and Next steps.
Why
Many sites people depend on (banks, government services, internal portals) have no API and no MCP server. Letting an LLM agent drive them freely is slow, costs tokens on every run, and is risky when the last button moves money or sends something.
site-mcp separates the three concerns:
Phase | Who | How often | Output |
Explore | An agent with a browser tool | Once per flow |
|
Compile | The runtime | At server start | MCP tools, no code generated |
Replay | The runtime, no LLM in the loop | Every call | The result, or a verified form left for a human |
flowchart LR
A[Agent explores the flow once] --> B[flows/name.json]
B --> C{commit.by}
C -->|tool| R[one tool: name]
R --> H{http recipe?}
H -->|yes| T1[Plain requests<br/>no browser]
H -->|no, or it failed<br/>before submitting| T2[Hidden browser<br/>fill, read back, submit]
C -->|human| P[name_prepare<br/>visible window: fill, read back, stop]
P --> E{{Human reviews<br/>and clicks submit}}
T1 --> F[Result]
T2 --> F
E --> FRelated MCP server: Deputy
Execution tiers
A browser is the most expensive way to talk to a site, so a call uses the cheapest tier that works and reports which one ran ("via").
Tier | What runs | Typical time | On screen | Used when |
Requests | Plain HTTP from the spec's | 0.2 to 1 s | Nothing | The flow has a recipe and the tool commits |
Hidden browser | Playwright Chromium without a window | 3 to 9 s | Nothing | No recipe, or the recipe failed before submitting |
Visible browser | The same, in a window | 3 to 9 s | The filled form | A human commits the flow |
Measured on the pilot flows:
Flow | Browser | Requests |
Israel Post zip finder | 8.8 s | 0.24 s (0.6 s on the very first call) |
Purchase tax simulator | 3.5 s | 0.3 to 1.1 s |
The tool acts as the user's browser and presents itself as one. Requests are sent the way Chrome sends them (connection handshake and headers, via impit), and the hidden browser runs under Chrome's ordinary name rather than "HeadlessChrome". Sites commonly turn away clients that fail either test; Israel Post's page does, and it was measured to check nothing else. See Responsible use.
Some recipes need a value that the site hands out in its page, such as an API key in the markup. A recipe can declare a bootstrap: the page is fetched once (by request, or in the hidden browser if that fails), the value is read and cached on disk, and it is fetched again only when the site rejects it.
Design principles
Submit policy is per flow. Each spec says who presses the final button.
"by": "tool"suits lookups, calculators and anything safe to repeat, and makes the flow a single tool."by": "human"suits payments and anything that cannot be undone: the tool fills and verifies, and the runtime refuses to click. The default ishuman, so automation of the last step is always an explicit choice.Read-back, not trust. In the browser tier, every value is read from the DOM after it is entered and compared with what was asked. A mismatch is an error, never a "ready". The request tier has no form to read back; it reports what it sent, and
checkrequires its result to equal the browser's.Cheapest tier first, openly. Requests before browser, hidden before visible. Every result says which tier ran, and a fallback says why.
Deterministic replay. A spec is a fixed list of steps. No model decides anything at call time.
No site-specific code. If a flow cannot be expressed in the spec, the runtime gets a generic capability. It never gets a special case.
Fail loudly. A missing element, an unknown option, or a page that left the allowed hosts is an error that names the step.
How it compares
Other projects turn websites into agent tools by driving a browser or by replaying API calls. site-mcp does both from one spec, picks the cheaper one per call, and checks that they agree.
Runs without a browser | Falls back to a browser | No LLM or cloud service at run time | Submits forms under a per-flow policy | Checks its own results | |
site-mcp | ✅ 3 of 5 pilot flows | ✅ | ✅ | ✅ tool or human, enforced | ✅ read-back, and both tiers must match |
❌ drives Chrome | n/a | ✅ | ➖ replays actions, no stated policy | ❔ | |
❌ drives Chromium | n/a | ➖ agent steps in on failure | ➖ replays actions, no stated policy | ❔ | |
❌ drives Chromium | n/a | ✅ | ❌ read-only by design | ✅ drafts tested against expected answers | |
❌ cloud browser | n/a | ❌ needs cloud browser and model | ❔ | ❔ | |
✅ | ❌ | ✅ | ➖ sends requests, no stated policy | ❔ | |
n/a, runs in the page | n/a | ✅ | Up to the site | Up to the site |
✅ yes · ➖ partly · ❌ no · ❔ not documented. The other rows are based on each project's README as of December 2026; none was installed or benchmarked, so check the projects themselves.
What the combination gives you:
Speed. A request-tier call answers in 0.2 to 1 second, against 3 to 9 seconds in a browser. The Israel Post lookup went from 8.8 s to 0.24 s.
Nothing on screen. No window ever opens for a flow the tool submits. Even the fallback browser is hidden.
One tool per flow. The model sees
israel_post_zip, not a set of step tools.Resilience. When a recipe breaks before submitting, the same call completes in the browser and says so. API-replay tools have no second path; browser tools have no fast path.
No per-call cost. No model and no cloud browser is involved after the flow is explored.
Control over the last step. Each flow states whether the tool or a human submits, and the runtime enforces it.
Evidence.
checkruns both tiers on the same input and fails unless the results are identical.
Where others are ahead: webpage-mcp works inside the user's real, logged-in Chrome session; workflow-use has a recorder and an agent that takes over when a step fails; WebMCP is the cleanest answer when the site owner takes part.
Included flows
Flow | Site | What it exercises |
| Israel Tax Authority purchase tax simulator | ASP.NET postbacks, dependent dropdown, date picker. Runs without a browser (ViewState form post) |
| Bituach Leumi insurance fee calculator | 2-screen wizard, radio groups |
| Bituach Leumi savings-per-child calculator | Single screen. Spec written by a fresh agent from this README alone |
| GOV.UK visa checker | 4-screen wizard with identical selectors on every screen. Runs without a browser (one request) |
| Israel Post zip code finder | React/MUI, autocomplete fields, generated ids, popup over the form, page protected by Cloudflare. Runs without a browser, including reading the page's API key (JSON API) |
All five are public, read-only calculators or lookups, chosen so the pilot could be replayed freely. They are set to "by": "tool"; the tests also run one of them in human mode.
Quick start
Requires Node.js 22 or later.
git clone https://github.com/kingonly/site-mcp.git
cd site-mcp
npm install
npx playwright install chromiumRun one flow against the live site:
node bin/site-mcp.js check flows/purchase_tax.jsonRegister the server with an MCP client, for example Claude Code:
claude mcp add site-mcp -- node /path/to/site-mcp/bin/site-mcp.js serve /path/to/site-mcp/flowsNo window opens unless a flow is committed by a human. Browser profiles are kept in ~/.local/share/site-mcp/ (profile for the visible browser, profile-hidden for the hidden one), screenshots in shots, cached bootstrap values in cache.
Tools
A flow the tool commits is one tool, named after the flow. Call it and get the result.
A flow a human commits is two tools:
Tool | What it does |
| Opens the site in a visible window, fills the form from the parameters, reads every value back, outlines the commit button, takes a screenshot. Does not submit. |
| Returns the result fields after the human clicked. Returns |
Starting the server with SITE_MCP_STEP_TOOLS=1 also exposes _prepare, _result and _commit for tool-committed flows, for debugging and tests.
Example with israel_post_zip, answered by the request tier:
// israel_post_zip { "city": "תל אביב", "street": "דיזנגוף", "house_number": "50" }
{
"status": "done",
"fields": { "zip": "6433222" },
"sent": { "city": "תל אביב - יפו", "street": "דיזנגוף", "house_number": "50" },
"via": "http"
}With "by": "human", _prepare fills the real form and returns "status": "ready_for_commit" with the values read back from the page.
Adding a flow
List the page's controls:
node bin/site-mcp.js probe https://example.com/formprobeshows only the first screen. Result and error markup has to be read while driving the flow.Drive the flow once, by hand or with an agent that has a browser tool. Note each selector, what appears after each click, and what the result looks like.
Write
flows/<name>.jsonusing the reference below.Verify against the live site:
node bin/site-mcp.js check flows/<name>.json # hidden node bin/site-mcp.js check flows/<name>.json --headed # watch itOptional, for flows the tool commits: add a request recipe so the flow runs without a browser.
node bin/site-mcp.js record flows/<name>.json # what the page really sentWrite the
httpsection from that output (reference below), then runcheckagain.checkruns the browser and the recipe on the same input and fails unless the fields are identical.Restart the MCP server. The new tools are available.
Flow spec reference
{
"name": "purchase_tax",
"description": "Shown to the model as the tool description.",
"start_url": "https://www.misim.gov.il/svsimurechisha/",
"allowed_hosts": ["www.misim.gov.il"],
"params": {
"property_type": { "type": "string", "description": "...", "enum": ["apartment", "land"], "required": true },
"deal_date": { "type": "string", "description": "DD/MM/YYYY" }
},
"steps": [
{ "do": "fill", "selector": "#date", "value": "{deal_date}", "when": "deal_date", "then_press": "Tab", "label": "deal date" },
{ "do": "select", "selector": "#type", "value": "{property_type}", "map": { "apartment": "30", "land": "70" }, "label": "property type" },
{ "do": "wait", "selector": "#calc option:nth-child(2)" },
{ "do": "check", "selector": "input[name='currency']", "value": "nis", "label": "currency" },
{ "do": "click", "selector": "#next" }
],
"commit": { "selector": "#submit", "label": "חישוב", "by": "tool" },
"result": {
"ready": "#resultTable",
"error": "#errorBox",
"fields": {
"total": { "selector": "#resultTable tr:last-child td:last-child" },
"rows": { "selector": "#resultTable", "as": "table" },
"note": { "selector": "#note", "optional": true }
}
},
"example": { "property_type": "apartment" },
"expect": { "total": "20,538" },
"cases": [ { "name": "...", "args": { }, "status": "done", "fields": { } } ]
}Steps:
| Meaning |
| Type |
| Choose the option whose value is |
| Without |
| Autocomplete field: types |
| Click a button that is not the commit button, such as "next" in a wizard. |
| Wait for |
| Send a key to the element. |
| Navigate to |
Selectors are Playwright selectors; plain CSS is the safe choice. On ASP.NET sites the generated ids are long and unstable, so match the stable tail: [id$='StartNextButton'].
probe shows only the first screen. The result and error markup has to be read while driving the flow once.
Result: ready is a selector that is visible only once the result is shown. error is a selector that is visible and non-empty only when the site rejected the input (a hidden or empty error box does not count). Each field returns the element's text with whitespace collapsed, or rows of cells with "as": "table"; the first match is used; a missing field is an error unless "optional": true. Values are returned as the site prints them ("12,618 ש\"ח"), not as numbers.
commit.by is "human" (default) or "tool". commit.label is only shown to the human and the model; it is not matched against the page.
check prints two JSON objects: the prepare report (ready_for_commit), then, for a flow the tool commits, the result. "status": "done" means it worked. check runs only example; cases run in npm test. A case is { "name", "args", "status"?, "fields"?, "prepare_error"? }: it prepares with args, commits, and compares the status and the listed fields, or expects prepare to fail with a message matching prepare_error.
Common keys: value takes {param} placeholders, map translates a parameter value to the site's value, when skips the step when that parameter is absent, label names the field in the read-back report.
Top-level option: "overlays": ["#popup"] for popups and banners that cover the form. They are hidden by CSS for the whole flow.
On sites with generated ids (React, MUI), select by role and name or by text: role=combobox[name='יישוב'], role=button[name='חיפוש מיקוד'], text=/המיקוד לכתובת הינו/ >> xpath=...
example is required by check and the tests. expect and cases are optional test data.
Request recipe reference (http)
Optional. Allowed only with "by": "tool", because a direct request is a submit.
"http": {
"bootstrap": {
"url": "https://example.com/form",
"values": { "api_key": { "selector": "[data-apikey]", "attr": "data-apikey" } }
},
"headers": { "x-api-key": "{boot.api_key}" },
"vars": { "kind": { "param": "property_type", "map": { "apartment": "30", "land": "70" } } },
"steps": [
{ "get": "https://example.com/form", "save": "page" },
{ "post": "https://example.com/form/Options", "json": { "kind": "{kind}" }, "save": "options" },
{ "choose": { "from": "options.json.d", "where": "Value", "equals": "{calc}", "label": "calculation" }, "save": "calc_row" },
{ "post": "https://example.com/form", "form_base": "page",
"form": { "kind": "{kind}", "calcIndex": "{calc_row.$index}", "amount": "{price}" },
"submits": true, "save": "final" },
{ "expect": { "value": "{final.url}", "contains": "Result.aspx",
"site_error": { "in": "final", "css": "#errorBox" } } }
],
"sent": { "kind": "{property_type}", "calculation": "{calc_row.Text}", "amount": "{price}" },
"result": { "fields": {
"total": { "in": "final", "css": "#resultTable tr:last-child td:last-child" },
"rows": { "in": "final", "css": "#resultTable", "as": "table" },
"code": { "value": "{final.json.Result.code}", "pattern": "[0-9]{7}" }
} }
}Key | Meaning |
| A request. |
| Marks the one request that commits. Required on exactly one request. |
| Picks one item from a JSON list: the one whose |
| Asserts that a rendered value contains a string. If it does not and |
| Named translations of a parameter into the site's values. |
| Values read from the site's page: fetched by request, or in the hidden browser if that fails. Cached in |
| What the result reports as sent. |
| Same field names as the browser |
Placeholders are {param}, {var}, {boot.name} and paths into saved answers such as {row.id} or {found.json.Result.zip}. Values placed in URLs are URL-encoded.
Result fields in both tiers accept "pattern", a regular expression whose first match becomes the value. An empty value is an error unless the field is "optional", so a site answering "nothing found" never produces a done.
Writing a recipe:
recordprints one entry per request (type,method,url,status,headers,formorbody, and the first 400 characters of theanswer); redirect hops are separate entries. The answers are cut short, so for HTML results reuse the browserresultselectors ascss.A recipe does not have to replay every recorded request. Keep the ones the final answer depends on. If a wizard keeps earlier answers in the URL, one request can be enough.
The
submitsrequest can be agetor apost: it is the one the commit button triggers. Query strings go inline in the URL.Placeholders work in URLs (path and query), headers, bodies,
expect.value,expect.contains,sentandvalue.site_error.csscounts when the element exists in the answer and has text. There is no notion of visibility in raw HTML, so pick a selector the site only fills on failure.sentis free-form and is not compared bycheck; use names a reader will recognise.checksucceeds when its last line ishttp recipe ok: same fields as the browser. It runs onlyexample, so try other parameter values too.
Rules of the request tier:
Hosts. Every request and every redirect hop must be https and on
allowed_hosts.Fallback boundary. If the recipe fails before the
submitsrequest, the call falls back to the hidden browser and reportsfallback_reason. If it fails after, the call is an error and nothing is retried, so a flow is never submitted twice.No fallback for bad input. An ambiguous choice or a site validation message is returned as is.
Uncovered parameters. If a call passes a parameter the recipe never mentions, the call goes to the browser instead of dropping it.
Safety model
The submit policy is enforced. With
"by": "human"(the default) no commit or run tool exists, the runtime refuses to click the commit button, and anhttprecipe is rejected at load. In every flow, a step that clicks the commit selector is rejected at load, and at run time eachclickis compared with the commit button as elements, so a differently written selector that lands on the same button is refused. The commit happens only through the commit or run tool, or the human.Read-back. Before every
clickand at the end, each entered value is read from the DOM and compared with what was asked. A mismatch fails the tool; it does not report "ready".Hosts. If the page leaves
allowed_hosts, the tool fails.No fallbacks. A missing selector, an option that does not exist, or an unknown parameter is an error, with the step number.
Tests
npm testRuns every flow over real MCP stdio against the live sites: prepare, commit, and the one-call tool, asserting that the one-call tool returns the same fields as the browser. It then checks the default tool list, the human-click path, the commit guard, and the request tier's boundaries (no browser launched, no request in human mode, fallback only before the submit, hosts, empty results). It needs network access. No window opens. A failure usually means a site changed and the spec needs re-exploring.
What the pilot found
Flow | Runtime changes it required |
1. Purchase tax | Built alongside the runtime |
2. Insurance fees wizard | Read-back before each screen change; radio groups |
3. Visa checker | None |
4. Child savings (written by a fresh agent) | None |
5. Israel Post zip finder | Autocomplete step; overlay hiding |
Request tier (flows 1, 3 and 5) | New |
Nothing on screen | Browser-grade request client; hidden browser under its ordinary name; window only for human-commit flows; one tool per flow |
Plain forms and wizards replay reliably once the runtime knows the widget type. Each new widget type costs one generic addition.
Israel Post's page turned away plain requests and the default hidden browser. Testing one variable at a time showed exactly two checks: the connection handshake must look like a browser's, and the client must not name itself "Headless" or "curl". No window and no JavaScript check was involved, so an early conclusion that the site "needs a visible window" was wrong.
Three of the five flows were compiled to plain requests and return the same fields as the browser, 3 to 35 times faster. The form's HTML was not enough to do it: one site needed hidden fields that its script fills and a setup request made by a dropdown, which only showed up in recorded traffic.
That site's API has neither check, only a key that its page hands out. With a browser-grade request client the key is read by request too, so the flow needs no browser at all.
The first two request recipes were written by hand from recorded traffic. A third (
uk_visa_check_israeli) was written by a fresh agent from this README andrecordoutput alone, with no code changes, and passedcheckon the first run: it collapsed a 4-screen wizard into one request.A review during the pilot found that the commit guard compared selector strings only. The runtime now compares the resolved elements before every click.
Limitations
No login sites yet. The runtime drives its own Chromium profile. It has not been tried on a site that requires authentication, and it does not attach to the user's existing browser session.
The request tier is for tool-committed flows only. A human-submit flow needs a page to look at, so it opens a window until approval can be asked in the conversation.
Request recipes are more brittle than the page. They depend on endpoints a site does not document.
checkand the tests catch drift; the browser tier remains as fallback.Recipes are written by an agent or a person from
recordoutput. The step is not yet part of an automatic pipeline.One commit point per flow. Intermediate "continue" buttons are clicked by the runtime. A flow where a human must approve every screen cannot be expressed yet.
Linear flows only. A wizard whose questions depend on earlier answers needs one spec per path.
Exploring is manual. An agent writes the spec with
probeand a browser tool. There is no recorder.No self-healing. When a site changes, the tool fails with the step that broke, and the flow is explored again.
One server at a time. The server,
check, and the tests share browser profiles and cannot run at the same moment.Bot protection can change. A site can tighten its checks at any time. The tool does not solve challenges; a flow that starts being challenged fails and says so.
Next steps
Approval in the conversation (MCP elicitation): for human-submit flows, show the values in the chat and submit on approval, so no window is needed.
Build tools from use: when no flow exists for a request, let the agent do it once in the browser and save the spec as a by-product.
Make recipe writing automatic: after exploring, have the agent run
record, write the recipe, and keep it only ifcheckpasses.Attach to the user's browser (Chrome DevTools Protocol or an extension) so flows work behind a login without handling credentials. Evaluate webpage-mcp for this part.
Checkpoints and branching: several human-only buttons in one flow, and wizards whose path depends on earlier answers.
Drift detection: a scheduled
checkper flow that reports when a site changed.A shared registry of flow specs, so a site explored once works for everyone.
Responsible use
The tool acts for one person, at the pace of that person's requests, on pages they could open themselves. It presents itself the way their browser would: requests use a Chrome-like connection and headers, and the hidden browser does not label itself "Headless". Some sites filter on exactly those signals, so be deliberate about where you point it, and check a site's terms of use before adding a flow, in particular a request recipe: it calls the endpoints the site's own page calls, which the site does not document for outside use.
It does not solve captchas, does not go around logins, and does not rotate identities or addresses. Do not use it for bulk collection. Site keys are read from the page at run time and are not stored in this repository. The included flows target public, read-only pages. The project is not affiliated with any of the sites listed.
Project layout
bin/site-mcp.js CLI: serve, probe, check, record
src/runtime.js spec loading, browser tier: steps, read-back, results; tier selection (no site knowledge)
src/http.js request tier: recipe engine (no site knowledge)
src/server.js flow specs -> MCP tools
flows/ one JSON spec per flow
test/e2e.js end-to-end over MCP against the live sitesLicense
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
Browser automation MCP for whole web tasks in a cloud browser: saved logins, bot checks, replays.
Verified websites as JSON commands for AI agents over plain curl or MCP.
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Run multi-step tasks in a real Chrome browser: persistent environments, live view, human takeover.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceSelf-hosted, cookie-aware web-automation engine that turns any website into callable MCP tools, with stateful browser sessions, web search, and multi-page crawling.-
- FlicenseAqualityBmaintenanceEnables any MCP client to obtain a typed API for whatever page the user is currently on, then execute the call in their real, logged-in browser session without screenshots, DOM dumps, or accessibility trees entering the caller's context. It grafts WebMCP onto sites that never adopted it, synthesizing tools from ordinary forms and ARIA widgets so a page becomes one validated call instead of many probing steps.275-
- AlicenseNot gradedqualityBmaintenanceTurns YAML-defined browser flows into typed MCP tools that Claude, Cursor, VS Code and other MCP clients can call, letting agents run repeatable tasks like logins, form fills, report downloads, price checks and data extraction without letting them wander the page freely. Each call returns JSON output, downloaded files or screenshots, and failures report the step, error, page URL and a screenshot.11 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables an AI agent to learn a Chromium browser task once and then replay it deterministically without spending LLM tokens, handing off logins and CAPTCHAs to a human while keeping credentials out of the model. Every step is de-identified for privacy and written to a hash-chained audit log, available as both an MCP server and a CLI.Apache 2.0