关于 mcp-grantiq
mcp-grantiq 是面向处理美国联邦资金信息的 Agent 和开发者的 MCP 服务,整合 Grants.gov 与 SAM.gov 的资助和合同搜索、机构匹配及历史授予查询。
主要功能
- 01按关键词、机构、金额或状态搜索资助
- 02按关键词和 NAICS 编码搜索合同
- 03根据机构资料匹配机会
- 04查看截止日期和机构列表
- 05查询资助、合同及历史授予详情
- 06缓存响应 24 小时
适用场景
- 01查找与项目或重点领域相关的资助
- 02按 NAICS 编码寻找 SAM.gov 合同
- 03筛选符合机构条件的资金机会
- 04跟踪临近截止日期的机会
MCP 相关
通过 streamable HTTP 传输向 MCP 客户端提供八种类型化工具。每种工具也提供 REST 接口。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://mcp.grantiq.us/mcp/claude mcp add --transport http bch1212-mcp-grantiq https://mcp.grantiq.us/mcp/{"mcpServers":{"bch1212-mcp-grantiq":{"type":"http","url":"https://mcp.grantiq.us/mcp/"}}}在 Cursor 中打开{"servers":{"bch1212-mcp-grantiq":{"type":"http","url":"https://mcp.grantiq.us/mcp/"}}}在 VS Code 中打开{"mcpServers":{"bch1212-mcp-grantiq":{"type":"http","url":"https://mcp.grantiq.us/mcp/"}}}{"mcpServers":{"bch1212-mcp-grantiq":{"serverUrl":"https://mcp.grantiq.us/mcp/"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
https://mcp.grantiq.us/mcp/需要授权工具
8| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| limit | integer | 否 | 要返回的最大行数(1-100) |
| agency | any | 否 | 按机构代码筛选(例如 "USDA") |
| status | any | 否 | 机会状态 — "posted"、"forecasted"、"closed" |
| keyword | string | 否 | 自由文本搜索词 |
| amount_max | any | 否 | 以 USD 计的最高资助额度 |
| amount_min | any | 否 | 以 USD 计的最低资助额度 |
详细介绍
GrantIQ MCP
一款付费 MCP 服务,让 AI Agent 即时、结构化地访问所有开放的美国联邦拨款和合同机会。 数据由 Grants.gov + SAM.gov 提供支持,配备 24 小时 SQLite 缓存、每个密钥的每日限额,以及兼容 Stripe 的升级钩子。
https://mcp.grantiq.us/mcp/
MCPize 列表文案
标题: GrantIQ MCP — 面向 AI Agent 的美国联邦拨款与合同
副标题: 通过任意 LLM,在一次工具调用中搜索、匹配和监控 SAM.gov 与 Grants.gov 上所有开放的机会。
GrantIQ MCP 将纷繁复杂的美国政府资助信息转化为简洁、适用于 Agent 的 API。八个类型化工具涵盖方方面面,从广泛的关键词搜索和按 NAICS 编码发现合同,到截止日期提醒和历史授予查询。响应会在两个数据源之间统一格式,以纯 JSON 返回,并缓存 24 小时,因此重复查询不会消耗上游机构的速率限额。
GrantIQ MCP 专为采购助手、拨款查找 Agent 和 B2G 销售工具打造,提供免费套餐(每天 50 次调用),任何开发者都能在 15 秒内将其接入 Claude 或 Cursor。升级至 Pro,每月 $19,即可不限量调用;也可按每次调用 $0.02 付费,满足突发工作负载需求——通过单个 webhook 即可将密钥从免费版切换为 Pro,无需重写应用。
定价
| 套餐 | 价格 | 限额 |
|---|---|---|
| 免费 | $0 | 每个密钥每天 50 次调用 |
| Pro | 每月 $19 | 不限量 |
| 按用量付费 | 每次调用 $0.02 | 不限量 |
安装
claude mcp add grantiq-mcp --url https://mcp.grantiq.us/mcp/
然后添加 Claude 应使用的 API 密钥:
claude mcp env grantiq-mcp X-API-Key=your-api-key
没有共享的公共密钥。请使用下方的管理端点生成密钥(免费套餐每天限 50 次调用),并将其存储在客户端配置或环境变量中。
工具参考
| 工具 | 参数 | 返回值 |
|---|---|---|
search_grants | keyword、agency、amount_min、amount_max、status、limit | 匹配的拨款列表 |
get_grant_details | opportunity_id | 完整的拨款对象 |
search_contracts | keyword、naics_code、agency、set_aside、limit | SAM 合同列表 |
get_contract_details | notice_id | 完整的合同对象 |
match_opportunities | org_description、org_type、focus_areas | 匹配度最高的 10 个机会(拨款 + 合同) |
get_agencies | type(grants / contracts / both) | 有开放机会的机构,按数量排序 |
get_deadlines | days_ahead | N 天内截止的机会 |
search_awards | recipient_name、agency、year | SAM 历史授予记录 |
每个工具都会返回以下内容之一:
{ "success": true, "cached": false, "data": { ... } }
如果失败,则返回:
{ "success": false, "error": "..." }
达到每日限额时,HTTP 层会返回 429,响应体为:
{ "error": "Limit reached. Upgrade at mcpize.com/grantiq-mcp" }
curl 示例
MCP 端点使用 JSON-RPC 可流式传输的 HTTP 协议,建议通过 MCP 客户端使用。为方便起见,每个工具也都提供了 REST 镜像端点 /tools/<tool>。
# Search grants
curl -s https://mcp.grantiq.us/tools/search_grants \
-H 'Content-Type: application/json' \
-H 'X-API-Key: your-api-key' \
-d '{"keyword":"renewable energy","limit":5}'
# Get grant details
curl -s https://mcp.grantiq.us/tools/get_grant_details \
-H 'Content-Type: application/json' \
-H 'X-API-Key: your-api-key' \
-d '{"opportunity_id":"345678"}'
# Search SAM.gov contracts (cyber, small-business set-aside)
curl -s https://mcp.grantiq.us/tools/search_contracts \
-H 'Content-Type: application/json' \
-H 'X-API-Key: your-api-key' \
-d '{"keyword":"cybersecurity","set_aside":"SBA","limit":5}'
# Get contract details
curl -s https://mcp.grantiq.us/tools/get_contract_details \
-H 'Content-Type: application/json' \
-H 'X-API-Key: your-api-key' \
-d '{"notice_id":"abc123"}'
# Match opportunities to an org profile
curl -s https://mcp.grantiq.us/tools/match_opportunities \
-H 'Content-Type: application/json' \
-H 'X-API-Key: your-api-key' \
-d '{"org_description":"Battery storage R&D startup","org_type":"for-profit","focus_areas":["energy","battery","storage"]}'
# Top agencies right now
curl -s https://mcp.grantiq.us/tools/get_agencies \
-H 'Content-Type: application/json' \
-H 'X-API-Key: your-api-key' \
-d '{"type":"both"}'
# Deadlines in the next 14 days
curl -s https://mcp.grantiq.us/tools/get_deadlines \
-H 'Content-Type: application/json' \
-H 'X-API-Key: your-api-key' \
-d '{"days_ahead":14}'
# Past award history
curl -s https://mcp.grantiq.us/tools/search_awards \
-H 'Content-Type: application/json' \
-H 'X-API-Key: your-api-key' \
-d '{"recipient_name":"Acme Corp","year":2025}'
运维端点
生成新密钥(免费或 Pro):
curl -s https://mcp.grantiq.us/admin/keys \
-H 'X-Admin-Token: $GRANTIQ_ADMIN_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"tier":"free","daily_limit":50}'
将免费密钥升级为 Pro(由 Stripe 结账成功 webhook 调用):
curl -s https://mcp.grantiq.us/billing/upgrade \
-H 'X-Admin-Token: $GRANTIQ_ADMIN_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"key":"grantiq_xxxxx"}'
本地开发
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Replace the placeholders, then export them. The process refuses to start
# until GRANTIQ_ADMIN_TOKEN is a real value (not the example placeholder).
set -a && source .env && set +a
python server.py # http://localhost:8000
pytest -v # 31 tests, hermetic with respx mocks
部署到 Railway
仓库中包含 nixpacks.toml。运行 railway init 后,只需执行 railway up。启动命令为 python server.py(而非 uvicorn ...),因为 Railway 会在没有 shell 的情况下执行 [start].cmd——server.py 通过 os.getenv 读取 $PORT,并以编程方式启动 uvicorn。
在 Railway 服务中设置以下变量:
SAM_API_KEY— 你的 SAM.gov 密钥(没有此密钥时,合同工具会拒绝执行)GRANTIQ_ADMIN_TOKEN— 长随机字符串,启动时必需GRANTIQ_DB_PATH— 如果挂载了 Volume,则设为/data/grantiq.db(建议设置,以便在部署后保留缓存和密钥)
此目录中提供了可直接运行的 deploy.sh。
注意事项
- SAM.gov 奖项历史记录通过按
ptype=a(Award Notice)筛选的机会 API 提供。若要进行更深入的奖项分析(CFDA 级别的总额、受领方汇总),USAspending.gov 更为合适,可在 v2 中添加。 - 缓存 TTL 为全局设置(24 小时)。对于对截止日期敏感的流程,Agent 应传入不同的查询参数,或调用
/admin/keys创建一个绕过缓存的密钥(尚未开放,参见 TODO)。 - 匹配评分基于标题和机构词元,通过确定性的 Jaccard 算法计算。该方法快速且免费;也可以在相同接口后添加 LLM 重排。
- Stripe 接入是单向的(
/billing/upgrade)。MCP 服务本身不承载结账页面,该页面位于营销网站上。
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。