Jグランツ MCP Server logo

Jグランツ MCP Server

Organization
digital-go-jp

デジタル庁が運用する補助金電子申請システム「Jグランツ」の公開APIをModel Context Protocol(MCP)サーバーとして実装。FastMCPフレームワークを使用し、LLMから自然言語で補助金検索・詳細取得が可能です。

Publisherdigital-go-jp
Repositoryjgrants-mcp-server
LanguagePython
Forks
27
Stars
50
Available tools
0
Transport typestdio, streamable-http
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Jグランツ 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

    50 stars and 27 forks from the linked repository.

Jグランツ MCP Server

License: MIT Python 3.11+ FastMCP

デジタル庁が運用する補助金電子申請システム「Jグランツ」の公開APIをModel Context Protocol(MCP)サーバーとして実装。FastMCPフレームワークを使用し、LLMから自然言語で補助金検索・詳細取得が可能です。

特徴

  • リモート対応: Streamable-HTTP経由でリモート接続可能
  • 高度な検索機能: キーワード、業種、従業員数、地域での絞り込み
  • 統計分析: 補助金の統計情報を自動集計(締切期間別、金額規模別)
  • ファイルダウンロード: 募集要項や申請書類の自動ダウンロード・保存
  • 添付資料アクセス: PDFなどの添付資料をMarkdown/BASE64形式で取得可能
  • LLM統合: 自然言語での補助金検索と詳細取得
  • ファイル変換: PDF、Word、Excel、ZIPなど多様な形式をMarkdownに変換
  • 動的ツール検出: サーバーのツール変更を自動検出・適応
  • FastMCP: 最新のFastMCPフレームワーク (v2.12.2) を使用
  • Prompts/Resources: LLM向けのガイドとリソースを提供

動作確認環境

  • Claude Desktop: v0.7.10以上
  • Python: 3.11以上
  • FastMCP: 2.12.2以上

クイックスタート

前提条件

  • Python 3.11以上
  • pip (Pythonパッケージマネージャー)

環境セットアップ

bash
# リポジトリのクローン
git clone https://github.com/digital-go-jp/jgrants-mcp-server.git
cd jgrants-mcp-server

# Python仮想環境の作成
python -m venv venv

# 仮想環境の有効化
# macOS/Linux:
source venv/bin/activate
# Windows:
# venv\Scripts\activate

# 依存パッケージのインストール
pip install -r requirements.txt

UV を使った環境セットアップ(推奨)

UV は高速なPythonパッケージマネージャーです。より高速なインストールを実現します。

bash
# リポジトリのクローン
git clone https://github.com/digital-go-jp/jgrants-mcp-server.git
cd jgrants-mcp-server

# UVで仮想環境を作成
uv venv

# 仮想環境の有効化
source .venv/bin/activate

# UVで依存パッケージをインストール
uv pip install -r requirements.txt

環境変数(オプション)

必要に応じて以下の環境変数を設定できます:

環境変数デフォルト値説明
JGRANTS_FILES_DIR./jgrants_files添付ファイル保存ディレクトリ
API_BASE_URLhttps://api.jgrants-portal.go.jp/exp/v1/publicJグランツAPIエンドポイント

設定例:

bash
export JGRANTS_FILES_DIR=/tmp/jgrants_files

サーバー起動

HTTPサーバーモード

bash
# HTTPサーバーを起動(デフォルト: localhost:8000)
python -m jgrants_mcp_server.core

# ホストとポートを指定
python -m jgrants_mcp_server.core --host 0.0.0.0 --port 8080

UV を使った起動

UV を使った場合、uv run で直接サーバーを起動できます:

bash
# HTTPサーバーを起動(デフォルト: localhost:8000)
uv run python -m jgrants_mcp_server.core

# ホストとポートを指定
uv run python -m jgrants_mcp_server.core --host 0.0.0.0 --port 8484

サーバー起動後、以下のエンドポイントが利用可能になります:

  • MCP エンドポイント: http://localhost:8000/mcp もしくは http://127.0.0.1:8000/mcp
  • トランスポート: Streamable-HTTP

Claude Desktop との連携

FastMCP CLI経由での接続(推奨)

Claude Desktop は stdio 接続のみサポートするため、FastMCP CLIをHTTPプロキシとして使用します。 この方法はResources、Prompts、Toolsのすべての機能をサポートします。

  1. MCP Server を起動:

    bash
    python -m jgrants_mcp_server.core --port 8000
  2. Claude Desktop 設定ファイルを編集:

    macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json

    json
    {
      "mcpServers": {
        "jgrants": {
          "command": "uvx",
          "args": [
            "fastmcp",
            "run",
            "http://localhost:8000/mcp"
          ]
        }
      }
    }

    備考:

    • localhostでうまくいかない場合は 127.0.0.1 でお試しください
    • uvxはuvのコマンドラインツール実行機能です(pip install uvでインストール)
    • uvxがインストールされていない場合は、fastmcpを直接使用することもできます:
      json
      {
        "mcpServers": {
          "jgrants": {
            "command": "fastmcp",
            "args": [
              "run",
              "http://localhost:8000/mcp"
            ]
          }
        }
      }
  3. Claude Desktop を再起動

Roo-Code との連携

Roo-Code は VS Code 拡張機能で、Streamable-HTTP 経由での MCP サーバー接続をサポートしています。

Streamable-HTTP接続の設定

  1. リモートサーバーでMCPサーバーを起動:

    bash
    uv run python -m jgrants_mcp_server.core --host 0.0.0.0 --port 8484
  2. Roo-Code の MCP 設定ファイルを編集:

    VS Code で Roo-Code 拡張機能をインストール後、MCP 設定を編集します。

    詳細な設定方法は Roo-Code MCP ドキュメント を参照してください。

    json
    {
      "mcpServers": {
        "jgrants": {
          "type": "streamable-http",
          "url": "http://192.168.0.131:8484/mcp",
          "alwaysAllow": [
            "search_subsidies",
            "get_subsidy_detail",
            "get_subsidy_overview",
            "get_file_content",
            "ping"
          ]
        }
      }
    }

    備考:

    • url には実際のサーバーのIPアドレスとポート番号を指定してください
    • alwaysAllow は自動的に実行を許可するツールの一覧です(省略可)
    • リモート接続の場合、ファイアウォールやネットワーク設定を確認してください
  3. VS Code を再起動

接続確認

Claude Desktop の場合: Claude Desktop を開き、新しい会話で以下のように質問してみてください:

補助金を検索できますか?

Roo-Code の場合: VS Code で Roo-Code を開き、チャットで以下のように質問してみてください:

補助金を検索できますか?

サーバーが正しく設定されていれば、利用可能なツールの一覧が表示されます。

Prompts と Resources

MCPサーバーは、LLMが効果的にツールを使用できるよう、プロンプトとリソースを提供します。

Prompts(動的ガイド)

  • subsidy_search_guide: 補助金検索のベストプラクティスと推奨検索パターン
  • api_usage_agreement: API利用規約と免責事項の確認

Resources(静的リファレンス)

  • jgrants://guidelines: MCPサーバー利用ガイドライン、API制限、トラブルシューティング

利用可能なツール

1. search_subsidies

補助金を検索します。キーワード、業種、地域、従業員数などで絞り込み可能。

パラメータ:

  • keyword (str): 検索キーワード(2文字以上必須)
  • industry (str, optional): 業種
  • target_area_search (str, optional): 対象地域
  • target_number_of_employees (str, optional): 従業員数制約
  • sort (str): ソート順(acceptance_end_datetime / acceptance_start_datetime / created_date)
  • order (str): 昇順/降順(ASC / DESC)
  • acceptance (int): 受付状態(0: 全て / 1: 受付中のみ)

2. get_subsidy_detail

補助金の詳細情報を取得し、添付ファイルをローカルに保存します。

パラメータ:

  • subsidy_id (str): 補助金ID(18文字以下)

返却情報:

  • 補助金の詳細情報(タイトル、補助上限額、補助率、受付期間など)
  • 添付ファイルのfile:// URL(公募要領、概要資料、申請様式など)
  • ファイル保存先ディレクトリのパス

3. get_subsidy_overview

補助金の統計情報を取得します(締切期間別、金額規模別の集計)。

パラメータ:

  • output_format (str): 出力形式(json / csv)

4. get_file_content

保存済みの添付ファイルの内容を取得します。

パラメータ:

  • subsidy_id (str): 補助金ID
  • filename (str): ファイル名
  • return_format (str): 返却形式(markdown / base64)

機能:

  • PDF、Word、Excel、PowerPoint、ZIPをMarkdownに自動変換
  • 変換失敗時はBASE64形式で返却

5. ping

サーバーの疎通確認を行います。

開発とテスト

テスト実行

bash
# テスト実行
pytest tests/test_core.py

デバッグ

bash
# デバッグモードで起動
python -m jgrants_mcp_server.core --log-level DEBUG

ライセンス

MIT License - 詳細はLICENSEファイルを参照してください。

免責事項

本実装は、技術検証を目的としたサンプルコードです。以下の点にご留意ください:

  • 本コードは現状のまま提供され、動作の安定性や継続的な保守を保証するものではありません
  • Jグランツサービスの検索性や動作の安定性を保証するものではありません
  • 実際の利用にあたっては、JグランツAPIの利用規約 (https://www.jgrants-portal.go.jp/open-api) に準じてご利用ください

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "digital-go-jp-jgrants-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

Use Jグランツ MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Jグランツ MCP Server 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 Jグランツ 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 Jグランツ 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": {
    "digital-go-jp-jgrants-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "jgrants-mcp-server"
      ]
    }
  }
}
4

Use it across models

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

Option 2: Add an MCP server URL

Use this when Jグランツ MCP Server 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 your server URL 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 your server URL into the Server URL field.
  2. Enter a connection name for Jグランツ MCP Server.
  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 Jグランツ MCP Server 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 Jグランツ MCP Server 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 Jグランツ MCP Server 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 Jグランツ MCP Server to help me with this task?
Jグランツ MCP Server
Sure. I read it.
Here is what I found using Jグランツ MCP Server.

Frequently asked questions

What is the Jグランツ MCP Server MCP server used for?

Jグランツ 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 Jグランツ MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Jグランツ 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 Jグランツ 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 Jグランツ 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 Jグランツ MCP Server MCP to TypingMind?

Jグランツ MCP Server 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 Jグランツ MCP Server MCP provide in TypingMind?

Jグランツ 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 Jグランツ 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 Jグランツ 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 👇