J grants(由日本数字厅运营的国家或地方政府补助金电子申请系统)公开 API 使用的 MCP 服务器。本项目利用 FastMCP 库提供以下 MCP 工具,帮助用户更便捷地获取补助金相关信息。
本项目旨在为用户提供便捷的方式来访问 J grants 公开 API,获取补助金的相关信息。通过几个简单的步骤,你就可以开始使用这些工具。
httpx 库实现异步访问 J grants API,提高响应速度和效率。list_subsidies(keyword: str = "补助金"):指定关键词(默认为“补助金”),搜索并获取正在接受申请的补助金一览表。get_subsidy_detail(subsidy_id: str):使用补助金 ID 获取详细信息。获取时,去除庞大的 base64 数据,转而提供下载用 URL。download_attachment(subsidy_id: str, category: str, index: int):指定补助金的附件(类别、索引指定),返回下载用 URL。httpxfastmcpfastapiuvicorngit clone
pip install httpx fastmcp fastapi uvicorn
keyword (字符串,可选) – 搜索关键词,默认为“补助金”。{
"subsidies": [
{
"id": "a0WJ200000CDIUiMAP",
"name": "补助金项目1",
"description": "该项目的描述。",
"amount": "100000"
},
...
]
}
subsidy_id (字符串) – 补助金 ID。{
"id": "a0WJ200000CDIUiMAP",
"name": "补助金项目1",
"description": "该项目的描述。",
"amount": "100000",
"details": {
"eligibility": "符合条件的条件。",
"application_deadline": "申请截止日期。",
"contact_information": "联系方式。"
}
}
subsidy_id (字符串) – 补助金 ID。category (字符串) – 附件类别(例如:application_guidelines, outline_of_grant, application_form)。index (整数) – 附件索引(从 0 开始)。{
"url": "https://your-mcp-server.example.com/subsidies///"
}
⚠️ 重要提示
所有工具中,请使用 ID 而不是标题来识别补助金(例如:"a0WJ200000CDIUiMAP")。