Back to MCP directory
publicPublicdnsLocal runtime

jgrants-mcp-server

一个基于Jグランツ(日本数字厅运营的政府补助金电子申请系统)公开API的MCP服务器项目,提供补助金搜索、详情获取和附件下载功能。

article

README

🚀 jgrants-mcp-server

J grants(由日本数字厅运营的国家或地方政府补助金电子申请系统)公开 API 使用的 MCP 服务器。本项目利用 FastMCP 库提供以下 MCP 工具,帮助用户更便捷地获取补助金相关信息。

🚀 快速开始

本项目旨在为用户提供便捷的方式来访问 J grants 公开 API,获取补助金的相关信息。通过几个简单的步骤,你就可以开始使用这些工具。

✨ 主要特性

  • 非同步处理:使用 httpx 库实现异步访问 J grants API,提高响应速度和效率。
  • MCP 工具:FastMCP 提供以下三个工具,以 MCP 格式公开:
    • list_subsidies(keyword: str = "补助金"):指定关键词(默认为“补助金”),搜索并获取正在接受申请的补助金一览表。
    • get_subsidy_detail(subsidy_id: str):使用补助金 ID 获取详细信息。获取时,去除庞大的 base64 数据,转而提供下载用 URL。
    • download_attachment(subsidy_id: str, category: str, index: int):指定补助金的附件(类别、索引指定),返回下载用 URL。
  • 轻量响应:去除不必要的数据,提供简洁的响应,减少数据传输量。

📦 安装指南

环境要求

  • Python 3.6 以上
  • 必要的库:
    • httpx
    • fastmcp
    • fastapi
    • uvicorn

安装步骤

  1. 克隆仓库:
    git clone <your-repository-url>
    
  2. 安装环境依赖库:
    pip install httpx fastmcp fastapi uvicorn
    

💻 使用示例

list_subsidies

基础用法

  • 输入参数
    • keyword (字符串,可选) – 搜索关键词,默认为“补助金”。
  • 输出示例
    {
      "subsidies": [
        {
          "id": "a0WJ200000CDIUiMAP",
          "name": "补助金项目1",
          "description": "该项目的描述。",
          "amount": "100000"
        },
        ...
      ]
    }
    

get_subsidy_detail

基础用法

  • 输入参数
    • subsidy_id (字符串) – 补助金 ID。
  • 输出示例
    {
      "id": "a0WJ200000CDIUiMAP",
      "name": "补助金项目1",
      "description": "该项目的描述。",
      "amount": "100000",
      "details": {
        "eligibility": "符合条件的条件。",
        "application_deadline": "申请截止日期。",
        "contact_information": "联系方式。"
      }
    }
    

download_attachment

基础用法

  • 输入参数
    • subsidy_id (字符串) – 补助金 ID。
    • category (字符串) – 附件类别(例如:application_guidelines, outline_of_grant, application_form)。
    • index (整数) – 附件索引(从 0 开始)。
  • 输出示例
    {
      "url": "https://your-mcp-server.example.com/subsidies/<subsidy_id>/<category>/<index>"
    }
    

⚠️ 重要提示

所有工具中,请使用 ID 而不是标题来识别补助金(例如:"a0WJ200000CDIUiMAP")。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client