MLIT DATA PLATFORM MCP Server logo

MLIT DATA PLATFORM MCP Server

Organization
MLIT-DATA-PLATFORM

国土交通省が保有するデータと民間等のデータを連携し、一元的に検索・表示・ダウンロードを可能にする国土交通データプラットフォームが提供する利用者向けAPIと接続するMCP (Model Context Protocol) サーバー(α版)です。

PublisherMLIT-DATA-PLATFORM
Repositorymlit-dpf-mcp
LanguagePython
Forks
22
Stars
172
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    MLIT DATA PLATFORM MCP Server 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

    172 stars and 22 forks from the linked repository.

MLIT DATA PLATFORM MCP Server

目次

1. 概要

国土交通省が保有するデータと民間等のデータを連携し、一元的に検索・表示・ダウンロードを可能にする国土交通データプラットフォームが提供する利用者向けAPIと接続するMCP (Model Context Protocol) サーバー(α版)です。

本MCPサーバーを利用することで、大規模言語モデル(LLM)と直接連携し、対話形式で直感的にデータを検索・取得することが可能になります。APIに関する専門的な知識がなくても、誰でも簡単に国土交通データプラットフォームから曖昧な指示や複雑な条件設定でデータを検索・取得が可能な、新しいデータ活用のかたちを提供します。

2. 主な機能

国土交通データプラットフォームの利用者向けAPIを活用し、以下の機能を提供します:

  • search(キーワードの指定によりデータを検索します。並べ替えや件数の指定も可能です。)
  • search_by_location_rectangle(指定した矩形範囲と交差するデータを検索します。)
  • search_by_location_point_distance(指定した地点と半径からなる円形範囲と交差するデータを検索します。)
  • search_by_attribute(カタログ名、データセット名、都道府県、市区町村などの属性を指定してデータを検索します。)
  • get_data(データの詳細情報を取得します。)
  • get_data_summary(データIDとタイトルなどのデータの基本情報を取得します。)
  • get_data_catalog(データカタログやデータセットの詳細情報を取得します。)
  • get_data_catalog_summary(IDやタイトルなどのデータカタログやデータセットの基本情報を取得します。)
  • get_file_download_urls(ファイルのダウンロード用URLを取得します(有効期限:60秒)。)
  • get_zipfile_download_url(複数ファイルをZIP形式でまとめたダウンロードURLを取得します(有効期限:60秒)。)
  • get_thumbnail_urls(サムネイル画像のURLを取得します(有効期限:60秒)。)
  • get_all_data(条件に一致する大量のデータを一括取得します。)
  • get_count_data(条件に一致するデータ件数を取得します。)
  • get_suggest(キーワード検索時の候補を取得します。)
  • get_prefecture_data(都道府県名・コードの一覧を取得します。)
  • get_municipality_data(市区町村名・コードの一覧を取得します。)
  • get_mesh(指定したメッシュに含まれるデータを取得します。)
  • normalize_codes(入力された都道府県名・市区町村名を正規化します。)

3. 動作環境

  • OS:Windows 10 / 11 または macOS 13以降
  • MCPホスト:Claude Desktopなど
  • MCPサーバー実行環境:Python 3.10+
  • メモリ:8GB以上推奨
  • ストレージ:空き容量 1GB以上(キャッシュやログを含む)

4. インストールとセットアップ

前提条件

Claude DesktopなどのMCP対応AIアプリケーション および Python がインストールされていることを前提としています。以下は、Claude Desktopでの利用を想定した手順です。

手順

  1. 国土交通データプラットフォームでアカウントを作成し、APIキーを取得

    詳しい手順は、こちらをご覧ください。

  2. リポジトリをクローン

    bash
    git clone https://github.com/MLIT-DATA-PLATFORM/mlit-dpf-mcp.git
    cd mlit-dpf-mcp
  3. 仮想環境を作成 & 有効化

    bash
    python -m venv .venv
    .venv\Scripts\activate      # Windows
    source .venv/bin/activate   # macOS/Linux
  4. 依存ライブラリをインストール

    bash
    pip install -e .
    pip install aiohttp pydantic tenacity python-json-logger mcp python-dotenv
  5. 環境変数を設定

    .env.exampleをコピーし、 .env ファイルを作成します:

    MLIT_API_KEY=your_api_key_here
    MLIT_BASE_URL=https://data-platform.mlit.go.jp/api/v1/

    あるいはコマンドラインから直接設定することも可能です:

    bash
    export MLIT_API_KEY=your_api_key_here
    export MLIT_BASE_URL=https://data-platform.mlit.go.jp/api/v1/

    your_api_key_hereは必ず、手順1で取得したAPIキーに置き換えてください。

  6. MCP サーバーの起動

    bash
    python -m src.server
  7. Claude Desktopの設定ファイルを開く

    • Windows: C:\Users\<ユーザー名>\AppData\Roaming\Claude\claude_desktop_config.json
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Claude Desktopアプリの設定画面にある「開発者」メニューの「設定を編集」ボタンをクリックしてclaude_desktop_config.jsonを開くことも可能です。
  8. MCPサーバーの構成を追加

    json
    {
      "mcpServers": {
        "mlit-dpf-mcp": {
          "command": "......./mlit-dpf-mcp/.venv/Scripts/python.exe",
          "args": [
            "....../mlit-dpf-mcp/src/server.py"
          ],
          "env": {
            "MLIT_API_KEY": "your_api_key_here",
            "MLIT_BASE_URL": "https://data-platform.mlit.go.jp/api/v1/",
            "PYTHONUNBUFFERED": "1",
            "LOG_LEVEL": "WARNING"
          }
        }
      }
    }

    commandとargsは必ず、実際のパスに変更してください。
    your_api_key_hereは必ず、手順1で取得したAPIキーに置き換えてください。

  9. Claude Desktop を再起動

5. ディレクトリ構成

mlit-dpf-mcp/
├─ src/
│  ├─ server.py   # MCP サーバー & ツール定義
│  ├─ client.py   # MLIT GraphQL API クライアント
│  ├─ schemas.py  # Pydantic モデル(入力バリデーション)
│  ├─ config.py   # 環境変数ロード & 設定検証
│  └─ utils.py    # ロギング、タイマー、レート制限
├─ pyproject.toml
├─ README.md
└─ LICENSE

6. ライセンス

  • 本リポジトリはMITライセンスで提供されています。ライセンスを参照してください。

7. 注意事項

  • 本リポジトリで提供されるデータの利用に関しては、 国土交通データプラットフォームの利用規約に従う必要があります。ご使用前に国土交通データプラットフォームの利用規約を必ずご確認ください。
  • 本リポジトリの個人情報の取り扱いは、国土交通データプラットフォームのプライバシーポリシーに準拠しております。
  • 本リポジトリはα版として提供しているものです。動作保証は行っておりません。
  • 本リポジトリの内容は予告なく変更・削除する可能性があります。
  • 本リポジトリの利用により生じた損失及び障害等について、国土交通省及び国土交通データプラットフォームはいかなる責任も負わないものとします。

8. お問い合わせ

本リポジトリはα版です。お気づきの点があれば下記お問い合わせフォームまでご連絡下さい。

Installation

TypingMind
{
  "mcpServers": {
    "mlit-dpf-mcp": {
      "command": "python",
      "args": [
        "src/server.py"
      ],
      "env": {
        "MLIT_API_KEY": "<MLIT_API_KEY>",
        "MLIT_BASE_URL": "<MLIT_BASE_URL>"
      }
    }
  }
}

Use MLIT DATA PLATFORM MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once MLIT DATA PLATFORM MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to 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 MLIT DATA PLATFORM MCP Server 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 MLIT DATA PLATFORM MCP Server 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": {
    "mlit-dpf-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the MLIT DATA PLATFORM MCP Server 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 MLIT DATA PLATFORM MCP Server 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 MLIT DATA PLATFORM MCP Server to help me with this task?
MLIT DATA PLATFORM MCP Server
Sure. I read it.
Here is what I found using MLIT DATA PLATFORM MCP Server.

Frequently asked questions

What is the MLIT DATA PLATFORM MCP Server MCP server used for?

MLIT DATA PLATFORM MCP Server 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 MLIT DATA PLATFORM MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use MLIT DATA PLATFORM MCP Server 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 MLIT DATA PLATFORM MCP Server 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 MLIT DATA PLATFORM MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect MLIT DATA PLATFORM MCP Server MCP to TypingMind?

MLIT DATA PLATFORM MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does MLIT DATA PLATFORM MCP Server MCP provide in TypingMind?

MLIT DATA PLATFORM MCP Server 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 MLIT DATA PLATFORM MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If MLIT DATA PLATFORM MCP Server 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 👇