Skip to main content
Glama
yoshitokameyama

jgrants-mcp-poc

Jグランツ补助金检索 MCP — torchi PoC

デジタル庁的Jグランツ公开API是一个只读远程MCP,用于从Notion等MCP客户端使用。

以デジタル庁的公开示例 digital-go-jp/jgrants-mcp-server 为基础,增加了面向Sliplane常设运行的认证、健康检查、容器构成和输出量控制。

提供的工具

  • ping — 连接确认

  • search_subsidies — 按关键词、地区、行业、员工人数、使用目的进行检索

  • get_subsidy_overview — 按截止期间・上限金额进行汇总

  • get_subsidy_detail — 获取详细信息和附件列表

  • get_file_content — 仅将选中的附件转换为Markdown

检索结果会附上官方JグランツURL和出处。获取的信息仅供参考,申请前请确认官方页面的最新信息。

Related MCP server: koko-call-mcp

远程构成

Notion
  -> HTTPS + Bearer token
  -> Caddy gateway(公開)
  -> FastMCP server(Sliplane内部のみ)
  -> Jグランツ公開API
  • /health 作为监控用途,无需认证即可公开访问。

  • /mcp 在Gateway和MCP本体两侧都验证相同的Bearer token。

  • Token仅保存在Sliplane的Secret环境变量中,不会放入GitHub或日志。

  • 附件保存在MCP本体的临时区域,仅返回所需文件的正文。

本地开发

使用Python 3.10及以上版本和uv。

uv sync
uv run pytest
JGRANTS_REQUIRE_AUTH=0 uv run python -m jgrants_mcp_server

带认证的Docker构成如下。

cp .env.example .env
# .envのMCP_AUTH_TOKENを32文字以上のランダム値へ変更
docker compose up --build
curl http://localhost:8080/health
curl -i http://localhost:8080/mcp

未认证的 /mcp 将返回HTTP 401。

Sliplane设置

从同一个GitHub仓库创建2个服务。

jgrants-mcp

  • Dockerfile: Dockerfile

  • 公开: 关闭

  • Healthcheck: /health

  • 环境变量:

    • JGRANTS_HOST=0.0.0.0

    • JGRANTS_PATH=/mcp

    • JGRANTS_REQUIRE_AUTH=1

    • MCP_AUTH_TOKEN=<secret>

    • PORT=8000

jgrants-mcp-gateway

  • Dockerfile: gateway/Dockerfile

  • 公开: 开启

  • Healthcheck: /health

  • 环境变量:

    • MCP_AUTH_TOKEN=<same secret>

    • UPSTREAM_URL=http://jgrants-mcp.internal:8000

将push到main作为自动部署对象。在Notion中注册Gateway的公开URL加上/mcp后的URL和Bearer token。

许可证与出处

代码采用MIT License。使用JグランツAPI时,请遵守JグランツAPI使用条款。公开或转用时,请注明Jグランツ为出处。

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for Japan's Jグランツ grant application system, enabling LLMs to search and retrieve subsidy information via natural language.
    50
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Read-only MCP server for searching Japanese government procurement bid notices (官公需) from the SME Agency's KKJ portal. Includes AI ranking, PDF requirement extraction, and CSV/calendar export.
    49 npm
    Apache 2.0
  • F
    license
    B
    quality
    D
    maintenance
    MCP server for searching Japanese government procurement notices via the Kanpou API. Enables LLMs to search by date, keyword, or detailed criteria.
    3
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for searching Japanese corporate data including companies, financials, patents, subsidies, and government statistics via official government APIs.
    1
    MIT