tax-law-mcp logo

tax-law-mcp

Community
kentaroajisaka

MCP server for Japanese tax law — e-Gov API & NTA 通達 (administrative circulars)

Publisherkentaroajisaka
Repositorytax-law-mcp
LanguageTypeScript
Forks
23
Stars
97
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    tax-law-mcp exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    97 stars and 23 forks from the linked repository.

tax-law-mcp

日本の税法・通達・裁決事例を取得する MCP サーバー。

Claude が税務の質問に回答する際、条文や通達のハルシネーションを防止するために、e-Gov法令APIおよび国税庁サイトから原文を取得して裏取りさせます。

特徴

  • 法令取得 — e-Gov法令API v2 から条文をMarkdown形式で取得
  • 法令検索 — キーワードで法令を横断検索
  • 通達取得 — 国税庁サイトから基本通達・措置法通達をスクレイピング(17通達対応)
  • 通達目次 — 通達の章・節構造を一覧表示
  • 裁決事例 — 国税不服審判所(kfs.go.jp)の公表裁決事例1,950件を検索・取得
  • Shift_JIS対応 — 国税庁・国税不服審判所サイトの文字エンコーディングに対応
  • 主要税法プリセット — 所得税法・法人税法・消費税法・措置法等のlaw_idをハードコード
  • 略称対応 — 「所法」「措法」「所基通」「措通(譲渡)」等の略称で指定可能

MCP ツール

ツール説明
get_lawe-Gov法令APIから条文を取得。法令名 + 条番号で指定。項・号・号の下のイロハ、附則にも対応。law_id 直接指定も可(例: 405AC0000000088)
search_lawキーワードで法令を検索
get_tsutatsu国税庁サイトから通達を取得。通達名 + 通達番号で指定
list_tsutatsu通達の目次を表示
list_saiketsu裁決事例の税目・カテゴリ一覧を表示
search_saiketsuキーワードで裁決事例を検索(1,950件から)
get_saiketsu裁決事例の全文を取得

対応法令(プリセット)

所得税法、法人税法、消費税法、相続税法、租税特別措置法、国税通則法、国税徴収法、各施行令・施行規則、民法、保険法 等(26法令)

対応通達(17通達)

基本通達

通達名略称
所得税基本通達所基通
法人税基本通達法基通
消費税法基本通達消基通
相続税法基本通達相基通
財産評価基本通達評基通
連結納税基本通達—
国税通則法基本通達通法基通
印紙税法基本通達印基通
税理士法基本通達税理士通達
国税徴収法基本通達徴基通
酒税法基本通達酒基通

措置法通達

通達名略称
措置法通達(山林所得・譲渡所得関係)措通(譲渡)
措置法通達(申告所得税関係)措通(申告)
措置法通達(法人税編)措通(法人税)
措置法通達(相続税関係)措通(相続税)
措置法通達(源泉所得税関係)措通(源泉)
措置法通達(株式等譲渡所得等関係)措通(株式)

セットアップ

npx(推奨)

インストール不要。以下の設定をコピペするだけ:

json
{
  "mcpServers": {
    "tax-law": {
      "command": "npx",
      "args": ["-y", "tax-law-mcp"]
    }
  }
}

Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json に追加

Claude Code: claude mcp add tax-law -- npx -y tax-law-mcp

ローカル(ソースから)

bash
git clone https://github.com/kentaroajisaka/tax-law-mcp.git
cd tax-law-mcp
npm install
npm run build
json
{
  "mcpServers": {
    "tax-law": {
      "command": "node",
      "args": ["/path/to/tax-law-mcp/dist/index.js"]
    }
  }
}

リモート(Vercel)

⚠️ 注意: 現在、Claude のリモートMCP接続(カスタムコネクト)に既知の不具合があり、正常に動作しない場合があります。安定してご利用いただくには、npx(ローカル)でのセットアップを推奨します。

自前のVercelにデプロイすれば、チームメンバーはインストール不要で利用できます:

bash
vercel deploy
json
{
  "mcpServers": {
    "tax-law": {
      "url": "https://<your-deployment>.vercel.app/mcp"
    }
  }
}

REST API(v0.4.0〜)

MCP に加えて、REST API エンドポイントも提供しています。Custom GPT (ChatGPT) の Actions や、Gemini、その他のAIツールから利用できます。

エンドポイント一覧

エンドポイント説明
GET /api/get-law条文取得(law_name, article 必須)
GET /api/search-law法令検索(keyword 必須)
GET /api/get-tsutatsu通達取得(tsutatsu_name, number 必須)
GET /api/list-tsutatsu通達目次(tsutatsu_name 必須)
GET /api/list-saiketsu裁決税目一覧(パラメータなし or tax_type)
GET /api/search-saiketsu裁決検索(keyword 必須)
GET /api/get-saiketsu裁決全文(url or collection_no+case_no)

使用例

bash
# 所得税法第33条を取得
curl "https://<your-domain>/api/get-law?law_name=所得税法&article=33"

# キーワードで法令検索
curl "https://<your-domain>/api/search-law?keyword=インボイス"

# 通達を取得
curl "https://<your-domain>/api/get-tsutatsu?tsutatsu_name=所基通&number=33-6"

Custom GPT での利用

  1. Vercel にデプロイ(vercel deploy)
  2. openapi.yaml の servers.url をデプロイ先URLに書き換え
  3. Custom GPT の「Actions」→「Schema」に openapi.yaml の内容を貼り付け
  4. GPT に「所得税法33条を教えて」と聞くと、API で条文を取得して根拠付きで回答

OpenAPI 仕様書

openapi.yaml に OpenAPI 3.1 仕様書が含まれています。Custom GPT の Actions や Swagger UI でそのまま使えます。

使い方の例(MCP)

条文の取得

「所得税法第33条を取得して」

→ get_law(law_name="所得税法", article="33")

号・イロハまで絞って取得

「相続税法12条1項6号のイを取得して」

→ get_law(law_name="相続税法", article="12", item=6, subitem="イ")

paragraph を省いても全項から号を探します。号番号は項をまたいで重複することがあるため、 実際にどの項に一致したかを見出しに表示します。枝番号の号は item="12の5の2" のように 文字列で指定してください。

附則の取得

「保険法の附則の一覧を見せて」

→ get_law(law_name="保険法", format="suppl")

「保険法の施行期日は?」

→ get_law(law_name="保険法", supplementary=true, article="1")

改正法の附則は法令番号で指定します。漢数字・算用数字のどちらの表記でも構いません。

→ get_law(law_name="保険法", supplementary="平成29年法律第45号")

通達の取得

「所得税基本通達33-6を取得して」

→ get_tsutatsu(tsutatsu_name="所基通", number="33-6")

措置法通達の取得

「措置法通達(譲渡)の33-8を取得して」

→ get_tsutatsu(tsutatsu_name="措通(譲渡)", number="33-8")

裁決事例の検索

「重加算税に関する裁決事例を探して」

→ search_saiketsu(keyword="重加算税")

裁決事例の全文取得

「裁決事例集第139集の1番を読みたい」

→ get_saiketsu(collection_no=139, case_no=1)

税目別の裁決事例一覧

「所得税関係の裁決事例のカテゴリを見せて」

→ list_saiketsu(tax_type="所得税")

ハルシネーション防止ワークフロー

  1. Claude が税務の質問に仮回答を作成
  2. 引用した条文・通達を get_law / get_tsutatsu で取得
  3. 実際の原文と仮回答を照合し、誤りがあれば修正
  4. 2-3 を収束するまで繰り返す(最大4ラウンド)

裁決事例(v0.3.0〜)

国税不服審判所(kfs.go.jp)の公表裁決事例(97冊・1,950件)を検索・取得できます。

対応税目(13税目)

国税通則法関係、所得税法関係、法人税法関係、相続税法関係、消費税法関係、地価税法関係、登録免許税法関係、印紙税法関係、揮発油税法関係、自動車重量税法関係、国税徴収法関係、租税特別措置法関係、たばこ税法関係

検索の仕組み

  • 事例集目次ページ(97冊分)をスクレイピングし、要旨テキストからキーワード検索
  • 初回は全ページ取得(30-60秒)、以降はキャッシュ利用(TTL 1時間)
  • latest パラメータで検索範囲を最新N冊に絞ることも可能

出典

通達の利用は国税庁コンテンツの利用についてに基づきます。

参考

ライセンス

MIT

Installation

TypingMind
{
  "mcpServers": {
    "tax-law-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "tax-law-mcp"
      ]
    }
  }
}

Use tax-law-mcp MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once tax-law-mcp is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add tax-law-mcp as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the tax-law-mcp MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "tax-law-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "tax-law-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the tax-law-mcp MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the tax-law-mcp MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use tax-law-mcp to help me with this task?
tax-law-mcp
Sure. I read it.
Here is what I found using tax-law-mcp.

Option 2: Add an MCP server URL

Use this when tax-law-mcp is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter https://<your-deployment>.vercel.app/mcp in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste https://<your-deployment>.vercel.app/mcp into the Server URL field.
  2. Enter a connection name for tax-law-mcp.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the tax-law-mcp connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the tax-law-mcp tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the tax-law-mcp tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use tax-law-mcp to help me with this task?
tax-law-mcp
Sure. I read it.
Here is what I found using tax-law-mcp.

Frequently asked questions

What is the tax-law-mcp MCP server used for?

tax-law-mcp is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use tax-law-mcp MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use tax-law-mcp with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use tax-law-mcp MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With tax-law-mcp connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect tax-law-mcp MCP to TypingMind?

tax-law-mcp can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does tax-law-mcp MCP provide in TypingMind?

tax-law-mcp exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use tax-law-mcp MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If tax-law-mcp requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇