About goflag
@goflag/mcp is a local MCP server for agents auditing the SEO and internationalization of sites under development. It checks local or accessible preview URLs, reports findings with rule sources, and can compare results with a saved baseline.
Key features
- 01Audit site SEO and localization
- 02Compare findings with a saved baseline
- 03Explain rules with their sources
- 04List rules by scope
- 05Report crawl progress and cancellation
Use cases
- 01Check a local development site after edits
- 02Find translation gaps and broken links
- 03Review changes against a prior audit
- 04Look up the basis for an audit finding
MCP support
Provides four read-only MCP tools: audit_site, compare_to_baseline, explain_rule, and list_rules. It runs locally over stdio and does not start commands, write baselines, or provide remote mode.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
Tools
4Saved tool list · updated 1d ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| url | string | Yes | The site to audit, http or https. A dev server's URL works: http://localhost:3000. |
| static | boolean | No | Never launch Chromium; judge the server-rendered HTML only. |
| locales | array | No | Locales the site serves, e.g. ["en", "fr"], when its sitemap does not say. |
| maxPages | integer | No | Page budget. Default 50. |
| advisories | boolean | No | Also return the questions a linter cannot settle, with their evidence, for you to judge. |
| checkExternal | boolean | No | Also probe links to other sites. Off by default: slow, and not your site's fault. |
| expectIndexing | enum | No | "no" for a staging or preview host that must stay out of search indexes.no | yes |
Details
From the project README@goflag/mcp
goflag as an MCP server. An agent audits the site it is editing — a dev server on localhost, a preview behind a VPN — and reads each rule with the documents that require it.
It runs locally, over stdio, on the same engine as @goflag/cli: an answer here is the answer goflag would print.
Getting started
Claude Code:
claude mcp add goflag -- npx -y @goflag/mcp
Cursor (.cursor/mcp.json), VS Code (.vscode/mcp.json, under servers) and other clients take the same command:
{
"mcpServers": {
"goflag": { "command": "npx", "args": ["-y", "@goflag/mcp"] }
}
}
Then ask your agent to check the SEO of what it just changed: it starts the dev server, calls audit_site on its URL, fixes what is new, and calls it again.
Tools
All four are read-only: none writes to disk or to the site.
| Tool | Input | Returns |
|---|---|---|
audit_site | url; optional maxPages (default 50), locales, expectIndexing, static, advisories, checkExternal (default off) | The findings rolled up by rule with their rigor, translation holes, broken links, the coverage, and the exit code the CLI would return |
compare_to_baseline | the same, plus baseline: a JSON report saved by goflag --report or --update-baseline | What is new, what was resolved, how many findings are unchanged |
explain_rule | id, from a finding | What the rule checks, why, its rigor, the documents behind it, and its page on goflag.tech |
list_rules | optional scope: page, site or prose | Every rule with its scope, severity and rigor |
audit_site reports crawl progress to a client that asks for it, and stops when the call is cancelled.
What it does not do
- No headers. A token passed as a tool argument would sit in the agent's transcript. Audit a protected preview with the CLI:
goflag <url> --header "<name>: <value>". - No command to run. The agent starts its own dev server; this server never executes one.
- No baseline written. Capture one with
goflag <url> --update-baseline --baseline .goflag/baseline.json;compare_to_baselineonly reads it, and refuses a file that is not a goflag report without quoting it. - No remote mode. It runs where the agent runs — which is why it can see
localhost.
Requirements
Node 22 or later. A page that renders in the browser is audited in Chromium, through the playwright package; without it, or with static: true, the server-rendered HTML is judged instead.
Learn more
- The rules — each with its rigor and its sources
- The CLI — the gate in CI, the HTML report,
--header - Source and issues
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.