MCP server for the Japan National Tax Agency Corporate Number API.
This project wraps the official Corporate Number Publication Site Web-API and exposes it as MCP tools for local AI clients.
The National Tax Agency already provides an official API, but using it from LLM tools still requires a thin integration layer. This repository aims to be that layer:
- small and auditable
- easy to self-host
- close to the official API
- practical for Japanese business research workflows
- Get a corporation by 13-digit corporate number
- Search corporations by name
- Fetch updates within a date range
- Return normalized JSON-style output from the official XML API
- Node.js 18 or later
- A National Tax Agency Web-API application ID
Official documentation:
npm installCreate a local environment file or otherwise export the required variable:
HOUJIN_BANGOU_API_APPLICATION_ID=YOUR_APPLICATION_IDFor local development, copy .env.example and load it with your preferred workflow. Do not commit
real credentials.
Development:
npm run devBuild:
npm run buildProduction entrypoint:
npm startInputs:
corporateNumber: 13-digit corporate numberhistory: optional boolean to include historical records
Inputs:
name: corporation or organization name
Inputs:
from: start date inYYYY-MM-DDto: end date inYYYY-MM-DD
Example command-based configuration for MCP clients that can spawn local servers:
{
"mcpServers": {
"houjin-bangou-api": {
"command": "node",
"args": [
"/absolute/path/to/houjin-bangou-api-mcp/dist/server.js"
],
"env": {
"HOUJIN_BANGOU_API_APPLICATION_ID": "YOUR_APPLICATION_ID"
}
}
}
}If your client supports npx, you can also point it at the published package once releases are
available.
Tests:
npm testMCP smoke check:
npm run smoke:mcpThe smoke script reads example inputs from scripts/live-check.json. If
HOUJIN_BANGOU_API_APPLICATION_ID is set, it exercises all three tools against the live API.
Package dry-run:
npm run check:packPackaged install smoke check:
npm run smoke:packageThis repository currently focuses on the stdio MCP server. HTTP transport, richer filtering, and additional Japanese business datasets can be added later without changing the basic API client.
Public contributions are welcome. Please open a pull request instead of pushing directly to
main.
- Contribution guide: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
- Roadmap: ROADMAP.md
Pull requests are expected to pass CI:
npm testnpm run build
- Keep your application ID out of Git history, screenshots, and issue reports.
- Use environment variables only.
- Treat all logs as potentially public before sharing them.
MIT