@first-ch/tools-mcp 0.36.0 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -22
- package/apps.mjs +538 -0
- package/css-layout.mjs +612 -0
- package/dpi.mjs +660 -0
- package/faq-jsonld.mjs +401 -0
- package/htpasswd.mjs +740 -0
- package/lines.mjs +423 -0
- package/openapi-doc.mjs +2954 -0
- package/package.json +65 -4
- package/serp.mjs +309 -0
- package/server.mjs +322 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @first-ch/tools-mcp
|
|
2
2
|
|
|
3
|
-
MCP server exposing [First CH Tools](https://tools.first-ch.com)' free web-tool logic — WCAG contrast, JP character/X-weight counting, WebP conversion, JSON-LD generation, llms.txt generation, encoding/line-ending conversion, Marp Markdown→slide rendering, Japanese/English test-data generation, text/code diffing, cron-expression explanation, Base64/data-URI encoding, URL query-parameter editing, HTML entity escaping/unescaping, JSON⇄YAML conversion, px ⇄ rem/em unit conversion, colour-code conversion with alpha compositing, MD5/SHA-1/SHA-256/SHA-384/SHA-512 hashing, JWT decoding with expiry and signature checks, User-Agent parsing with device/bot detection, bulk UUID v4 / ULID generation, aspect-ratio calculation with responsive sizing, case conversion between camelCase, snake_case and kebab-case, CSV/TSV ⇄ JSON conversion, IP/CIDR calculation with subnet splitting and IP-range reduction, business-day date calculation with Japanese public holidays, HTML-to-Markdown conversion, Japanese era ⇄ Western date conversion with age calculation, and URL-slug generation from Japanese titles — to AI agents such as Claude Code.
|
|
3
|
+
MCP server exposing [First CH Tools](https://tools.first-ch.com)' free web-tool logic — WCAG contrast, JP character/X-weight counting, WebP conversion, JSON-LD generation, llms.txt generation, encoding/line-ending conversion, Marp Markdown→slide rendering, Japanese/English test-data generation, text/code diffing, cron-expression explanation, Base64/data-URI encoding, URL query-parameter editing, HTML entity escaping/unescaping, JSON⇄YAML conversion, px ⇄ rem/em unit conversion, colour-code conversion with alpha compositing, MD5/SHA-1/SHA-256/SHA-384/SHA-512 hashing, JWT decoding with expiry and signature checks, User-Agent parsing with device/bot detection, bulk UUID v4 / ULID generation, aspect-ratio calculation with responsive sizing, case conversion between camelCase, snake_case and kebab-case, CSV/TSV ⇄ JSON conversion, IP/CIDR calculation with subnet splitting and IP-range reduction, business-day date calculation with Japanese public holidays, HTML-to-Markdown conversion, Japanese era ⇄ Western date conversion with age calculation, and URL-slug generation from Japanese titles — to AI agents such as Claude Code. All of those run on your machine.
|
|
4
|
+
|
|
5
|
+
It also ships **`app_*` tools** for the 33 web apps at [apps.first-ch.com](https://apps.first-ch.com) (site checks such as GEO/AI-search readiness, meta tags, security headers, SSL certificates, DNS and email DNS, redirects, broken links, structured data, AI-crawler access, Japanese readability, and AI-assisted business-tone and LP-copy checks). Unlike the local tools, **an `app_*` tool sends its input (a URL, domain name or text) to apps.first-ch.com** and returns the JSON the app's API responds with — see [Network access, files and privacy](#network-access-files-and-privacy).
|
|
4
6
|
|
|
5
7
|
日本語版は [後半セクション](#日本語) を参照してください。
|
|
6
8
|
|
|
@@ -75,31 +77,78 @@ This server is also registered in the [MCP Registry](https://registry.modelconte
|
|
|
75
77
|
| `csv_convert` | Converts CSV/TSV into a JSON array and back — the same logic as the browser tool at tools.first-ch.com/csv-json/. For moving data you already have between a spreadsheet and an API: turning an exported table into JSON a request body can carry, or an API response into something Excel opens. With `direction` omitted it guesses `json2csv` when the input starts with `[` or `{` and `csv2json` otherwise. The delimiter is detected by looking at the first 20 lines for the character that appears the same number of times on every line, and can be pinned with `delimiter`. **Column names such as `stock.qty` are read and written as nested objects, and `tags.0` / `tags.1` (`tags[0]` means the same) become an array** — the reverse direction flattens by the same rule, so a round trip through CSV restores the original structure (`nest: false` writes nested values into a single cell as JSON text). **Type inference is decided by round trip — a value becomes a number only when converting it back to text is character-for-character identical** — so `0123`, `+1`, `1.50` and integers beyond 2^53 (`12345678901234567890`) stay strings and postcodes, phone numbers, invoice numbers and version strings survive. Reading follows RFC 4180: quoted cells, `""` escapes, line breaks inside cells, CRLF and a BOM are all handled, and the output side offers `bom` and `newline` for Excel. On the JSON side it accepts an array, a single object, an object wrapping an array such as `{"data":[…]}`, and JSON Lines. **A JSON syntax error comes back as an `ok: false` result with a line, a column and an excerpt rather than an exception**, so the reply itself says where to fix it. `notes` also reports rows whose column count does not match the header, duplicate header names (kept as `name_2`), empty headers (named `column4`), values that would lose digits, cells starting with `=`, `+`, `-` or `@` that a spreadsheet may execute as a formula (CSV injection), and objects with a different set of keys | `text?` or `path?`, `outputPath?`, `direction?` (`auto` default / `csv2json` / `json2csv`), `delimiter?` (`auto` default / `comma` / `tab` / `semicolon` / `pipe`), `header?`, `nest?`, `types?`, `trim?`, `emptyNull?`, `indent?` (`2` default / 0–8 / `tab`), `newline?` (`lf` default / `crlf`), `quoteAll?`, `bom?`, `lang?` (`ja` default / `en`) |
|
|
76
78
|
| `zenkaku_convert` | Converts letters and digits, katakana, symbols and spaces between their full-width and half-width forms **with a direction chosen per kind**, and cleans up the whitespace in the same pass — the same logic as the browser tool at tools.first-ch.com/zenkaku/. For normalising Japanese copy supplied by a client, cleaning a file before an import, and tidying form input. Each of `alnum` / `kana` / `symbol` / `space` takes `keep`, `han` (half-width) or `zen` (full-width); the defaults are the form most Japanese copy is set in — letters, digits, symbols and spaces half-width, katakana full-width (the same as `preset: 'ja'`). `preset` offers `ja`, `csv` (`ja` plus the whitespace and invisible-character cleanup), `han` and `zen`, and any per-kind option overrides it. **Half-width katakana is not one character per glyph**, so converting to full-width composes a following voiced mark (`ガ` → `ガ`, `パ` → `パ`, `ヴ` → `ヴ`) and converting the other way splits it into two. Japanese punctuation, brackets, the middle dot and the prolonged sound mark (`。 、 「 」 ・ ー`) live inside the half-width katakana block (U+FF61–U+FF9F) and are **treated as katakana** (`kana: 'han'` turns `「テスト」。` into `「テスト」。`; use `keep` to leave the punctuation full-width). Spaces cover U+3000 ⇄ U+0020 and fold NBSP and the Latin space family to the half-width side. The cleanup is `collapseSpaces` (a run of spaces becomes its first character), `trimLines`, `blankLines` (`keep` / `collapse` / `remove`), `removeInvisible` (zero-width, BOM, control codes) and `composeMarks` (NFC, for copy that writes `ガ` as `カ` plus a combining U+3099). **Line endings (LF/CRLF), tabs, hiragana and kanji are never rewritten.** `notes` reports what is left — half-width katakana, ideographic spaces, invisible characters, combining marks — plus the wave dash `〜` (U+301C) versus the fullwidth tilde `~` (U+FF5E) and platform-dependent characters (`① ㈱ Ⅲ`), which are **reported and never rewritten** because which way they should go depends on the destination. **This is deliberately not NFKC**: `①` never becomes `1`, and only the kinds you selected are touched. `inspect: true` converts nothing and returns just the audit | `text?` or `path?`, `outputPath?`, `preset?` (`ja` / `csv` / `han` / `zen`), `alnum?`, `kana?`, `symbol?`, `space?` (each `keep` / `han` / `zen`), `collapseSpaces?`, `trimLines?`, `blankLines?` (`keep` default / `collapse` / `remove`), `removeInvisible?`, `composeMarks?`, `inspect?`, `lang?` (`ja` default / `en`) |
|
|
77
79
|
| `cidr_calc` | Turns CIDR notation, a subnet mask, an ACL wildcard mask or a bare address into the network address, broadcast address, usable host range, address and host counts, reverse DNS zone and a binary breakdown — the same logic as the browser tool at tools.first-ch.com/cidr/. For subnet maths while writing server configs, firewall rules and Basic-auth allow lists. **IPv4 and IPv6 both work**: `::` compression, a trailing IPv4 form (`::ffff:192.168.0.1`), `[...]` brackets and a `%zone` suffix are parsed, and output follows RFC 5952. `192.168.1.5 255.255.255.0` and `192.168.1.5/0.0.0.255` (the ACL convention) are accepted in the same field. **The exceptions in host counting are built in**: a `/31` has two usable addresses for point-to-point links (RFC 3021), a `/32` is one host, and IPv6 has no broadcast address. When host bits are set in the address you pass, `notes` returns the block it actually belongs to — the form that belongs in a config file. **Octets with a leading zero (`192.168.001.1`) are refused**, because some libraries read them as octal and the same text then means a different address. The address type is matched against the main IANA special-purpose blocks (private, CGNAT, loopback, link-local, documentation, multicast, ULA and more) and a network that extends beyond its reserved range is flagged. `split` lists the equal subnets of a new prefix length, `contains` tests addresses for membership, and `range` reduces ranges such as `10.0.0.5 - 10.0.0.200` (mixed with CIDR blocks and single addresses, one per line or `;`-separated) to **the fewest blocks that cover them exactly**, merging overlaps and adjacencies first. All arithmetic is BigInt | `cidr?` and/or `range?`, `split?` (prefix length), `contains?` (string[]), `limit?` (1-4096, default 256), `lang?` (`ja` default / `en`) |
|
|
78
|
-
|
|
79
80
|
| `date_calc` | Counts the days and business days between two dates, works out the due date N days or N business days from a start date, and turns a closing day plus payment terms into a payment date — the same logic as the browser tool at tools.first-ch.com/date-calc/. For delivery dates, acceptance deadlines and payment schedules. **A business day is any day that is not a weekend, a Japanese public holiday or a closure you list**; the holiday table shipped with the package is the one published by Japan's Cabinet Office (1970–2027), so the "Happy Monday" holidays that move each year, substitute holidays after a Sunday holiday, citizens' holidays squeezed between two holidays (2026-09-22) and the shifting equinox days are all counted. `mode="between"` returns calendar days, business days, the breakdown of days off and every holiday in the range. `mode="add"` moves `n` (negative counts backwards) units from `base` and also lists the days it skipped; **"within 10 business days of receipt" differs by one depending on whether day zero counts**, so counting starts the day after by default (the Japanese civil-code rule) and `include_start=true` makes the start date day 1. `mode="payment"` resolves `invoice` + `closing` + `pay_months` + `pay_day`, moving a payment that lands on a day off by `pay_adjust` (default `prev`, the usual Japanese practice). The weekend, the New Year break, your own closures and your working weekends can all be set. Dates are held as days since 1970-01-01, so the server's time zone cannot shift the answer | `mode?` (`between` / `add` / `payment`), `start?`, `end?`, `base?`, `n?`, `unit?` (`business` default / `days` / `weeks` / `months` / `years`), `include_start?`, `adjust?`, `invoice?`, `closing?` (`eom` default / 1-31 / `none`), `pay_months?`, `pay_day?`, `pay_adjust?`, `weekend?`, `holidays?`, `year_end?`, `closed_dates?`, `work_dates?`, `lang?` |
|
|
80
|
-
|
|
81
81
|
| `html_to_markdown` | Converts an HTML fragment into Markdown — the same logic as the browser tool at tools.first-ch.com/html-md/. For turning a fetched page into something an LLM can read cheaply, and for moving existing web copy into Markdown. Headings (h1-h6), paragraphs, line breaks, emphasis, strikethrough, lists (nested, the `start` attribute, checkboxes), tables (thead / caption, with column alignment taken from `align` and `text-align`), links, images, code blocks (the language comes from `class="language-*"`), block quotes, horizontal rules, definition lists, figure / figcaption and details / summary are all handled, while `script`, `style`, anything marked `hidden` or `display:none` and presentational `div` / `span` wrappers are removed. **The HTML is not parsed with the browser DOM**: the tokeniser and tree builder are written by hand, so this server and the web page agree exactly, and unclosed elements are closed at the end while stray closing tags are dropped — the counts always come back in `notes`. **An attribute quote that is never closed stops the tag there**, because carrying on would swallow the rest of the document as one attribute value. **Whatever Markdown cannot express is reported rather than dropped in silence**: merged cells (a `colspan` is padded with empty cells, a `rowspan` keeps its value on the first row only), a cell holding a list or a code block (that table is left as HTML), definition lists (written in the Markdown Extra `: ` form) and `sup` / `sub` / `mark` / `iframe` / `svg` (`unknown` chooses between keeping them as HTML, reducing them to text and removing them). Tables, task lists and strikethrough are GFM extensions, so `gfm=false` switches them off. `base_url` rewrites relative links and images as absolute URLs — the thing that breaks most often in a migration — and `main_only` keeps only `main` / `article`, dropping `header`, `nav`, `footer`, `aside` and `form`. It never touches the network; fetching the page is the caller's job | `html?` or `path?`, `outputPath?`, `main_only?`, `base_url?`, `gfm?`, `escape?`, `pad_tables?`, `headings?` (`atx` default / `setext`), `bullet?` (`-` / `*` / `+`), `code_block?` (`fenced` / `indented`), `links?` (`inline` / `reference` / `strip`), `images?` (`keep` / `alt` / `drop`), `tables?` (`gfm` / `html`), `unknown?` (`keep` / `text` / `drop`), `br?` (`spaces` / `backslash` / `html` / `space`), `lang?` (`ja` default / `en`) |
|
|
82
|
-
|
|
83
82
|
| `wareki_convert` | Converts Japanese era dates (Reiwa, Heisei, Showa, Taisho, Meiji) and Western dates both ways and returns the weekday and zodiac — the same logic as the browser tool at tools.first-ch.com/wareki/. For converting and checking the dates in contracts, invoices and official forms. `mode="convert"` takes `date` or `dates` (up to 1000) and **detects which calendar each one is in**: `2026-10-01`, `2026/10/1`, `20261001`, `2026年10月1日`, `令和8年10月1日`, `R8.10.1`, `令和八年十月一日`, `㋿8.10.1`, `Reiwa 8` and so on. A year alone (`1989`, `昭和64年`) or a year and month (`2019-05`) also works, and both eras are returned when the period spans an era change. `formats` gives the era date (gannen, with weekday, in kanji numerals), the short forms (`R8.10.1` / `R08.10.01`), Western, ISO 8601 and English. Eras begin on 1912-07-30 (Taisho), 1926-12-25 (Showa), 1989-01-08 (Heisei) and 2019-05-01 (Reiwa). **Era dates that never existed (Heisei 32, Heisei 31 May 1, Reiwa 1 April 30) are still converted, and `notes` gives the correct era date**; a written weekday that does not match comes back as `WEEKDAY_MISMATCH`. **Before 1873 (Meiji 5 and earlier) only the year is converted**, because dates were lunisolar (`LUNAR_CALENDAR`). `mode="age"` takes `birth` (era dates accepted) and `reference` (today in Japan time if omitted) and returns the exact age (it goes up on the birthday; people born on February 29 turn older on March 1 in common years), years/months/days, the kazoe age, the next birthday and the entry and graduation years from elementary school to university. `mode="eras"` returns the era list, plus a year chart of era, zodiac and age when `from_year` / `to_year` are given (up to 500 years). Badly written dates come back as `ok: false` with `error.code` | `mode?` (`convert` / `age` / `eras`), `date?`, `dates?`, `birth?`, `reference?`, `from_year?`, `to_year?`, `lang?` (`ja` default / `en`) |
|
|
84
83
|
| `slug_generate` | Builds a URL slug for WordPress and other CMSs from a Japanese title — the same logic as the browser tool at tools.first-ch.com/slug/. Kana are written in Hepburn romaji (`し→shi`, `ち→chi`, `つ→tsu`, `ふ→fu`, `じ→ji`, `しゃ→sha`, a small っ doubles the consonant as in `kitte` / `matcha`, `ん` is always `n`, `ファ→fa`, `ティ→ti`, `ヴァ→va`), symbols are removed and the words are joined with hyphens (or underscores with `separator="snake"`) and lowercased, so the result is only `a-z`, `0-9` and the separator. **Kanji readings are not guessed**: pass the reading in kana as `reading` and the slug is built from it instead of `title` (spaces in `reading` become separators: `とうきょう で たべた ラーメン 10せん` → `tokyo-de-tabeta-ramen-10-sen`). Kanji left without a reading are skipped and reported in `skipped` and a `KANJI` note. Words also split at symbols, kanji, kana ⇄ Latin/digit changes and (with `splitKatakana`, the default) hiragana ⇄ katakana changes. `longVowel="omit"` (default) collapses ou/oo/uu and ー (`tokyo`, `ramen`; ei and ii stay), `"keep"` spells them out (`toukyou`, `raamen`). The particles は・へ・を come out as spelled (`ha`, `he`, `o`). `maxLength` cuts at a word boundary. Digits-only slugs (which can clash with date archives so WordPress may append `-2`) and slugs over 60 characters are flagged. `variants` gives all four separator × long-vowel spellings, and `items` builds up to 1000 slugs at once with a `DUPLICATE` note for collisions | `title?`, `reading?`, `items?` (strings or `{title, reading}`), `separator?` (`kebab` default / `snake`), `longVowel?` (`omit` default / `keep`), `maxLength?` (0–200, 0 = no limit), `splitKatakana?`, `lang?` (`ja` default / `en`) |
|
|
84
|
+
| `htpasswd_generate` | Builds htpasswd lines for HTTP Basic authentication — the same logic as the browser tool at tools.first-ch.com/htpasswd/ — for putting a staging site or a pre-delivery preview behind a password. Hashes are bcrypt (`$2y$`, as Apache's `htpasswd -B`, cost 5 by default) or apr1-md5 (`$apr1$`, for Apache 2.2 and other servers that cannot read bcrypt). Pass one `user` and `password`, or many as `users` (`"user:pass"` strings or `{user, password}`) or `bulk` (one `user:password` per line, `#` lines and blank lines skipped), up to 200. **A user with an empty password gets a random 16-character password, returned in `generated`** (CSPRNG, without look-alike characters such as 0 O o 1 l I); passwords you pass in are not echoed back. User names that contain `:`, are empty or exceed 255 bytes are skipped, and duplicates, passwords under 12 characters, equal to the user name, with leading/trailing spaces, non-ASCII or over bcrypt's 72-byte limit are flagged in `notes`. With `server` (`apache` / `nginx`) it also returns the `.htaccess` or nginx snippet, with `file`, `realm` and `ips` (IPv4 / IPv6 / CIDR let through without a password; paths with spaces are quoted, unreadable addresses are left out and flagged). `mode="verify"` (or just `hash`) checks a password against an existing htpasswd line or hash (`$2y$` / `$2b$` / `$2a$`, `$apr1$`, `$1$`, `{SHA}`; bcrypt above cost 14 is not computed). `outputPath` writes the file instead of returning it. Passwords are never logged | `user` + `password`, or `users[]` / `bulk`; `algo?` (`bcrypt` default / `apr1`), `cost?` (4–14, default 5), `server?` (`apache` / `nginx`), `file?`, `realm?`, `ips?`, `mode?` (`generate` / `verify`), `hash?`, `outputPath?`, `lang?` (`ja` default / `en`) |
|
|
85
|
+
| `openapi_doc_generate` | Turns an OpenAPI 3.x / Swagger 2.0 specification (YAML or JSON) into a Markdown API reference in Japanese (or English with `lang: "en"`) and TypeScript type definitions — the same logic as the browser tool at tools.first-ch.com/openapi-doc-gen/. The Markdown lists base URLs, an endpoint index, and per-tag tables of parameters, request bodies and responses plus the schemas, generating example responses from the schema when none are written (`examples: false` turns this off). The TypeScript output turns `components.schemas` (Swagger: `definitions`) into interfaces/types and, with `operations` (default true), adds `Params` / `RequestBody` / `Response` types per endpoint. Handles `$ref`, `allOf` / `oneOf` / `anyOf`, `enum`, `nullable` and `additionalProperties`; names that clash with TypeScript keywords or each other are renamed and reported in `notes`. **`$ref`s to other files or URLs are never fetched** (typed `unknown`, flagged `OA_EXTERNAL_REF`) — pass a bundled single-file spec. Uses the same hand-written YAML/JSON parser as `json_to_yaml`, except that a folded line starting with `- ` is read as part of the description. Syntax errors come back as `ok: false` with the code, line, column and an excerpt. `outputDir` writes `<title>.md` and `<title>.ts` instead of returning them. Up to 20 MB | `spec` or `path` (absolute), `lang?` (`ja` \| `en`), `examples?`, `operations?`, `output?` (`both` \| `markdown` \| `typescript`), `outputDir?` |
|
|
86
|
+
| `faq_jsonld_generate` | Builds schema.org FAQPage JSON-LD, the same Q&A as Markdown, and paste-ready `<details>`/`<summary>` HTML from question/answer pairs (same logic as tools.first-ch.com/faq-jsonld/). Unlike `jsonld_generate` (type=faqpage), answers are read as light Markdown — blank lines make paragraphs, `- ` / `1. ` make lists, `[text](URL)` and bare URLs become links — and a pasted "Q: … / A: …" or "## heading" block is split into pairs. Flags duplicate questions, unsafe (`javascript:`) and relative links; escapes `</script` so the JSON-LD block cannot be broken out of | `items[]` (`{q, a}`) and/or `bulk`, `title?`, `level?` (2/3), `answer_format?` (`html` / `text`), `wrap_script?`, `exclusive?`, `lang?` |
|
|
87
|
+
| `lines_process` | Tidies one-item-per-line text — the same logic as the browser tool at tools.first-ch.com/lines/ — for de-duplicating and sorting lists of keywords, URLs, e-mail addresses or product names, or turning them into a bullet list. **The steps always run in this order, once each**: `trim` (leading/trailing half- and full-width spaces, tabs, NBSP) → `removeBlank` (empty and whitespace-only lines) → `dedupe` (`dedupeMode`: `first` keeps the first copy / `unique` drops every line that repeats / `dupes` keeps only lines that repeat, once each; `ignoreCase` folds case) → `sort` (`asc` / `desc` / `reverse` / `shuffle`; `asc` and `desc` read numbers as numbers with `numeric`, default true — `item2 < item10`, `-3 < 1.25 < 10`, numeric lines before text — using the Japanese `Intl.Collator`) → `prefix` / `suffix` → `number` (`start`, `sep`: `dot` / `paren` / `colon` / `bracket` / `tab` / `space`, `pad` for zero padding; outside the prefix). `preset` (`uniqsort` = trim + drop blanks + dedupe + ascending, `clean`, `numbered`, `mdlist` = `- ` bullets, `shuffle`) starts from the same settings as the web version's buttons; individual options override it. `shuffle` with a `seed` (0–4294967295) reproduces the same order; without one it uses cryptographic randomness. The line ending of the first line break is kept for every line, and so is a trailing newline. Returns which lines repeat and how often (`duplicates`), and `notes` on groups that differ only in surrounding spaces, case or full/half width. Pass `text` or `path`; `outputPath` writes the result to a file | `text` or `path`, `outputPath?`, `preset?`, `trim?`, `removeBlank?`, `dedupe?`, `dedupeMode?`, `ignoreCase?`, `sort?`, `numeric?`, `seed?`, `prefix?`, `suffix?`, `number?`, `start?`, `sep?`, `pad?`, `lang?` (`ja` default / `en`) |
|
|
88
|
+
| `dpi_calc` | Print size ⇄ pixels for print-ready artwork (same logic as tools.first-ch.com/dpi/). `size`: pixels needed for a paper (A0-A6, JIS B1-B6, Japanese business card, postcard, photo L, US Letter… 28 presets, or custom mm) at a dpi (default 350) with bleed (default 3 mm), rounded up, plus uncompressed RGB/CMYK size, an artwork spec memo and notes (too low / no bleed / safe area / PSD 30,000 px limit). `reverse`: print size and effective dpi of an image on a paper (picks the better orientation) with a verdict and the pixels needed for 350 dpi. `table`: quick-reference table as text / Markdown / CSV. `units`: mm / cm / inch / px / pt / Q conversion | `mode?`, `paper?` / `widthMm`+`heightMm`, `dpi?`, `bleedMm?`, `width`+`height` (px), `format?`, `value`+`from?`, `lang?` |
|
|
89
|
+
| `serp_check` | Checks whether a page's `<title>`, meta description and URL fit in a Google search result by **pixel width**, not character count (same judgement logic as tools.first-ch.com/serp/, without the visual preview). Desktop = 600px column, title 20px × 1 line, description 14px × 2 lines; mobile = 380px, 2 / 3 lines. Wraps CJK per character and Latin per word with simple kinsoku, returns the visible lines, the cut-off part, width vs. limit, grapheme counts, a state (ok / cut / short / empty), checks (empty, truncated, too short, no site-name separator, not https, deep path, percent-encoding), the breadcrumb and paste-ready tags. Widths are an approximation (Arial advance widths + 1em for CJK, no kerning), so they can run a few px wider than a browser measurement | `title?`, `description?`, `url?` or `items[]` (up to 500), `device?` (`desktop` / `mobile` / `both`), `lang?` |
|
|
90
|
+
| `css_layout_generate` | Builds copy-ready CSS and HTML for a Flexbox or CSS Grid layout (same logic as tools.first-ch.com/css-layout/). Only non-default declarations are written, repeated tracks fold into `repeat()`. Validates `grid-template-areas` (equal cell counts per row, rectangular names, valid names, track-count mismatch) and emits `grid-area` rules. Notes flag combinations that do nothing (flex-grow vs justify-content, align-content with nowrap, 1fr tracks leaving no free space) and common pitfalls (min-width: auto overflow, 1fr minimum, reverse/dense reading order). Eight presets (holy grail, auto-fit grid, sidebar, header…) | `mode?` (`flex` / `grid` / `presets`), `preset?`, flex: `direction?`, `wrap?`, `justifyContent?`, `alignItems?`…; grid: `columns?`, `rows?`, `areas?`, `autoFit?`, `flow?`…; `gap?`, `count?`, `items?`, `lang?` |
|
|
91
|
+
|
|
92
|
+
### App tools (`app_*`, sent to apps.first-ch.com)
|
|
85
93
|
|
|
86
|
-
|
|
94
|
+
**Off by default.** These tools send your input to apps.first-ch.com, so they are only registered when you opt in with the environment variable `FIRSTCH_ENABLE_APPS=1` (for example `claude mcp add firstch-tools -e FIRSTCH_ENABLE_APPS=1 -- npx -y @first-ch/tools-mcp`). Without it, every tool runs on your machine and nothing is sent anywhere.
|
|
95
|
+
|
|
96
|
+
Each `app_*` tool calls one app's public JSON API (`POST https://apps.first-ch.com/<slug>/api/<action>`, no auth; the list is in [llms.txt](https://apps.first-ch.com/llms.txt)) and returns its JSON response as is. **The input is sent to apps.first-ch.com and processed there; the apps store neither the input nor the result.** Apps that check a site make First CH's server request that site, so the site sees a request from apps.first-ch.com, not from you. Every `app_*` tool also takes `lang?` (`ja` default / `en`) for the language of verdicts and error messages. Calls time out after 30 s (60 s for the heavier apps and the AI apps). API errors (invalid input, unreachable site, rate limit) come back as tool errors carrying the app's `error` code and `message`.
|
|
97
|
+
|
|
98
|
+
| Tool | App and what it does | Main input |
|
|
99
|
+
| --- | --- | --- |
|
|
100
|
+
| `app_geo` | [GEO Checker](https://apps.first-ch.com/en/geo/) — Enter a URL and get a six-axis, 100-point diagnosis of how citable your site is for AI search. | `url` |
|
|
101
|
+
| `app_meta_check` | [Meta Tag & SEO Basics Check](https://apps.first-ch.com/en/meta-check/) — Enter a URL to grade its title, meta description, canonical, robots, h1, OGP, lang and viewport. Character counts and robots.txt crawlability are checked too. | `url` |
|
|
102
|
+
| `app_headers` | [Security Header Grader](https://apps.first-ch.com/en/headers/) — Enter a URL to grade CSP, HSTS, X-Content-Type-Options, X-Frame-Options, Referrer-Policy and Permissions-Policy out of 100, with an A–F verdict, plain-language explanations and recommended values. | `url` |
|
|
103
|
+
| `app_ssl` | [SSL/TLS Certificate Checker](https://apps.first-ch.com/en/ssl/) — Enter a hostname and we run a real TLS handshake to read the certificate being served: expiry, days remaining, issuer, SAN and the intermediate chain, with a warning under 30 days. | `host` |
|
|
104
|
+
| `app_redirect_trace` | [Redirect Chain Tracer](https://apps.first-ch.com/en/redirect-trace/) — Enter a URL and we follow 301, 302, 307, 308 and meta refresh redirects one hop at a time, listing the status, URL and timing of each step, the final destination, and an SEO warning at three or more hops. | `url` |
|
|
105
|
+
| `app_status_check` | [Bulk HTTP Status Check](https://apps.first-ch.com/en/status-check/) — Checks a list of URLs (up to 10 per call) and returns the HTTP status, response time and final URL after redirects for each one. Page bodies are not read. | `urls`[] |
|
|
106
|
+
| `app_redirect_map` | [301 Redirect Map Checker](https://apps.first-ch.com/en/redirect-map/) — Checks one old→new URL pair from a relaunch or domain move: follows the old URL and checks it lands exactly on the new one, flagging temporary 302s, chains, loops, missing redirects and 404s. Call once per pair (60 pairs per minute per IP). | `from`, `to` |
|
|
107
|
+
| `app_link_check` | [Broken Link & Image Alt Checker](https://apps.first-ch.com/en/link-check/) — Enter a URL to extract its links (a href), fetch up to 40 of them and surface the broken ones, plus a list of images with missing or unhelpful alt text. Only the page you enter is examined — never a whole-site crawl. | `url` |
|
|
108
|
+
| `app_ogp_check` | [OGP Check (by URL)](https://apps.first-ch.com/en/ogp-check/) — Enter a URL to inspect its og: / twitter: tags and preview the X and Facebook cards. The og:image is fetched and measured, not just read from the markup. | `url` |
|
|
109
|
+
| `app_headings` | [Heading Structure (h1–h6) Extractor](https://apps.first-ch.com/en/headings/) — Enter a URL to see every h1–h6 as an indented outline in document order. Multiple h1s, skipped levels and empty headings are flagged, and the outline copies out as Markdown. | `url` |
|
|
110
|
+
| `app_structured_data` | [Structured Data (JSON-LD) Extractor & Validator](https://apps.first-ch.com/en/structured-data/) — Enter a URL to extract every JSON-LD block and pretty-print it by @type. Syntax errors are pinpointed with line and column, and required/recommended properties are listed for Article, FAQPage, BreadcrumbList, LocalBusiness and Organization. | `url` |
|
|
111
|
+
| `app_ai_access` | [AI Crawler Access Checker](https://apps.first-ch.com/en/ai-access/) — Enter a URL to fetch its robots.txt and see, bot by bot, whether GPTBot, ClaudeBot, PerplexityBot, Google-Extended, CCBot, Bytespider and others may crawl it — including the Disallow that matched, llms.txt presence and X-Robots-Tag. | `url` |
|
|
112
|
+
| `app_robots_tester` | [robots.txt Tester](https://apps.first-ch.com/en/robots-tester/) — Enter a URL and a user-agent to fetch the site's robots.txt and rule on whether that URL may be crawled, following Google's matching rules (longest match wins, ties go to Allow). The winning rule and the rules it beat are shown with line numbers, plus syntax warnings. | `url`, `userAgent?` |
|
|
113
|
+
| `app_sitemap_check` | [sitemap.xml Validator](https://apps.first-ch.com/en/sitemap-check/) — Enter a sitemap URL to fetch it, validate the XML, and see the URL count, the spread of lastmod dates and what a sitemap index points at (one level deep). Raw `&` and unclosed tags are reported with line numbers; robots.txt discovery and gzipped sitemaps are supported. | `url` |
|
|
114
|
+
| `app_hreflang` | [hreflang Return-Link Checker](https://apps.first-ch.com/en/hreflang/) — Enter a URL to extract its hreflang annotations (link rel=alternate and the HTTP Link header) and verify the return links by actually fetching each declared page. Self-reference, x-default and invalid language/region codes such as en-UK or jp are checked too. | `url` |
|
|
115
|
+
| `app_mixed_content` | [Mixed Content Checker](https://apps.first-ch.com/en/mixed-content/) — Enter a URL to list every http:// reference left inside an https page (img, script, link, iframe, video, source and CSS url()), with its line number, the offending tag and how to fix it. References browsers block are separated from the ones they auto-upgrade. | `url` |
|
|
116
|
+
| `app_image_audit` | [Page Image Audit](https://apps.first-ch.com/en/image-audit/) — Enter a URL to audit every img / picture on the page: format (WebP / AVIF adoption), loading=lazy, width/height attributes and alt text. For the first 30 images the real file size and served format are measured with a HEAD request. | `url` |
|
|
117
|
+
| `app_tech_detect` | [Tech Stack Detector](https://apps.first-ch.com/en/tech-detect/) — Enter a URL to infer the CMS (WordPress, Shopify, Wix, STUDIO and more), framework, CDN, analytics tags (GA4/GTM) and web fonts from HTML and header signatures — always with the evidence behind each guess. | `url` |
|
|
118
|
+
| `app_wp_check` | [WordPress Quick Audit](https://apps.first-ch.com/en/wp-check/) — Enter a URL to see whether the site runs WordPress, which theme it uses, the version it announces, and whether REST API username enumeration, xmlrpc.php, author archives, the default login URL, readme.html or a debug log are exposed. Read-only GETs, never enumeration. | `url` |
|
|
119
|
+
| `app_feed_check` | [RSS/Atom Feed Validator](https://apps.first-ch.com/en/feed-check/) — Enter a feed URL or a site URL: we discover the feed, fetch it, and validate its XML syntax, required elements, item list, character encoding and date formats (RFC 822 for RSS, RFC 3339 for Atom). Feeds using the itunes namespace also get the Apple Podcasts required-element check. | `url` |
|
|
120
|
+
| `app_favicon_check` | [Favicon Checker](https://apps.first-ch.com/en/favicon-check/) — Enter a URL to extract every icon declaration (favicon.ico, link rel=icon, apple-touch-icon and Web App Manifest icons), fetch each one and list its real format, dimensions (every size inside an ICO) and weight — with light and dark previews. | `url` |
|
|
121
|
+
| `app_dns` | [DNS Record Checker](https://apps.first-ch.com/en/dns/) — Enter a domain and we query Cloudflare DoH (1.1.1.1) for its A, AAAA, CNAME, MX, TXT, NS, SOA and CAA records, then check where www points, whether SPF is published exactly once, and whether CAA exists — no dig required. | `domain` |
|
|
122
|
+
| `app_dns_propagation` | [DNS Propagation Check](https://apps.first-ch.com/en/dns-propagation/) — Enter a domain and a record type; we ask five public resolvers (Cloudflare, Google, OpenDNS and more) at once and line up their answers. TTL and SOA serial separate a propagation delay from a misconfiguration. | `domain`, `type?`, `expected?` |
|
|
123
|
+
| `app_email_dns` | [Email DNS Checker](https://apps.first-ch.com/en/email-dns/) — Enter a domain and we look up MX, SPF, DKIM and DMARC. We follow every include: to count the SPF DNS lookups against the limit of ten, explain the DMARC policy, and check it all against Google's sender guidelines (2024). | `domain`, `selector?` |
|
|
124
|
+
| `app_domain_info` | [Domain Info & Expiry Checker](https://apps.first-ch.com/en/domain-info/) — Enter a domain and we query RDAP (the successor to WHOIS) for the registrar, creation date, expiry date, EPP statuses such as clientHold, and name servers. Days until expiry and renewal warnings come first. gTLD servers are resolved via the IANA bootstrap; TLDs without RDAP (including .jp) are reported as such. | `domain` |
|
|
125
|
+
| `app_domain_availability` | [Bulk Domain Availability Check](https://apps.first-ch.com/en/domain-availability/) — Enter one candidate name and we check .com, .net, .org, .jp, .co.jp, .dev, .io, .ai, .app and .co at once using RDAP and public DNS. Verdicts are three-way — registered, possibly free, inconclusive — and we never claim a name is definitely available (no affiliate links either). | `name` |
|
|
126
|
+
| `app_myip` | [IP & Request Info](https://apps.first-ch.com/en/myip/) — Shows the public IP, estimated country/city, network (ASN), HTTP/TLS details, User-Agent and main request headers of the request your machine sends to apps.first-ch.com. Handy for VPN checks. | — |
|
|
127
|
+
| `app_brand_fetch` | [Brand Fetch](https://apps.first-ch.com/en/brand-fetch/) — Enter a domain to extract the site's logo, favicons, main colours and company description. Colours are ranked by CSS frequency with contrast ratios on white and black — handy for placeholder branding in proposals and mock-ups. | `url` |
|
|
128
|
+
| `app_tone_check` | [Japanese Business Tone Check](https://apps.first-ch.com/en/tone-check/) — Paste a Japanese business email or proposal to flag phrases that may read as rude, vague, double keigo or too pushy, with drop-in rewrites and cultural pitfalls for English translation (AI-generated advice). **Rate-limited**: 5 calls per 10 minutes per IP, and 50 calls per day shared with `app_lp_persona_check`. | `text` |
|
|
129
|
+
| `app_lp_persona_check` | [LP Copy Persona Check](https://apps.first-ch.com/en/lp-persona-check/) — Paste landing page copy and pick an industry (professional services, e-commerce or B2B SaaS) to get estimated scores and comments on clarity, trust, formality and purchase intent from three simulated Japanese buyer personas (AI-generated advice, not real customer feedback). **Rate-limited**: 5 calls per 10 minutes per IP, and 50 calls per day shared with `app_tone_check`. | `text`, `industry` |
|
|
130
|
+
| `app_ja_readability_check` | [Japanese Readability Checker](https://apps.first-ch.com/en/ja-readability-check/) — Enter a URL to check the Japanese typography of its body text: one-character orphan lines, punctuation at line start, characters per line against the 35–40 guideline and missing Japanese font fallbacks, estimated for desktop and mobile. | `url`, `cpl?` |
|
|
131
|
+
| `app_faq_site_diff` | [FAQ vs Site Consistency Checker](https://apps.first-ch.com/en/faq-site-diff/) — Enter an FAQ or help page and up to three site pages to pull out prices, hours, phone numbers, dates and periods such as "within 7 days", and list every topic where the values disagree. Find outdated FAQ answers. | `faq`, `sites`[] |
|
|
132
|
+
| `app_nap_check` | [Business Name, Address & Phone Consistency Checker](https://apps.first-ch.com/en/nap-check/) — Enter up to three pages of one site to pull the business name, address, phone and opening hours from the text, footer, tel: links and JSON-LD, and list formatting variants and possible mismatches between pages and structured data. Groundwork for local SEO. 10 calls per 10 minutes per IP. | `urls`[] |
|
|
133
|
+
|
|
134
|
+
See [`server.mjs`](./server.mjs) for the exact Zod input schemas of the local tools and [`apps.mjs`](./apps.mjs) for the `app_*` tools.
|
|
87
135
|
|
|
88
136
|
**PDF output (`marp_render`) needs a local Chrome/Chromium.** marp-core renders the HTML with no browser dependency (so the package stays light for `npx`); PDF is produced by driving a locally-installed Chrome/Chromium in headless mode. It is auto-detected on common paths, or set `MARP_CHROME_PATH` to the executable. If none is found, `marp_render` returns the HTML only and reports `pdf_skipped` — you can still open that HTML and print → PDF yourself (one slide per page).
|
|
89
137
|
|
|
90
138
|
## Network access, files and privacy
|
|
91
139
|
|
|
92
|
-
- **
|
|
93
|
-
- **
|
|
140
|
+
- **Local tools vs. `app_*` tools.** Every tool without the `app_` prefix runs entirely on your machine and sends nothing anywhere. **The `app_*` tools are the exception by design: each call sends its input (the URL, domain name, DKIM selector or text you pass) to First CH's server at apps.first-ch.com**, which processes it and returns the result. The apps store neither the input nor the result; the AI apps (`app_tone_check`, `app_lp_persona_check`) pass the text to Cloudflare Workers AI and keep only a per-day call count (no text, no IP) to enforce the daily cap. Like any web request, the call reveals your public IP address to apps.first-ch.com (hosted on Cloudflare); it is used only for in-memory per-IP rate limits and is not stored. The apps that check a site fetch that site from First CH's server. The User-Agent is `first-ch-tools-mcp/<version>`. Don't pass anything confidential to an `app_*` tool, and stick to the local tools when nothing may leave your machine. `FIRSTCH_APPS_BASE_URL` overrides the base URL (for testing).
|
|
141
|
+
- **The local tools make no network requests.** The only exceptions are `npx` downloading the package from the npm registry, and `marp_render` with `allowRemote: true` (your local Chrome/Chromium then fetches the remote images/stylesheets your Markdown references). By default `marp_render` loads no web fonts, keeps emoji as text, strips remote `@import`s from the built-in themes and runs Chrome with network access blocked and its sandbox enabled (`MARP_CHROME_NO_SANDBOX=1` opts out where the sandbox cannot start, e.g. root in a container).
|
|
142
|
+
- **No overwriting.** Tools that write files (`outputPath`/`outputDir`, `webp_convert`, `marp_render`) refuse to replace an existing file unless you pass `overwrite: true`. They are annotated `readOnlyHint: false` / `destructiveHint: true`; every other tool is `readOnlyHint: true`. The `app_*` tools (and `marp_render`) are annotated `openWorldHint: true` because they reach the network. `marp_render` without any path writes to `<OS temp dir>/firstch-tools-mcp/`; the server never deletes result files.
|
|
94
143
|
- Privacy policy: [plugins/firstch-tools/PRIVACY.md](./plugins/firstch-tools/PRIVACY.md). Bugs and questions: [GitHub Issues](https://github.com/First-CH/firstch-tools-mcp/issues).
|
|
95
144
|
|
|
96
145
|
## Telemetry
|
|
97
146
|
|
|
98
|
-
Nothing is logged by default. Usage is recorded **only** when you set the `FIRSTCH_TOOLS_USAGE_LOG` environment variable to a file path — each tool call then appends one JSON line (`{ ts, tool, source }`) to that local file.
|
|
147
|
+
Nothing is logged by default. Usage is recorded **only** when you set the `FIRSTCH_TOOLS_USAGE_LOG` environment variable to a file path — each tool call then appends one JSON line (`{ ts, tool, source }`) to that local file. The log itself is never transmitted; if the variable is unset, no file is written. (This covers usage logging only — the `app_*` tools still send their input to apps.first-ch.com as described above.)
|
|
99
148
|
|
|
100
149
|
## Web version
|
|
101
150
|
|
|
102
|
-
The same algorithms are also available as a free, no-install browser tool at **[tools.first-ch.com](https://tools.first-ch.com)** — useful when you want a UI instead of an MCP call, or want to hand a link to someone without an MCP client.
|
|
151
|
+
The same algorithms are also available as a free, no-install browser tool at **[tools.first-ch.com](https://tools.first-ch.com)** — useful when you want a UI instead of an MCP call, or want to hand a link to someone without an MCP client. The `app_*` tools correspond one-to-one to the web apps at **[apps.first-ch.com](https://apps.first-ch.com)**.
|
|
103
152
|
|
|
104
153
|
## Vendor sync (WebP codec)
|
|
105
154
|
|
|
@@ -120,10 +169,12 @@ Both license files are included verbatim in the published npm package, as requir
|
|
|
120
169
|
|
|
121
170
|
```bash
|
|
122
171
|
npm ci
|
|
123
|
-
npm test # unit tests (
|
|
124
|
-
node e2e.mjs # stdio smoke test: spawns server.mjs, lists tools, calls a
|
|
172
|
+
npm test # unit tests (test.mjs) + app_* tests with a mocked fetch (test-apps.mjs; no network)
|
|
173
|
+
node e2e.mjs # stdio smoke test: spawns server.mjs, lists tools, calls handlers (app_* against a local fake API)
|
|
125
174
|
```
|
|
126
175
|
|
|
176
|
+
`test-apps.mjs` also checks that `apps.mjs` matches `functions/_shared/apps-registry.ts` of the FirstCHApps repository when it is checked out next to this one (or at `FIRSTCH_APPS_REPO`); otherwise that check is skipped.
|
|
177
|
+
|
|
127
178
|
CI runs both on Node 24, plus a vendor checksum check and a published-tarball content check — see [`.github/workflows/ci.yml`](./.github/workflows/ci.yml).
|
|
128
179
|
|
|
129
180
|
Release rule: a push to `main` automatically publishes a new package version through npm Trusted Publishing (OIDC) after every CI gate passes. No `NPM_TOKEN`, `npm login`, OTP, or manual approval is used. The workflow verifies npm propagation and creates the matching `vX.Y.Z` tag. Package changes must bump every synchronized version field; if a version already exists with different package contents, CI fails instead of overwriting it. CI-only changes with identical package contents safely skip publishing.
|
|
@@ -132,7 +183,9 @@ Release rule: a push to `main` automatically publishes a new package version thr
|
|
|
132
183
|
|
|
133
184
|
## 日本語
|
|
134
185
|
|
|
135
|
-
`@first-ch/tools-mcp` は、[First CH Tools](https://tools.first-ch.com)(無料Webツール集)の計算ロジック — WCAGコントラスト比・日本語文字数/Xウェイト計測・WebP変換・JSON-LD生成・llms.txt生成・文字コード/改行コード変換・Marp Markdown→スライド レンダリング・テストデータ生成・テキスト/コード差分・Cron式の解説・Base64/Data URI変換・URLパラメータの分解/編集/再構築・HTML特殊文字のエスケープ/エンティティのデコード・JSON⇄YAMLの相互変換・px⇄rem/emの単位換算とCSSの一括変換・カラーコードの相互変換とアルファ透過の合成・MD5/SHA-1/SHA-256/SHA-384/SHA-512のハッシュ生成と照合・JWTのデコードと有効期限/署名の検証・User-Agent文字列の解析とデバイス判定・UUID v4 / ULIDの一括生成・アスペクト比の計算とレスポンシブサイズの算出・camelCase / snake_case / kebab-case などの文字列ケース変換・CSV/TSV ⇄ JSON の相互変換・日数/営業日の計算(日本の祝日を内蔵)・HTML→Markdownの変換・和暦⇄西暦の変換と満年齢の計算・日本語タイトルからのURLスラッグ生成 — をAIエージェント(Claude Code等)向けMCP
|
|
186
|
+
`@first-ch/tools-mcp` は、[First CH Tools](https://tools.first-ch.com)(無料Webツール集)の計算ロジック — WCAGコントラスト比・日本語文字数/Xウェイト計測・WebP変換・JSON-LD生成・llms.txt生成・文字コード/改行コード変換・Marp Markdown→スライド レンダリング・テストデータ生成・テキスト/コード差分・Cron式の解説・Base64/Data URI変換・URLパラメータの分解/編集/再構築・HTML特殊文字のエスケープ/エンティティのデコード・JSON⇄YAMLの相互変換・px⇄rem/emの単位換算とCSSの一括変換・カラーコードの相互変換とアルファ透過の合成・MD5/SHA-1/SHA-256/SHA-384/SHA-512のハッシュ生成と照合・JWTのデコードと有効期限/署名の検証・User-Agent文字列の解析とデバイス判定・UUID v4 / ULIDの一括生成・アスペクト比の計算とレスポンシブサイズの算出・camelCase / snake_case / kebab-case などの文字列ケース変換・CSV/TSV ⇄ JSON の相互変換・日数/営業日の計算(日本の祝日を内蔵)・HTML→Markdownの変換・和暦⇄西暦の変換と満年齢の計算・日本語タイトルからのURLスラッグ生成 — をAIエージェント(Claude Code等)向けMCPツールとして提供するサーバーです。これらは全て端末内で処理します。
|
|
187
|
+
|
|
188
|
+
あわせて、[apps.first-ch.com](https://apps.first-ch.com) のWebアプリ33本(GEO・メタタグ・セキュリティヘッダー・SSL証明書・DNS/メールDNS・リダイレクト・リンク切れ・構造化データ・AIクローラー許可・和文可読性・AIによるビジネス文面/LP文言のチェックなど)を呼ぶ **`app_*` ツール**も提供します。**`app_*` ツールは入力(URL・ドメイン名・文面)を apps.first-ch.com のサーバーへ送り**、アプリの API が返した JSON を返します(端末内で完結する他のツールとはここが違います)。詳しくは [通信・ファイル・プライバシー](#通信ファイルプライバシー) を参照してください。
|
|
136
189
|
|
|
137
190
|
### インストール
|
|
138
191
|
|
|
@@ -205,31 +258,78 @@ claude mcp add firstch-tools -- npx -y @first-ch/tools-mcp
|
|
|
205
258
|
| `csv_convert` | CSV/TSVとJSON配列を相互変換する。tools.first-ch.com/csv-json/ と同一ロジック。表計算ソフトから書き出した表をAPIに渡せるJSONにする、逆にAPIの応答をExcelで開ける表にする、という**手持ちのデータを形式だけ移し替える**ための道具。`direction` を省くと、入力の先頭が `[` か `{` なら `json2csv`、そうでなければ `csv2json` と推定する。区切り文字は先頭20行で「どの記号が各行に同じ個数だけ現れるか」を見て自動判定し、`delimiter` で固定もできる。**`stock.qty` のような列名は入れ子のオブジェクトとして読み書きし、`tags.0` / `tags.1`(`tags[0]` も同義)は配列になる**。逆向きも同じ規則で平らにするので、CSVへ出してJSONへ戻すと元の構造に復元される(`nest: false` なら入れ子はJSONの文字列としてセル1つに入る)。**型の読み替えは「一度数値にして文字列へ戻したとき元の表記と1文字も違わないか」で決める**ため、`0123`・`+1`・`1.50`・2の53乗を超えるID(`12345678901234567890`)は文字列のまま残り、郵便番号・電話番号・伝票番号・バージョン番号が壊れない。読み取りは RFC 4180 準拠で、引用符・`""` エスケープ・セル内改行・CRLF・BOM に対応する(書き出し側は Excel 向けに `bom` と `newline` を選べる)。JSONは配列・単体のオブジェクト・`{"data":[…]}` のように配列を包んだもの・1行1件のJSON Lines を受け取れる。**JSONの構文エラーは例外にせず、行・桁と前後の抜粋を持つ `ok: false` の結果として返す**ので、応答そのものが直しどころになる。`notes` では、列数が見出しと合わない行・重複した列名(`name_2` として残す)・空の見出し(`column4` を割り当てる)・桁落ちする数値・`=` `+` `-` `@` で始まり表計算ソフトが数式として実行しうるセル(CSVインジェクション)・キーの並びが揃わないオブジェクトを指摘する | `text?` または `path?`、`outputPath?`、`direction?`(既定 `auto` / `csv2json` / `json2csv`)、`delimiter?`(既定 `auto` / `comma` / `tab` / `semicolon` / `pipe`)、`header?`、`nest?`、`types?`、`trim?`、`emptyNull?`、`indent?`(既定 `2` / 0〜8 / `tab`)、`newline?`(既定 `lf` / `crlf`)、`quoteAll?`、`bom?`、`lang?`(既定 `ja` / `en`) |
|
|
206
259
|
| `zenkaku_convert` | 英数字・カタカナ・記号・スペースを**文字種ごとに向きを選んで**全角⇄半角へ変換し、あわせて空白まわりを掃除する。tools.first-ch.com/zenkaku/ と同一ロジック。顧客支給原稿の表記統一、CSV取り込み前の正規化、フォーム入力値の掃除のための道具。`alnum` / `kana` / `symbol` / `space` にそれぞれ `keep`(そのまま)/ `han`(半角へ)/ `zen`(全角へ)を渡す。既定は日本語の原稿で最も多い「英数字・記号・スペースは半角、カタカナは全角」(`preset: 'ja'` と同じ)。`preset` は `ja` / `csv`(`ja` に空白の掃除と見えない文字の除去を足したもの)/ `han` / `zen` で、個別指定が優先される。**半角カタカナは1文字ではない**ため、半角→全角では次が濁点なら1文字へ合成し(`ガ`→`ガ`・`パ`→`パ`・`ヴ`→`ヴ`)、全角→半角では2文字へ分解する。句読点・カギ括弧・中黒・長音(`。 、 「 」 ・ ー`)は半角カタカナのブロック(U+FF61〜U+FF9F)に同居しているので**カタカナと同じ文字種**として扱う(`kana: 'han'` は `「テスト」。` を `「テスト」。` にする。句読点を全角で残すなら `keep`)。スペースは U+3000 ⇄ U+0020 に加え、NBSP や欧文の各種スペースも半角側へ寄せる。掃除は `collapseSpaces`(連続する空白を先頭の1文字へ)・`trimLines`・`blankLines`(`keep` / `collapse` / `remove`)・`removeInvisible`(ゼロ幅・BOM・制御文字)・`composeMarks`(NFC。`ガ` が `カ`+結合文字 U+3099 で書かれた原稿向け)。**改行コード(LF/CRLF)とタブ、ひらがな・漢字は書き換えない。** `notes` では出力に残った半角カナ・全角スペース・見えない文字・結合文字の濁点に加え、波ダッシュ `〜`(U+301C)/全角チルダ `~`(U+FF5E)と環境依存文字(`① ㈱ Ⅲ`)を指摘する(後の2つはどちらへ寄せるべきかが届け先で変わるため**指摘のみで自動変換しない**)。**NFKC正規化とは別物**で、`①` が `1` になることはなく、選んだ文字種しか触らない。`inspect: true` なら変換せず点検結果だけを返す | `text?` または `path?`、`outputPath?`、`preset?`(`ja` / `csv` / `han` / `zen`)、`alnum?`、`kana?`、`symbol?`、`space?`(いずれも `keep` / `han` / `zen`)、`collapseSpaces?`、`trimLines?`、`blankLines?`(既定 `keep` / `collapse` / `remove`)、`removeInvisible?`、`composeMarks?`、`inspect?`、`lang?`(既定 `ja` / `en`) |
|
|
207
260
|
| `cidr_calc` | CIDR表記・サブネットマスク・ACLのワイルドカードマスク・単体のIPから、ネットワークアドレス・ブロードキャスト・使えるホストの範囲・アドレス数とホスト数・逆引きゾーン・2進表記を返す。tools.first-ch.com/cidr/ と同一ロジック。サーバー設定・ファイアウォール・Basic認証の許可リストを書くときのサブネット計算のための道具。**IPv4とIPv6の両対応**で、`::` の省略・末尾のIPv4表記(`::ffff:192.168.0.1`)・`[...]` 囲み・`%zone` を読み、出力は RFC 5952 に従う。`192.168.1.5 255.255.255.0` や `192.168.1.5/0.0.0.255`(ACLの書き方)も同じ入力欄で受け取る。**ホスト数の例外も織り込む**: `/31` は点対点リンクとして2アドレスとも使え(RFC 3021)、`/32` は1台、IPv6にブロードキャストは無い。渡したアドレスのホスト部にビットが立っていれば、`notes` で**設定ファイルに書くべき本来のCIDR**を返す。**先頭に0の付いたオクテット(`192.168.001.1`)は受け取らない**(8進数として読む実装があり、同じ表記が別のアドレスになるため)。アドレス帯は IANA の主要な予約ブロック(プライベート・CGNAT・ループバック・リンクローカル・文書用・マルチキャスト・ULA ほか)と照合して種別を返し、ネットワークがその帯からはみ出す場合も指摘する。`split` はそのプレフィックス長で均等に割った一覧、`contains` は各アドレスがそのネットワークに入るかの判定、`range` は `10.0.0.5 - 10.0.0.200` のような範囲(CIDR・単体IPと混ぜて1行1件か `;` 区切り)を**重なりと隣接をまとめたうえで過不足なく覆う最小個数のCIDR**へ逆算する。計算はすべてBigInt | `cidr?` と/または `range?`、`split?`(プレフィックス長)、`contains?`(文字列の配列)、`limit?`(1〜4096・既定 256)、`lang?`(既定 `ja` / `en`) |
|
|
208
|
-
|
|
209
261
|
| `date_calc` | 2つの日付の間の日数・営業日数、起点日から N日後/N営業日後の期日、締め日と支払サイトからの支払日を計算する。tools.first-ch.com/date-calc/ と同一ロジック。納期・検収期限・支払サイトの確認のための道具。**営業日は「土日・日本の祝日・指定した休業日を除いた日」**で、祝日は内閣府「国民の祝日について」の一覧をパッケージに同梱している(1970年〜2027年)ため、ハッピーマンデーで動く祝日・日曜と重なったときの振替休日・前後を祝日に挟まれた国民の休日(2026-09-22)・年によって変わる春分の日/秋分の日がすべて計算に入る。`mode="between"` は暦日数・営業日数・休みの内訳・期間内の祝日一覧を返す。`mode="add"` は `base` から `n`(負なら過去へ)を `unit` の単位で進めた期日と、飛ばした休みの一覧を返す。**「受領後10営業日」は初日を数えるかで1日ずれる**ので、民法の原則どおり翌日起算を既定とし、`include_start=true` で起点日を1日目として数える。`mode="payment"` は `invoice`・`closing`・`pay_months`・`pay_day` から支払日を求め、休みに当たったら `pay_adjust`(既定 `prev`=前営業日へ繰り上げ・日本の商慣習)で寄せる。週の休み・年末年始・自社の休業日・休日出勤も指定できる。日付は「1970-01-01からの通算日」の整数で扱うのでサーバーのタイムゾーンで1日ずれない | `mode?`(`between` / `add` / `payment`)、`start?`、`end?`、`base?`、`n?`、`unit?`(既定 `business` / `days` / `weeks` / `months` / `years`)、`include_start?`、`adjust?`、`invoice?`、`closing?`(既定 `eom` / 1〜31 / `none`)、`pay_months?`、`pay_day?`、`pay_adjust?`、`weekend?`、`holidays?`、`year_end?`、`closed_dates?`、`work_dates?`、`lang?` |
|
|
210
|
-
|
|
211
262
|
| `html_to_markdown` | HTML断片をMarkdownへ変換する。tools.first-ch.com/html-md/ と同一ロジック。取得したページの本文をLLMへ渡す前の後処理、既存サイトの原稿をMarkdown管理へ移す移行作業のための道具。見出し(h1〜h6)・段落・改行・強調・取り消し線・リスト(入れ子・`start` 属性・チェックボックス)・表(thead / caption と `align`・`text-align` による列の配置)・リンク・画像・コードブロック(`class="language-*"` から言語を拾う)・引用・水平線・定義リスト・figure / figcaption・details / summary に対応し、`script`・`style`・`hidden` や `display:none` の要素・装飾のための `div` / `span` は自動で取り除く。**HTMLの解釈にブラウザのDOMを使っていない**——字句解析も木の組み立ても自前なのでWeb版と結果が一致し、閉じ忘れたタグは末尾で閉じ、行き場のない閉じタグは捨てて変換を続ける(補った件数は必ず `notes` で返す)。**属性の引用符が閉じていない場合だけは打ち切る**——続けると残りの文書全体を1つの属性値として飲み込むため。**Markdownに書けないものは黙って捨てず報告する**: セルの結合(`colspan` は空セルで埋め、`rowspan` は先頭行にだけ値が入る)・セル内のリスト/コードブロック(その表だけHTMLのまま残す)・定義リスト(Markdown Extra の `: ` 記法)・`sup` / `sub` / `mark` / `iframe` / `svg`(`unknown` で「HTMLのまま残す/文字だけ残す/取り除く」を選ぶ)。表・タスクリスト・取り消し線はGFMの拡張なので `gfm=false` で切れる。`base_url` を渡すと相対URLのリンクと画像を絶対URLへ直し(移行でいちばん壊れるところ)、`main_only=true` は `main` / `article` の中だけを取り出して `header`・`nav`・`footer`・`aside`・`form` を落とす。ネットワークへは出ない(ページの取得は呼び出し側の仕事) | `html?` または `path?`、`outputPath?`、`main_only?`、`base_url?`、`gfm?`、`escape?`、`pad_tables?`、`headings?`(既定 `atx` / `setext`)、`bullet?`(`-` / `*` / `+`)、`code_block?`(`fenced` / `indented`)、`links?`(`inline` / `reference` / `strip`)、`images?`(`keep` / `alt` / `drop`)、`tables?`(`gfm` / `html`)、`unknown?`(`keep` / `text` / `drop`)、`br?`(`spaces` / `backslash` / `html` / `space`)、`lang?`(既定 `ja` / `en`) |
|
|
212
|
-
|
|
213
263
|
| `wareki_convert` | 和暦(令和・平成・昭和・大正・明治)と西暦を相互に変換し、曜日と干支を返す。tools.first-ch.com/wareki/ と同一ロジック。契約書・請求書・行政書類の日付の変換と検算のための道具。`mode="convert"` は `date` か `dates`(1000件まで)を受け、**西暦か和暦かを自動で見分ける**(`2026-10-01`・`2026/10/1`・`20261001`・`2026年10月1日`・`令和8年10月1日`・`R8.10.1`・`令和八年十月一日`・`㋿8.10.1`・`Reiwa 8` など)。年だけ(`1989`・`昭和64年`)・年月だけ(`2019-05`)も変換でき、改元をまたぐときは両方の元号を返す。`formats` に和暦(元年表記・曜日つき・漢数字)・略記(`R8.10.1`/`R08.10.01`)・西暦・ISO 8601・英語を返す。**存在しない和暦(平成32年・平成31年5月1日・令和元年4月30日)も西暦へ直したうえで正しい和暦を `notes` で指摘**し、書き添えの曜日が実際と違えば `WEEKDAY_MISMATCH` を返す。**明治5年(1872年)以前は旧暦のため年単位でだけ換算する**(`LUNAR_CALENDAR`)。`mode="age"` は `birth`(和暦可)と `reference`(省略時は日本時間の今日)から満年齢(誕生日に1つ増え、2月29日生まれは平年だと3月1日)・年月日の内訳・数え年・次の誕生日と、小学校〜大学の入学・卒業の年を返す。`mode="eras"` は元号一覧を返し、`from_year` / `to_year` を渡すと和暦・干支・満年齢の早見表も返す(500年分まで)。日付の書き方の誤りは `ok: false` と `error.code` で返す | `mode?`(`convert` / `age` / `eras`)、`date?`、`dates?`、`birth?`、`reference?`、`from_year?`、`to_year?`、`lang?`(既定 `ja` / `en`) |
|
|
214
264
|
| `slug_generate` | 日本語の記事タイトルから WordPress 等の URL スラッグを作る。tools.first-ch.com/slug/ と同一ロジック。かなをヘボン式ローマ字にし(`し→shi`・`ち→chi`・`つ→tsu`・`ふ→fu`・`じ→ji`・`しゃ→sha`・促音は子音を重ねて `kitte`/ch の前は `matcha`・`ん` は常に `n`・`ファ→fa`・`ティ→ti`・`ヴァ→va`)、記号を除いてハイフン(`separator="snake"` ならアンダースコア)でつなぎ小文字にする。結果は `a-z`・`0-9`・区切り文字だけ。**漢字の読みは推定しない**: `reading` にかなで読みを渡すと `title` の代わりにそこから作る(`reading` の空白が区切りになる: `とうきょう で たべた ラーメン 10せん` → `tokyo-de-tabeta-ramen-10-sen`)。読みの無い漢字は飛ばして `skipped` と `KANJI` の指摘で返す。区切りは記号・漢字・かな⇄英数字の切り替わりと、`splitKatakana`(既定 true)ならひらがな⇄カタカナの切り替わり。`longVowel="omit"`(既定)は おう・おお・うう と ー を1字にし(`tokyo`・`ramen`。えい・いい は残す)、`"keep"` は `toukyou`・`raamen`。助詞の は・へ・を は字のとおり `ha`・`he`・`o`。`maxLength` は語の切れ目で切る。数字だけのスラッグ(日付アーカイブと衝突し WordPress が `-2` を付けうる)と60文字超を指摘する。`variants` に区切り×長音の4通り、`items` で1000件まで一括・同じスラッグの衝突を `DUPLICATE` で指摘 | `title?`、`reading?`、`items?`(文字列か `{title, reading}`)、`separator?`(既定 `kebab` / `snake`)、`longVowel?`(既定 `omit` / `keep`)、`maxLength?`(0〜200・0=無制限)、`splitKatakana?`、`lang?`(既定 `ja` / `en`) |
|
|
265
|
+
| `htpasswd_generate` | Basic認証用の htpasswd の行を作る。tools.first-ch.com/htpasswd/ と同一ロジック。ステージングサイトや納品前の確認環境にパスワードを掛けるための道具。ハッシュは bcrypt(`$2y$`・Apache の `htpasswd -B` と同じ・既定コスト5)か apr1-md5(`$apr1$`・Apache 2.2 など bcrypt を読めない環境向け)。1人なら `user` と `password`、まとめて作るなら `users`(`"user:pass"` の文字列か `{user, password}`)か `bulk`(1行1人の `ユーザー名:パスワード`・`#` で始まる行と空行は飛ばす)を渡す(200人まで)。**パスワードが空のユーザーは16文字のパスワードを自動生成して `generated` で返す**(紛らわしい字 0 O o 1 l I を除いた CSPRNG)。渡されたパスワードは結果に繰り返さない。`:` を含む・空・255バイト超のユーザー名は飛ばし、重複・12文字未満・ユーザー名と同じ・前後の空白・全角文字・bcrypt の72バイト超を `notes` で指摘する。`server`(`apache` / `nginx`)を渡すと `.htaccess` か nginx の設定スニペットも返す(`file`・`realm`・認証なしで通す `ips`〔IPv4 / IPv6 / CIDR〕を反映。空白を含むパスは引用し、読めないIPは外して指摘)。`mode="verify"`(または `hash` だけ)で既存の htpasswd の1行・ハッシュとパスワードを照合する(`$2y$` / `$2b$` / `$2a$`・`$apr1$`・`$1$`・`{SHA}`。コスト15以上の bcrypt は計算しない)。`outputPath` を渡すとファイルへ書き出す。パスワードはどこにも記録しない | `user` + `password`、または `users[]` / `bulk`、`algo?`(既定 `bcrypt` / `apr1`)、`cost?`(4〜14・既定 5)、`server?`(`apache` / `nginx`)、`file?`、`realm?`、`ips?`、`mode?`(`generate` / `verify`)、`hash?`、`outputPath?`、`lang?`(既定 `ja` / `en`) |
|
|
266
|
+
| `openapi_doc_generate` | OpenAPI 3.x / Swagger 2.0 の仕様書(YAML か JSON)から、日本語(`lang: "en"` で英語)の Markdown APIリファレンスと TypeScript の型定義を作る。tools.first-ch.com/openapi-doc-gen/ と同一ロジック。Markdown はベースURL・エンドポイント一覧・タグごとのパラメータ/リクエスト/レスポンスの表とスキーマ一覧を含み、例が書かれていないレスポンスにはスキーマから例を作る(`examples: false` で切る)。TypeScript は `components.schemas`(Swagger は `definitions`)を interface / type にし、`operations`(既定 true)でエンドポイントごとの `Params` / `RequestBody` / `Response` の型も出す。`$ref`・`allOf` / `oneOf` / `anyOf`・`enum`・`nullable`・`additionalProperties` に対応し、予約語や重複する名前は付け替えて `notes` で知らせる。**別ファイル・URLを指す `$ref` は読みに行かない**(`unknown` にして `OA_EXTERNAL_REF` で指摘)。YAML/JSON の解析は `json_to_yaml` と同じ自前パーサ(「- 」で始まる折り返し行も description の続きとして読む点だけ違う)。構文の誤りは `ok: false` とコード・行・桁・抜粋で返す。`outputDir` を渡すと `<タイトル>.md` と `<タイトル>.ts` を書き出す。20MBまで | `spec` か `path`(絶対パス)、`lang?`(`ja` \| `en`)、`examples?`、`operations?`、`output?`(`both` \| `markdown` \| `typescript`)、`outputDir?` |
|
|
267
|
+
| `faq_jsonld_generate` | 質問と回答から schema.org の FAQPage 形式の JSON-LD・同じ内容の Markdown・貼り付け用の HTML(details / summary)を同時に作る(tools.first-ch.com/faq-jsonld/ と同一ロジック)。`jsonld_generate`(type=faqpage)と違い、回答を「空行で段落・`- ` / `1. ` で箇条書き・`[文字](URL)` と裸のURLはリンク」として HTML にし、「Q: / A:」や「## 見出し」でまとめて書いた文章も質問と回答に分ける。重複した質問・使えないリンク(javascript:)・相対リンクを指摘し、`</script` で JSON-LD が途切れないようエスケープする | `items[]`(`{q, a}`)と/または `bulk`、`title?`、`level?`(2/3)、`answer_format?`(`html` / `text`)、`wrap_script?`、`exclusive?`、`lang?` |
|
|
268
|
+
| `lines_process` | 1行1項目のテキストを整える。tools.first-ch.com/lines/ と同一ロジック。キーワード・URL・メールアドレス・商品名の一覧の重複削除や並べ替え、箇条書き化のための道具。**適用順は固定で各1回**: `trim`(前後の半角/全角空白・タブ・NBSP) → `removeBlank`(空行と空白だけの行) → `dedupe`(`dedupeMode`: `first`=最初の1行を残す / `unique`=重複した行は1行も残さない / `dupes`=重複した行だけを1行ずつ。`ignoreCase` で大文字小文字を区別しない) → `sort`(`asc` / `desc` / `reverse` / `shuffle`。`asc`・`desc` は `numeric`〔既定 true〕で `item2 < item10`・`-3 < 1.25 < 10` と数を数として比べ、数値の行を文字の行より前に置く。照合は日本語の `Intl.Collator`) → `prefix` / `suffix` → `number`(`start`・`sep`: `dot` / `paren` / `colon` / `bracket` / `tab` / `space`・`pad` でゼロ埋め。接頭辞の外側に付く)。`preset`(`uniqsort`=トリム+空行除去+重複削除+昇順 / `clean` / `numbered` / `mdlist`=`- ` の箇条書き / `shuffle`)は Web版のボタンと同じ設定から始め、個別の引数で上書きできる。`shuffle` は `seed`(0〜4294967295)で同じ並びを再現でき、無ければ暗号学的乱数で混ぜる。改行コードは入力の最初のものに揃え、末尾の改行も保つ。どの行が何回出たか(`duplicates`)と、前後の空白・大文字小文字・全角半角だけが違う組を `notes` で返す。`text` か `path` を渡し、`outputPath` でファイルへ書き出せる | `text` または `path`、`outputPath?`、`preset?`、`trim?`、`removeBlank?`、`dedupe?`、`dedupeMode?`、`ignoreCase?`、`sort?`、`numeric?`、`seed?`、`prefix?`、`suffix?`、`number?`、`start?`、`sep?`、`pad?`、`lang?`(既定 `ja` / `en`) |
|
|
269
|
+
| `dpi_calc` | 印刷サイズ ⇄ ピクセル数(tools.first-ch.com/dpi/ と同一ロジック)。`size`: 用紙(A0〜A6・B1〜B6〔JIS〕・名刺・はがき・L判・レターなど28種、または自由なmm)× dpi(既定350)× 塗り足し(既定3mm)から必要なピクセル数(端数は切り上げ)・非圧縮のデータ量・入稿メモ・指摘(dpi不足・塗り足しなし・安全な範囲・PSDの30,000px上限)。`reverse`: 画像のピクセル数から印刷サイズと用紙ごとの実効dpi(有利な向きを選ぶ)・判定・350dpiに必要なピクセル数。`table`: 早見表(テキスト/Markdown/CSV)。`units`: mm・cm・inch・px・pt・級(Q)の換算 | `mode?`, `paper?` / `widthMm`+`heightMm`, `dpi?`, `bleedMm?`, `width`+`height`(px), `format?`, `value`+`from?`, `lang?` |
|
|
270
|
+
| `serp_check` | title / meta description / URL が Google 検索結果に収まるかを、文字数ではなく**ピクセル幅**で判定する(tools.first-ch.com/serp/ の判定部分と同一ロジック・プレビュー描画は除く)。パソコン=幅600px・タイトル20px×1行・説明文14px×2行、スマートフォン=380px・2行/3行。和文は文字単位・欧文は単語単位で禁則つきで折り返し、表示される行・切り詰められる部分・幅と上限・文字数・状態(ok / cut / short / empty)・指摘(未入力・切り詰め・短い・サイト名の区切りが無い・https でない・階層が深い・%エンコード)・パンくず表示・貼り付け用タグを返す。幅は近似(Arial の字幅表+和文1em・カーニングなし)で、ブラウザの実測より数px広く出ることがある | `title?`・`description?`・`url?` か `items[]`(500件まで)、`device?`(`desktop` / `mobile` / `both`)、`lang?` |
|
|
271
|
+
| `css_layout_generate` | Flexbox / CSS Grid の指定から、コピーして使える CSS と HTML を作る(tools.first-ch.com/css-layout/ と同一ロジック)。既定値と同じ宣言は書かず、同じトラックは repeat() に畳む。grid-template-areas を検証し(行ごとのマス数・名前が長方形か・使えない名前・列トラック数との食い違い)、名前ごとの grid-area を出す。効かない組み合わせ(flex-grow と justify-content・nowrap の align-content・1fr で余白が無い)と落とし穴(min-width: auto のあふれ・1fr の最小値・reverse/dense の読む順)を notes で指摘。定番8種のプリセット | `mode?`(`flex` / `grid` / `presets`), `preset?`, flex: `direction?`・`wrap?`・`justifyContent?`・`alignItems?` ほか、grid: `columns?`・`rows?`・`areas?`・`autoFit?`・`flow?` ほか、`gap?`, `count?`, `items?`, `lang?` |
|
|
272
|
+
|
|
273
|
+
#### apps のツール(`app_*`・apps.first-ch.com へ送信)
|
|
215
274
|
|
|
216
|
-
|
|
275
|
+
**既定では無効です。** 入力を apps.first-ch.com へ送るため、環境変数 `FIRSTCH_ENABLE_APPS=1` で明示的に有効にしたときだけ登録されます(例: `claude mcp add firstch-tools -e FIRSTCH_ENABLE_APPS=1 -- npx -y @first-ch/tools-mcp`)。指定しなければ、すべてのツールが端末内で動き、どこにも送信しません。
|
|
276
|
+
|
|
277
|
+
各 `app_*` ツールは、アプリ1本の公開 JSON API(`POST https://apps.first-ch.com/<slug>/api/<action>`・認証なし。一覧は [llms.txt](https://apps.first-ch.com/llms.txt))を呼び、応答の JSON をそのまま返します。**入力は apps.first-ch.com へ送られてそこで処理され、入力も結果もサーバーには保存されません。** 対象サイトを取得するアプリは First CH のサーバーから相手のサイトへアクセスするので、相手側には apps.first-ch.com からのアクセスとして記録されます。全ての `app_*` ツールは `lang?`(既定 `ja`/`en`)で判定・エラー文の言語を選べます。待ち時間は30秒(重いアプリと AI のアプリは60秒)。入力の不備・相手サイトに届かない・回数制限などの API エラーは、アプリの `error` コードと `message` を含むツールのエラーとして返ります。
|
|
278
|
+
|
|
279
|
+
| ツール | アプリと内容 | 主な入力 |
|
|
280
|
+
| --- | --- | --- |
|
|
281
|
+
| `app_geo` | [GEO簡易チェッカー](https://apps.first-ch.com/geo/) — URLのページが AI検索(ChatGPT・Perplexity・Gemini・AI Overviews)に引用されやすい構造かを6軸100点で診断し、軸ごとの点数・グレード・見つかった JSON-LD の型・AIクローラーの拒否状況・改善点を返す。 | `url` |
|
|
282
|
+
| `app_meta_check` | [メタタグ・SEO基本診断](https://apps.first-ch.com/meta-check/) — URLのページの title・meta description・canonical・robots・h1・OGP・lang・viewport を取得して合否つきで返す。文字数(title 全角32字・description 100〜170字)と robots.txt のクロール可否も判定する。 | `url` |
|
|
283
|
+
| `app_headers` | [セキュリティヘッダー採点](https://apps.first-ch.com/headers/) — URLの応答の CSP・HSTS・X-Content-Type-Options・X-Frame-Options・Referrer-Policy・Permissions-Policy を100点満点で採点し、A〜Fの評価・各ヘッダーの値・解説と推奨設定例を返す。 | `url` |
|
|
284
|
+
| `app_ssl` | [SSL/TLS証明書チェッカー](https://apps.first-ch.com/ssl/) — ホスト名へサーバー側から実際に TLS 接続し、配信中の証明書の有効期限・残り日数・発行者・SAN・中間証明書のチェーンを返す(期限30日切れで警告)。接続できないときは CT ログの記録から読む。 | `host` |
|
|
285
|
+
| `app_redirect_trace` | [リダイレクトチェーン追跡](https://apps.first-ch.com/redirect-trace/) — URLから 301・302・307・308・meta refresh の転送を1ホップずつ追跡し(最大5回)、各ステップのステータス・URL・所要時間と最終到達URLを返す。3回以上の転送には SEO 上の警告を付ける。 | `url` |
|
|
286
|
+
| `app_status_check` | [HTTPステータス一括チェック](https://apps.first-ch.com/status-check/) — URLの一覧(1回10件まで)について、HTTPステータス・応答時間・リダイレクト後の最終URLをまとめて返す。リニューアル後の疎通確認やリンク集の生存確認向け。ページ本文は読まない。11件以上は10件ずつ分けて呼ぶ。 | `urls`[] |
|
|
287
|
+
| `app_redirect_map` | [301リダイレクト対応表チェッカー](https://apps.first-ch.com/redirect-map/) — サイト移転・リニューアルの「旧URL→新URL」1組について、旧URLの転送をたどり、期待した新URLへ厳密に一致して転送されているかを判定する。302の一時リダイレクト・チェーン・ループ・転送未設定・404も示す。対応表が複数組なら1組ずつ呼ぶ(同じIPから1分に60組まで。超えると HTTP 429)。 | `from`, `to` |
|
|
288
|
+
| `app_link_check` | [リンク切れ・alt属性チェック](https://apps.first-ch.com/link-check/) — URLのページ内のリンク(a href)を抽出して最大40件の生死を確認し、404などのリンク切れ・空のリンク文字・target=_blank の危険な指定を返す。画像の alt の欠落・ファイル名のままの alt も一覧する。対象は渡した1ページだけ(サイト全体はクロールしない)。 | `url` |
|
|
289
|
+
| `app_ogp_check` | [OGP確認(URL入力版)](https://apps.first-ch.com/ogp-check/) — URLのページの og: / twitter: タグを取得して判定し、og:image を実際に取得して寸法まで確認した結果を返す。 | `url` |
|
|
290
|
+
| `app_headings` | [見出し構造(hタグ)抽出](https://apps.first-ch.com/headings/) — URLのページの h1〜h6 を出現順に返し、h1 が複数・レベル飛ばし・空見出しを指摘する。構成案に貼れる Markdown のアウトラインも返す。 | `url` |
|
|
291
|
+
| `app_structured_data` | [構造化データ(JSON-LD)抽出・検証](https://apps.first-ch.com/structured-data/) — URLのページ内の JSON-LD を全て取り出して @type ごとに返し、JSON の構文エラーを行・列つきで検出する。Article・FAQPage・BreadcrumbList・LocalBusiness・Organization の必須/推奨プロパティの充足も判定する。 | `url` |
|
|
292
|
+
| `app_ai_access` | [AIクローラー許可チェッカー](https://apps.first-ch.com/ai-access/) — URLのサイトの robots.txt を取得し、GPTBot・ClaudeBot・PerplexityBot・Google-Extended・CCBot・Bytespider など主要AIクローラーごとの許可/拒否と効いた Disallow を返す。llms.txt の有無と X-Robots-Tag も確認する。 | `url` |
|
|
293
|
+
| `app_robots_tester` | [robots.txt テスター](https://apps.first-ch.com/robots-tester/) — URLのサイトの robots.txt を取得し、指定した User-agent がそのURLをクロールしてよいかを Google のマッチング仕様(最長一致・同着は Allow 優先)で判定する。効いた規則と負けた規則を行番号つきで返し、構文の警告も出す。 | `url`, `userAgent?` |
|
|
294
|
+
| `app_sitemap_check` | [sitemap.xml 検証](https://apps.first-ch.com/sitemap-check/) — サイトマップを取得して XML 構文を検証し、URL件数・lastmod の分布・サイトマップインデックスの中身(1階層)・エスケープ漏れなどの警告(行番号つき)と、抽出したURLの先頭200件を返す。サイトのURLを渡すと robots.txt から自動発見する。gzip(.xml.gz)にも対応。 | `url` |
|
|
295
|
+
| `app_hreflang` | [hreflang 相互参照チェック](https://apps.first-ch.com/hreflang/) — URLのページの hreflang 宣言(link rel=alternate・HTTP の Link ヘッダー)を抽出し、宣言先のページ(10件まで)も取得して返照(return link)があるかを検証する。自己参照・x-default の有無と無効な言語/地域コード(en-UK・jp 等)も判定する。 | `url` |
|
|
296
|
+
| `app_mixed_content` | [混在コンテンツチェッカー](https://apps.first-ch.com/mixed-content/) — https のページに残った http:// の参照(img・script・link・iframe・video・source・CSS の url())を抽出し、行番号・タグ・直し方と、ブラウザがブロックするか自動で https 化されるかを返す。見つかった http:// のURLへはアクセスしない。 | `url` |
|
|
297
|
+
| `app_image_audit` | [ページ内画像診断](https://apps.first-ch.com/image-audit/) — URLのページ内の img / picture を抽出し、フォーマット(WebP・AVIF 対応)・loading=lazy・width/height の指定・alt を診断する。先頭30枚は HEAD リクエストで実際のファイルサイズと形式まで測る。 | `url` |
|
|
298
|
+
| `app_tech_detect` | [技術スタック検出](https://apps.first-ch.com/tech-detect/) — URLのページの HTML と応答ヘッダーのシグネチャから、CMS(WordPress・Shopify・Wix・STUDIO 等)・フレームワーク・CDN・解析タグ(GA4/GTM)・Webフォントを推定し、そう判断した根拠(どこで何に合致したか)と一緒に返す。 | `url` |
|
|
299
|
+
| `app_wp_check` | [WordPress簡易診断](https://apps.first-ch.com/wp-check/) — URLのサイトが WordPress かどうか・テーマ名・名乗っている範囲のバージョンを判定し、REST API のユーザー名列挙・xmlrpc.php・著者アーカイブ・既定のログインURL・readme.html・デバッグログの露出を診断する。攻撃的な列挙はせず GET で見える範囲だけを見る(WordPress の痕跡があるときだけ既定パス7本を追加で GET。ユーザー名は件数だけ返す)。 | `url` |
|
|
300
|
+
| `app_feed_check` | [RSS/Atomフィード検証](https://apps.first-ch.com/feed-check/) — フィードを自動発見して取得し、XML の構文・必須要素・記事一覧・文字化け・日付形式(RSS は RFC 822・Atom は RFC 3339)を検証する。itunes 名前空間のあるフィードは Apple Podcasts の必須要素も確認する。 | `url` |
|
|
301
|
+
| `app_favicon_check` | [faviconチェッカー](https://apps.first-ch.com/favicon-check/) — URLのページの favicon.ico・link rel=icon・apple-touch-icon・Web App Manifest のアイコン宣言を抽出し、1件ずつ実際に取得して形式・実寸法(ICO は内包サイズ全部)・容量を返す。 | `url` |
|
|
302
|
+
| `app_dns` | [DNSレコードチェッカー](https://apps.first-ch.com/dns/) — ドメインの A・AAAA・CNAME・MX・TXT・NS・SOA・CAA を Cloudflare の DNS over HTTPS(1.1.1.1)で引いて返す。www の向き先・SPF が1本か・CAA の有無も判定する。 | `domain` |
|
|
303
|
+
| `app_dns_propagation` | [DNS伝播チェック](https://apps.first-ch.com/dns-propagation/) — ドメインとレコード種別を5つの公開DNSリゾルバ(Cloudflare・Google・OpenDNS ほか)へ同時に問い合わせ、回答が一致しているかを返す。TTL と SOA serial から「反映待ち」と「設定ミス」を切り分けられる。expected を渡すと期待する値と一致したかも判定する。 | `domain`, `type?`, `expected?` |
|
|
304
|
+
| `app_email_dns` | [メール設定チェッカー](https://apps.first-ch.com/email-dns/) — ドメインの MX・SPF・DKIM・DMARC を引いて診断する。SPF は include: をたどって DNS ルックアップ10回の上限を実測し、DMARC のポリシーを解釈して Gmail 送信者ガイドライン(2024年〜)への適合も判定する。DKIM はセレクタが分からないと確認できないため、省略時は代表的なセレクタを当てる(見つからなくても DKIM が無いとは限らない)。 | `domain`, `selector?` |
|
|
305
|
+
| `app_domain_info` | [ドメイン情報・期限チェッカー](https://apps.first-ch.com/domain-info/) — ドメインを RDAP(WHOIS の後継)で引き、レジストラ・作成日・有効期限と残り日数・ステータス(clientHold 等)・ネームサーバーを返す。RDAP 非対応の TLD(.jp を含む)はその旨を返す。登録者・管理者の個人情報は読まない。 | `domain` |
|
|
306
|
+
| `app_domain_availability` | [ドメイン空き一括チェック](https://apps.first-ch.com/domain-availability/) — サービス名・屋号の候補1つについて、.com / .net / .org / .jp / .co.jp / .dev / .io / .ai / .app / .co の登録有無を RDAP と公開DNSでまとめて判定する。判定は「登録済み/未登録の可能性/判定不能」の3値で、空きは断定しない。 | `name` |
|
|
307
|
+
| `app_myip` | [IP・リクエスト情報の確認](https://apps.first-ch.com/myip/) — この MCP サーバーが動いている端末から apps.first-ch.com へ届いたリクエストを見て、グローバルIP・推定国/都市・回線(ASN)・HTTP/TLS の方式・User-Agent・主要リクエストヘッダーを返す。VPN の切り替え確認などに使う。 | — |
|
|
308
|
+
| `app_brand_fetch` | [ブランド情報抽出](https://apps.first-ch.com/brand-fetch/) — サイトのロゴ・ファビコン・主要配色・会社説明を抽出して返す。配色は CSS の出現頻度順で、白地・黒地とのコントラスト比つき。画像は URL と寸法だけを返す。提案書やモックの仮ブランド作りに使う。 | `url` |
|
|
309
|
+
| `app_tone_check` | [ビジネス文面のニュアンスチェック](https://apps.first-ch.com/tone-check/) — 日本語のビジネスメール・提案文の失礼・曖昧・二重敬語・催促のきつさを「相手にどう受け取られるか」の観点で指摘し、言い換え候補を返す。英訳して送るときの文化的な誤解ポイントも添える。**回数制限あり**(同じIPから10分に5回・AIの2本合計で1日50回)。 | `text` |
|
|
310
|
+
| `app_lp_persona_check` | [LP文言・ペルソナ反応チェッカー](https://apps.first-ch.com/lp-persona-check/) — LP・サービス紹介の訴求文を、選んだ業種(士業・EC・BtoB SaaS)の疑似ペルソナ3人の視点で読み、分かりやすさ・信頼性・購買意欲への影響の推定スコア、敬語トーンの強弱(5段階)、ペルソナごとの反応、言い換え案を返す。疑似ペルソナによる推測で、実在の顧客の反応ではない。**回数制限あり**(同じIPから10分に5回・AIの2本合計で1日50回)。 | `text`, `industry` |
|
|
311
|
+
| `app_ja_readability_check` | [和文可読性チェッカー](https://apps.first-ch.com/ja-readability-check/) — URLのページの本文の日本語タイポグラフィを、PC とスマホの画面幅で推定して診断する。1文字だけの孤立行・句読点や閉じ括弧の行頭禁則・1行の文字数(35〜40字の目安)・和文フォントのフォールバック欠けを該当箇所つきで返す。ページとその CSS(8本まで)を取得する。 | `url`, `cpl?` |
|
|
312
|
+
| `app_faq_site_diff` | [FAQ×サイト 記載差分チェッカー](https://apps.first-ch.com/faq-site-diff/) — FAQ・ヘルプページと本体サイトのページ(3件まで)の料金・営業時間・電話番号・日付・「〇日以内」などの記載を突き合わせ、食い違う箇所を返す。FAQ の更新漏れ探しに使う。 | `faq`, `sites`[] |
|
|
313
|
+
| `app_nap_check` | [会社名・住所・電話の表記ゆれチェッカー](https://apps.first-ch.com/nap-check/) — 同じサイトのページ(3件まで・同じオリジン)の表示テキスト・フッター・tel: リンク・JSON-LD から会社名・住所・電話番号・営業時間を拾い、ページ間や構造化データとの表記ゆれ・不一致候補を返す。ローカルSEOの下調べに使う。同じIPから10分に10回まで(超えると HTTP 429)。 | `urls`[] |
|
|
314
|
+
|
|
315
|
+
正確な入力スキーマ(Zod定義)は、端末内のツールが [`server.mjs`](./server.mjs)、`app_*` ツールが [`apps.mjs`](./apps.mjs) を参照してください。
|
|
217
316
|
|
|
218
317
|
**`marp_render` のPDF出力にはローカルの Chrome/Chromium が必要です。** marp-core によるHTML生成はブラウザ非依存(`npx` 導入を軽く保つため)で、PDFはローカルインストール済みの Chrome/Chromium を headless で駆動して生成します。定番パスから自動検出し、`MARP_CHROME_PATH` で実行ファイルを明示することもできます。見つからない場合は HTML のみを返し `pdf_skipped` を報告します(そのHTMLを開いて印刷→PDF保存でも1スライド=1ページで作成できます)。
|
|
219
318
|
|
|
220
319
|
### 通信・ファイル・プライバシー
|
|
221
320
|
|
|
222
|
-
-
|
|
223
|
-
-
|
|
321
|
+
- **端末内のツールと `app_*` ツールの違い。** `app_` で始まらないツールは全て端末内で処理し、どこにも送信しません。**`app_*` ツールだけは設計上の例外で、呼び出すたびに入力(渡した URL・ドメイン名・DKIM セレクタ・文面)を First CH のサーバー apps.first-ch.com へ送り**、そこで処理した結果を受け取ります。入力も結果もサーバーには保存しません。AI のアプリ(`app_tone_check`・`app_lp_persona_check`)は文面を Cloudflare Workers AI に渡して判定し、1日の上限を数えるために日付と全体の回数だけを記録します(文面・IP は記録しません)。通常の Web アクセスと同じく、呼び出し元のグローバルIPは apps.first-ch.com(Cloudflare 上で稼働)に届きますが、IP ごとの回数制限(メモリ上のみ)に使うだけで保存しません。サイトを診断するアプリは First CH のサーバーから対象サイトを取得します。User-Agent は `first-ch-tools-mcp/<version>` です。機密の文面や社外秘の URL は `app_*` ツールに渡さず、端末の外へ出したくない入力には端末内のツールを使ってください。テスト用に `FIRSTCH_APPS_BASE_URL` で送り先を差し替えられます。
|
|
322
|
+
- **端末内のツールは外部へ通信しません。** 例外は起動時に `npx` が npm レジストリからパッケージを取得することと、`marp_render` に `allowRemote: true` を渡したとき(Markdown が参照する外部の画像・CSS をローカルの Chrome が読み込む)だけです。既定の `marp_render` は Webフォントを読まず、絵文字は文字のまま、組み込みテーマの外部 `@import` を取り除き、Chrome も外部通信を止めサンドボックス有効のまま起動します(サンドボックスが使えない環境だけ `MARP_CHROME_NO_SANDBOX=1` で外せます)。
|
|
323
|
+
- **上書きしません。** ファイルを書くツール(`outputPath`/`outputDir` を持つもの・`webp_convert`・`marp_render`)は、同名のファイルがあれば `overwrite: true` を渡さない限りエラーにします。これらは `readOnlyHint: false`・`destructiveHint: true`、それ以外は `readOnlyHint: true` を付けています。ネットワークへ出る `app_*` ツール(と `marp_render`)には `openWorldHint: true` を付けています。パス指定の無い `marp_render` は `<OSの一時ディレクトリ>/firstch-tools-mcp/` に書き、書いたファイルはサーバーが消しません。
|
|
224
324
|
- プライバシーポリシー: [plugins/firstch-tools/PRIVACY.md](./plugins/firstch-tools/PRIVACY.md)。不具合・質問: [GitHub Issues](https://github.com/First-CH/firstch-tools-mcp/issues)。
|
|
225
325
|
|
|
226
326
|
### 計測(Telemetry)について
|
|
227
327
|
|
|
228
|
-
既定では何も記録しません。環境変数 `FIRSTCH_TOOLS_USAGE_LOG` にファイルパスを設定したときのみ、各ツール呼び出しごとに1行のJSON(`{ ts, tool, source }
|
|
328
|
+
既定では何も記録しません。環境変数 `FIRSTCH_TOOLS_USAGE_LOG` にファイルパスを設定したときのみ、各ツール呼び出しごとに1行のJSON(`{ ts, tool, source }`)をそのローカルファイルへ追記します。この記録ファイルを送信することはありません(未設定であればファイルへの書き込み自体が発生しません)。なお、これは利用記録の話で、`app_*` ツールは上記のとおり入力を apps.first-ch.com へ送ります。
|
|
229
329
|
|
|
230
330
|
### Web版
|
|
231
331
|
|
|
232
|
-
同一アルゴリズムを、インストール不要の無料ブラウザツールとしても公開しています: **[tools.first-ch.com](https://tools.first-ch.com)**。UIで使いたいとき・MCP
|
|
332
|
+
同一アルゴリズムを、インストール不要の無料ブラウザツールとしても公開しています: **[tools.first-ch.com](https://tools.first-ch.com)**。UIで使いたいとき・MCPクライアントを持たない相手にリンクを共有したいときはこちらをどうぞ。`app_*` ツールは **[apps.first-ch.com](https://apps.first-ch.com)** のWebアプリと1対1で対応しています。
|
|
233
333
|
|
|
234
334
|
### vendor同期(WebPコーデック)
|
|
235
335
|
|
|
@@ -250,8 +350,10 @@ claude mcp add firstch-tools -- npx -y @first-ch/tools-mcp
|
|
|
250
350
|
|
|
251
351
|
```bash
|
|
252
352
|
npm ci
|
|
253
|
-
npm test # ユニットテスト(
|
|
254
|
-
node e2e.mjs # stdio smokeテスト: server.mjs
|
|
353
|
+
npm test # ユニットテスト(test.mjs)と、fetch を差し替えた app_* のテスト(test-apps.mjs・実ネットワークなし)
|
|
354
|
+
node e2e.mjs # stdio smokeテスト: server.mjsを子プロセス起動しツール一覧取得・実行を検証(app_* は手元の偽APIへ)
|
|
255
355
|
```
|
|
256
356
|
|
|
357
|
+
`test-apps.mjs` は、FirstCHApps リポジトリがこのリポジトリの隣(または `FIRSTCH_APPS_REPO`)にあれば、`apps.mjs` の定義が `functions/_shared/apps-registry.ts` の一覧と一致するかも確かめます(無ければその検査だけ飛ばします)。
|
|
358
|
+
|
|
257
359
|
CIはNode 24 でのテストに加え、vendorチェックサム検証・公開tarball内容検査を実行します([`.github/workflows/ci.yml`](./.github/workflows/ci.yml) 参照)。
|