npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ishidad2/jgrants-mcp-server

v2.0.1

Published

Jグランツ MCP Server - TypeScript implementation

Readme

Jグランツ MCP Server

License: MIT Node.js 18+ TypeScript FastMCP

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

本プロジェクトについて

本プロジェクトは Digital Agency, Government of Japan が MIT License で公開する jgrants-mcp-server を元に TypeScript 化・改変した非公式実装です。

  • デジタル庁との提携・認証・公式保証を示すものではありません
  • 元リポジトリのライセンス(MIT License)を継承します
  • 改変内容の詳細は NOTICE および CHANGELOG を参照してください

特徴

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

動作確認環境

  • Claude Desktop: v0.7.10以上
  • Node.js: 18以上
  • TypeScript: 5.5以上

クイックスタート

前提条件

  • Node.js 18以上

Claude Desktop との連携

ビルド不要で、設定ファイルに以下を追記するだけで利用できます。

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

{
  "mcpServers": {
    "jgrants": {
      "command": "npx",
      "args": ["-y", "@ishidad2/jgrants-mcp-server"]
    }
  }
}

Claude Desktop を再起動すれば、補助金検索ツールが利用可能になります。

環境変数(オプション)

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

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

環境変数を設定する場合は env フィールドを追加します:

{
  "mcpServers": {
    "jgrants": {
      "command": "npx",
      "args": ["-y", "@ishidad2/jgrants-mcp-server"],
      "env": {
        "JGRANTS_FILES_DIR": "/tmp/jgrants_files"
      }
    }
  }
}

ローカル開発・開発者向け

リポジトリをクローンしてローカルで実行する場合:

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

# 依存パッケージのインストール
npm install

# TypeScript のビルド
npm run build

# 起動(stdio モード)
npm start

開発モード(ビルド不要)

npm run dev

Roo-Code との連携

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

Roo-Code の MCP 設定ファイルを編集:

{
  "mcpServers": {
    "jgrants": {
      "command": "npx",
      "args": ["-y", "@ishidad2/jgrants-mcp-server"],
      "alwaysAllow": [
        "search_subsidies",
        "get_subsidy_detail",
        "get_subsidy_overview",
        "get_file_content",
        "ping"
      ]
    }
  }
}

VS Code を再起動すれば利用可能になります。

Prompts と Resources

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

Prompts(動的ガイド)

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

Resources(静的リファレンス)

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

利用可能なツール

1. search_subsidies

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

パラメータ:

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

2. get_subsidy_detail

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

パラメータ:

  • subsidy_id (string): 補助金ID

返却情報:

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

3. get_subsidy_overview

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

パラメータ:

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

4. get_file_content

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

パラメータ:

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

機能:

  • PDF、Word、Excel をMarkdownに自動変換
  • PowerPoint、ZIP は Python(markitdown)経由で変換(オプション)
  • 変換失敗時はBASE64形式で返却

5. ping

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

開発とテスト

ユニットテスト

npm test

統合テスト

# サーバーを起動(バックグラウンド)
npm run dev &

# 統合テストを実行
npx tsx tests/test_server.ts

PPTX / ZIP 変換について(オプション)

PPTX/ZIP ファイルを Markdown に変換するには Python 環境と markitdown が必要です:

pip install markitdown

Python 環境がない場合は自動的に BASE64 形式にフォールバックします。 詳細は docs/move/README.md を参照してください。

ライセンス

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

免責事項

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

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