search_historical_opportunities
Pack: grants-gov · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/search_historical_opportunities for the schema, then POST the same URL with its arguments for the data.
Search Grants.gov’s FULL opportunity history (closed and archived opportunities back to 2004, plus forecasted opportunities not yet posted) — coverage search_opportunities’ live API cannot serve, since search2 only usefully answers “what is open right now”. Covers Grants.gov’s full catalog, refreshed once a day (see data_as_of). Filter by agency code, CFDA/Assistance Listing number, keyword (full-text over title + description), status, opportunity category, or post-date range. Unlike search_opportunities, status here defaults to EVERY status, not just “posted” — pass status explicitly to narrow. Answers “what did this agency fund last fiscal year”, “what opportunities under CFDA 93.351 have ever closed”, “what is forecasted for next year that hasn’t posted yet”.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
agency_code | string | no | Agency or sub-agency code, e.g. “NIH” or “HHS-NIH11” or “DOS”. Matches as a prefix/segment against the fully-qualified codes on file (same bare-vs-qualified forgiveness as search_opportunities’ agencies). Alias: agency. |
agency | string | no | Alias for agency_code. |
cfda | string | no | Assistance Listing Number / CFDA number, exact match, e.g. “93.351”. Alias: aln. |
aln | string | no | Alias for cfda. |
keyword | string | no | Full-text search over the opportunity title and description (PostgreSQL websearch syntax — quote a phrase, “-word” to exclude). More forgiving than the live tool’s exact-phrase keyword match. |
status | string | no | posted | closed | archived | forecasted. Omit to search every status, unlike the live tool (whose default is “posted”). |
opportunity_category | string | no | Single-letter Grants.gov category code: D discretionary, M mandatory, C continuation, E earmark, O other. |
post_date_from | string | no | Only opportunities posted on/after this date, YYYY-MM-DD. |
post_date_to | string | no | Only opportunities posted on/before this date, YYYY-MM-DD. |
limit | number | no | Rows to return, 1-500 (default 25). |
offset | number | no | 0-based start record, for paging. |
Example call
Arguments
{
"agency_code": "NIH",
"status": "closed",
"limit": 10
}
curl
curl -X POST https://gateway.pipeworx.io/grants-gov/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_historical_opportunities","arguments":{"agency_code":"NIH","status":"closed","limit":10}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('search_historical_opportunities', {
"agency_code": "NIH",
"status": "closed",
"limit": 10
});
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the grants-gov pack
{
"mcpServers": {
"grants-gov": {
"url": "https://gateway.pipeworx.io/grants-gov/mcp"
}
}
}
See Getting Started for client-specific install steps.