@cyanheads/japan-parliament-mcp-server
Overview
Search the public Japanese-language minutes of Japan's National Diet from its first session in May 1947 onward. Coverage includes plenary sittings and committees of both houses, as well as conference committees. Find who said what, locate bills on published agendas, and read the debate around a particular speech. Recent minutes and PDFs appear as the source publishes them. National Diet Library coverage
Tools
Tool | Description |
| Find speeches by Japanese terms or speaker, with excerpts or full source text |
| Find sitting headers and their printed agendas |
| Read a sitting's speech outline or a page of original Japanese text |
| Look up houses, eras, standing committees, session dates, and search syntax |
Related MCP server: houan-mcp
Capability reference
kokkai_search_speeches tool
Supply at least one search filter, such as
keywords,speaker,meeting_name,house,issue_id, an inclusive date range, or a session or issue number.closing_onlynarrows another filter to recess sittings.Keywords match within spoken text. Separate AND terms with spaces and use separate calls for OR.
meeting_nameandspeakeraccept space-separated alternatives. Use Gregorian dates or Japanese era dates such as昭和22年5月20日.Results include the speech ID, speaker and sitting metadata, and a verbatim excerpt of up to 480 Unicode code points. Set
include_full_text: truefor the entire source text. Ambiguous speaker filters report distinct matches on the current page.Both search tools default to 25 rows, clamp limits above 100, and return
next_startfor the next page. Keep the filters and pass that value asstart.
kokkai_search_meetings tool
Search Japanese bill titles or other terms in sitting headers. Omit filters to browse recent sittings. Use
kokkai_search_speechesto match words spoken in debate.Each result includes the
issue_idand an agenda extracted from the printed header when available. If extraction is unavailable, follow the minutes or PDF link.
kokkai_get_meeting tool
Pass one
issue_idfor a complete speaker outline. Setinclude_text: truefor original Japanese text and usestart_orderto select the exact first row. Order zero is the header.Pass one
speech_idto open the text page at that exact speech. The default text page contains up to 10 rows, with a maximum of 100. For subsequent pages, use theissue_id,include_text: true, and the returnednext_orderasstart_order.A valid identifier or starting order with no matching record returns
found: falseand guidance for finding the sitting or speech order.
kokkai_list_reference tool
Pass
topicashouses,eras,standing_committees,sessions, orsearch_syntax.両院and両院協議会select conference committees. Omithousein a search to include both houses.sessionsreturns the House of Representatives' official session table, newest first.standing_committeeslists current statutory names. When searching historical records, use a name from minutes of the period.
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Source links. Results preserve links to the original minutes, speech, and PDF when available. The server identifies excerpts it cuts and agendas it extracts.
OCR notices. Sessions 1–144 and machine-read ancillary records may contain errors. Check the original PDF before quoting. NDL search help
Serial access. Each server process spaces its NDL minutes requests. Let a call finish before requesting more pages. NDL API terms
Getting started
The National Diet Library API requires no key. To register the local stdio server in Claude Code:
claude mcp add japan-parliament-mcp-server -- npx -y @cyanheads/japan-parliament-mcp-serverFor other clients, add this to the MCP config file:
{
"mcpServers": {
"japan-parliament-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/japan-parliament-mcp-server"]
}
}
}Try these tool arguments using the first plenary sitting of the House of Councillors on May 20, 1947. Original sitting record
Tool | Arguments |
|
|
|
|
|
|
|
|
Configuration
Variable | Description | Default |
| Transport, |
|
| HTTP bind address. |
|
| HTTP server port. |
|
| HTTP MCP endpoint path. |
|
| HTTP session mode, |
|
| HTTP authentication, |
|
| Minimum log level. |
|
| Enable OpenTelemetry. |
|
See .env.example for more framework settings.
Running the server
Local development
Source builds require Bun v1.4.4 or higher. The start scripts and npm package use Node.js v24+.
git clone https://github.com/cyanheads/japan-parliament-mcp-server.git
cd japan-parliament-mcp-server && bun install
bun run rebuild
bun run start:http
# Or use stdio
bun run start:stdioFor Streamable HTTP, connect your MCP client to http://127.0.0.1:3010/mcp with the default settings.
Docker
docker run --rm -p 127.0.0.1:3010:3010 ghcr.io/cyanheads/japan-parliament-mcp-server:latestThe image defaults to HTTP transport and stateless sessions. For stdio, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/japan-parliament-mcp-server:latest"]. To build locally, run docker build -t japan-parliament-mcp-server .. Set --build-arg OTEL_ENABLED=false to omit OpenTelemetry dependencies from the image.
Project structure
Directory | Purpose |
| Four tool definitions, shared search filters, and result formatting |
| National Diet Library API client, request pacing, and response validation |
| Agenda extraction, speech excerpts, and metadata normalization |
| House and committee names, era dates, and the official session table |
| Tool contracts, source parsing, and server identity tests |
Development guide
See CLAUDE.md for development guidelines. Register tools in src/index.ts, validate source data before normalization, and preserve attribution, missing fields, and original text in both MCP result formats.
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
The server code is licensed under Apache 2.0.
Credit minutes to 国会会議録検索システム (National Diet Proceedings Search System) and keep the original links when quoting. Identify edits to source material. NDL's content terms follow Public Data License 1.0 for covered material. NDL holds rights to the database and its staff's speeches. Rights to other speeches generally belong to their speakers, subject to copyright expiry or applicable exceptions such as quotation or qualifying political speeches under Article 40. The conditions depend on the material and use, including whether the reuse compiles speeches by one author. NDL API terms · NDL content terms · Japan Copyright Act
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
Kokkai Diet MCP — Japan National Diet proceedings, speech-level full-text search via the National…
Search National Diet proceedings speeches.
An MCP server that provides congressional transcripts
Query SEC EDGAR filings, XBRL financials, and company data via MCP. STDIO or Streamable HTTP.
Related MCP Servers
- FlicenseAqualityDmaintenanceProvides a structured interface to the Japanese National Diet Library's parliamentary proceedings API, allowing AI models to search and retrieve Diet meeting records and speeches.31-
- AlicenseAqualityCmaintenanceMCP server for searching Japanese Diet bills and committee Q\&A records via the NDL Kokkai API.470 npm1MIT
- FlicenseAqualityDmaintenanceEnables search, retrieval, and summarization of Japanese National Diet meeting minutes via MCP tools.81-
- AlicenseBqualityNot gradedmaintenanceMCP server that provides tools and prompts for searching Japanese Diet (国会) proceedings using the National Diet Library API. Enables querying meetings and speeches with various filters and obtaining direct URLs to the records.338ISC