Skip to main content
Glama
README.md
# @pipeworx/jp-kanpo

What did Japan's official gazette (官報, Kanpo) publish on a given day? Issues and
tables of contents from the National Printing Bureau's free edition, which covers
the most recent 90 days.

Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 2014+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.

## Tools

- `jp_kanpo_issues(date?, include_contents?)` -- the issues of one day (the latest
  published day when `date` is omitted): type (本紙 main, 号外 extra, 特別号外 special
  extra, 政府調達 government procurement), issue number, page range, size and links,
  and each issue's table of contents: section headings (for example 省令, 法規的告示,
  その他告示, 公告) with the titles of the ordinances and notifications listed and their
  page numbers. Every response states the `window` covered (`from`, `to`).

## Auth

Keyless.

## Data sources

- National Printing Bureau of Japan (国立印刷局), Kanpo (official gazette), free
  90-day edition. Read live on each call (two page reads at most); nothing stored.

## Behaviour worth knowing

- Tables of contents and issue metadata only. The text of notices is not served:
  the gazette prints notices naming private individuals (bankruptcy, missing
  persons, naturalisation and the like), and the publisher itself withholds those
  as images and removes them after 90 days. The contents of the 公告 section appear
  as category headings, as the publisher lists them.
- There is no keyword search tool: the publisher's search is a paid service and the
  free edition has none.
- A date before the window returns `found: false` with `empty_reason:
  "before_free_window"`; a date inside it with no issue (government holidays)
  returns `empty_reason: "no_issue_on_date"`. The response then lists `available_dates`.
- The publisher asks users not to crawl or load the site; this tool reads at most two
  pages per call, on request.
- An index or contents page whose markup has changed is refused, never read as
  zero issues.

## Quick Start

Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):

```json
{
  "mcpServers": {
    "jp-kanpo": {
      "url": "https://gateway.pipeworx.io/jp-kanpo/mcp"
    }
  }
}
```

### What this endpoint actually serves

`tools/list` at `https://gateway.pipeworx.io/jp-kanpo/mcp` returns the tools in the table
above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
`discover_tools`, `search_within`, `remember`/`recall` and the rest of the
gateway-wide set. So the tool count you see is larger than this table: a
single-pack endpoint currently lists roughly 30 shared tools alongside the
pack's own. The connection's `initialize` response states its exact scope, and
is the authoritative answer for a given day.

This is deliberate, not multiplexing by accident. The meta-tools are what let a
scoped connection answer a question this pack does not cover — via
`ask_pipeworx`, which routes across the whole catalog — without you adding a
second MCP server. There is currently no way to mount a pack endpoint without
them; if the extra schemas cost you more context than the routing is worth,
connect to the full gateway once rather than to several pack endpoints.

Or connect to the full Pipeworx gateway to get every pack's tools listed
directly, instead of just this one's:

```json
{
  "mcpServers": {
    "pipeworx": {
      "url": "https://gateway.pipeworx.io/mcp"
    }
  }
}
```

Both URLs reach the same gateway and the same 2014+ data sources. The
only difference is which pack's tools are listed **directly**; `ask_pipeworx`
reaches all of them from either one.

## No MCP client? Call it over HTTP

```bash
curl -X POST https://gateway.pipeworx.io/v1/tools/jp_kanpo_issues \
  -H 'Content-Type: application/json' \
  -d '{"date":"2026-11-13"}'
```

No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/jp_kanpo_issues`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.

## Run it from npm

`@pipeworx/mcp-jp-kanpo` is a local stdio bridge to the Pipeworx gateway: your MCP client
starts it with `npx`, and it forwards every call to the same
`https://gateway.pipeworx.io/jp-kanpo/mcp` endpoint shown above. It needs network access;
there is no offline mode.

```json
{
  "mcpServers": {
    "jp-kanpo": {
      "command": "npx",
      "args": ["-y", "@pipeworx/mcp-jp-kanpo"]
    }
  }
}
```

Without a key it calls anonymously, capped at 50 calls a day. A free account
raises that to 200 a day: get a key at https://pipeworx.io/signup and add
`"env": { "PIPEWORX_API_KEY": "<your key>" }` to the server entry.
The key is sent as a Bearer token, the same way a hosted connection sends it,
so calls are metered and billed exactly as they are there.

It lists **only** this pack's tools by default. Set `PIPEWORX_META_TOOLS=1` to
also list `ask_pipeworx` and the other gateway-wide tools.

Behind an HTTPS proxy: Node's built-in `fetch` does not read `HTTPS_PROXY` by
default. Newer Node releases honour it when `NODE_USE_ENV_PROXY=1` is set; check
your Node version's documentation.

## Using with ask_pipeworx

Instead of calling tools directly, you can ask questions in plain English —
this works on the pack endpoint above as well as on the full gateway:

```
ask_pipeworx({ question: "your question about Jp Kanpo data" })
```

The gateway picks the right tool and fills the arguments automatically.

## More

- [Docs and guides](https://pipeworx.io/docs)
- [pipeworx.io](https://pipeworx.io)

## License

MIT