This is the full developer documentation for Capture MCP # Capture MCP > Ask your AI assistant real questions about federal contracts, grants, and spending. The answers come from SAM.gov, USAspending, Tango, and HigherGov. ## Connect in one step Add `https://capture.mcp.blencorp.com/mcp` as a custom connector (a remote MCP server) in Claude, ChatGPT, Cursor, VS Code, or another assistant. Your assistant opens a page from the server. Tick the sources you use, paste your own [key](/docs/keys/) for each, and continue. There is no account to create. You need at least one key, and a source without a key is simply off. The reference codes and USAspending need none. [Step-by-step guides](/docs/connect/) ## Ask in plain language * “Which small business set-aside solicitations were posted in Texas this month?” * “Who won the most 8(a) sole source awards at the VA in August and September 2025?” * “Is this vendor excluded from federal contracting, and what have they been awarded?” ## What it covers Reference codes Official FPDS descriptions for set-aside, competition, and award-type codes. It needs no key. USAspending Awards, spending by category, budgetary resources, and groupings by agency, recipient, NAICS, PSC, month, or set-aside. It needs no key. SAM.gov Contract opportunities, entity registrations, and exclusions, and two tools that join them with USAspending awards. Tango Contracts, grants, vendor profiles, GAO bid protests, IDVs and vehicles, OTAs, and spending over time. HigherGov Forecasts, opportunities, awarded contracts for recompete targeting, federal contacts, and solicitation documents. ## How it works 1. **Pick the tool.** Your assistant chooses one of 34 narrow tools, such as `search_tango_contracts` or `get_sam_opportunities`. 2. **Fill in the arguments.** The server checks each one before anything leaves it. 3. **Get the answer.** The server calls the source with your key, paces the call, and returns JSON that says which filters ran and which did not. The server keeps no database. Your keys travel inside the token your assistant holds, and the server uses them for your calls only. [How it works](/docs/how-it-works/) ## Made for assistants too One file for the site [llms.txt](/docs/llms.txt) lists every page. [llms-full.txt](/docs/llms-full.txt) is the whole site in one file. Markdown for every page **Copy page** at the top of a page copies it as Markdown, ready to paste. Ask about a page The **Open** menu sends a page to ChatGPT or Claude. *** Open source under Apache-2.0. This is an independent project. It calls the public APIs of SAM.gov, USAspending.gov, Tango, and HigherGov and is not affiliated with or endorsed by them or by the U.S. government. # Connect your assistant > Add the hosted server to Claude, Claude Code, Cursor, VS Code, Gemini CLI, or ChatGPT, and what to do when a connection fails. BLEN hosts the server at: ```text https://capture.mcp.blencorp.com/mcp ``` Your assistant connects to it over HTTPS. Before you start, [get your keys](/docs/keys/) for the sources you use. The connection needs at least one of the three; the reference codes and USAspending need none. When your assistant first connects, it opens a page from the server. Tick the sources you use, paste your own key for each, and continue. There is no account to create and no password. The server seals your keys inside the token it gives your assistant, so the next time you connect from the same assistant you are not asked again until that token expires. ## Claude In Claude, open **Settings → Connectors**, choose **Add custom connector**, and enter the URL above. Claude opens the server’s page for your keys. Connectors for a team or organization are added by an owner of that account. ## Claude Code ```bash claude mcp add --transport http capture https://capture.mcp.blencorp.com/mcp ``` Then run `/mcp` in Claude Code, choose **capture**, and authenticate. Claude Code opens the server’s page for your keys in your browser. ## Cursor Add the server to `~/.cursor/mcp.json`, or to `.cursor/mcp.json` in one project, then choose **Connect** next to it in Cursor’s MCP settings: .cursor/mcp.json ```json { "mcpServers": { "capture": { "url": "https://capture.mcp.blencorp.com/mcp" } } } ``` ## VS Code Add the server to `.vscode/mcp.json`, or run **MCP: Add Server** from the command palette: .vscode/mcp.json ```json { "servers": { "capture": { "type": "http", "url": "https://capture.mcp.blencorp.com/mcp" } } } ``` VS Code opens the server’s page for your keys when it starts the server. ## Gemini CLI Add the server to `~/.gemini/settings.json`, or to `.gemini/settings.json` in one project, then run `/mcp auth capture`: settings.json ```json { "mcpServers": { "capture": { "httpUrl": "https://capture.mcp.blencorp.com/mcp" } } } ``` ## ChatGPT and other remote clients ChatGPT and other clients that take a remote MCP server work the same way: add the URL as a custom connector, then enter your keys on the page the server shows. Which plans offer custom connectors is up to the client. ## Run it yourself To run the server on your own computer, with the keys in its environment and no sign-in, or to host your own, see [Self-host](/docs/self-host/). ## Check that it works Ask your assistant: > What does the set-aside code 8AN mean? The assistant calls `lookup_reference_code`, which needs no key. Then try a question for a source whose key you entered, such as “Find SAM.gov opportunities posted this week for NAICS 541512.” | What you see | Cause | Fix | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | A source’s tools are missing from the list | You did not enter a key for that source. | Disconnect the connector and connect again, and enter the key. | | `Tool "…" not found` | The same: the tool needs a key the connection does not have. | As above. | | `API Error 401` or `403`, or `auth_failed` | The source refused the key. The server does not check a key when you enter it. | Check the key with its source (see [Get your keys](/docs/keys/)), then connect again. | | `API Error 429`, or `rate_limited` | The source’s limit for the key is used up. | Wait, and ask for less. | | The assistant says the connection expired, or asks you to connect again | The access token ran out (30 days), and the refresh token (90 days) could not renew it, for example because the server restarted and forgot your assistant. | Connect again. | [Tool reference](/docs/reference/sdk/#results-and-errors) describes the error shapes. # How it works > The tools, how the server turns a question into a call to SAM.gov, USAspending, Tango, or HigherGov, and how it stays inside their limits. The server gives your assistant 34 narrow tools. There is no code to write and no sandbox: the assistant picks a tool and fills in its arguments, and the server calls the source. The server does not run a language model. 1. **Your assistant**Calls one tool with filters such as dates, a NAICS code, or a UEI. 2. **Tool**Checks every argument before anything is sent. 3. **Server process**Adds your key for that source and paces the call. 4. **The source**SAM.gov, USAspending, Tango, or HigherGov. Reference codes come from a built-in table. ## Sources and tools | Source | Tools | Key | | --------------- | -------------------------------------------- | ------------------------------------------------ | | Reference codes | 1 | None. A built-in table, with no network request. | | USAspending | 6 | None. A public API. | | SAM.gov | 4, plus 2 that join SAM.gov with USAspending | SAM.gov | | Tango | 12 | Tango | | HigherGov | 9 | HigherGov | All of them are read-only. [Tools](/docs/reference/tools/) lists each tool, the [tool reference](/docs/reference/sdk/) has every argument, and [Example questions](/docs/recipes/) shows calls for common questions. ## What a call does 1. **Lists the tools your keys unlock.** Each request builds its own tool list from the keys that request may use, so one person’s tool list never depends on another’s. 2. **Checks the arguments.** Each tool has a strict schema. An argument it does not list, a missing required one, or a value of the wrong type is refused with a `bad_request`, and nothing reaches the source. 3. **Adds your key.** The server fills in the tool’s `api_key` argument with your key for that source, unless the caller passed one. 4. **Waits its turn.** Each source has a pacing queue (see below). 5. **Calls the source.** The server sends one request, with a 30 second limit. 6. **Answers.** The result is JSON, as text and as structured content. A failure says why; the [tool reference](/docs/reference/sdk/#results-and-errors) describes its shapes. ## What the answers say about themselves The main search tools (Tango contracts, grants and opportunities, HigherGov contracts, people, opportunities and forecasts, and USAspending awards by recipient) return one shape, so your assistant can tell what actually ran: * **`filters`** lists what the source applied (`upstream`) and what the server applied afterwards to the page it got (`client_side`). * **`total`** is a number only when it can be trusted. When a filter ran client-side, or the source matches loosely, it is `null`, and the source’s own number moves to `total_upstream_unfiltered` or `total_upstream_unverified`, with a warning. * **`count_unit`** says what is counted, and **`date_field`** says which date a date filter used. * **`next_cursor`** pages. Pass it back as `cursor`. It is `null` on the last page. The other list tools (SAM.gov searches and exclusion checks, Tango protests, IDVs, vehicles and OTAs, and the HigherGov saved-search list) keep simpler shapes, such as `{ total, entities, page, limit }`, without these fields. Their `total` is `0` when the source gives none. The [tool reference](/docs/reference/sdk/#results-and-errors) lists each one. Records from the sources are third-party text. They can contain words that look like instructions. ## The limits Each source also applies its own quota to your key, which the server does not track. The server adds pacing, so an assistant that loops does not use it up. There is one pacing queue for each source for the whole server process, and calls wait their turn in order: | Source | Minimum gap between calls | | ----------- | ------------------------- | | SAM.gov | 0.1 seconds | | Tango | 0.1 seconds | | HigherGov | 0.2 seconds | | USAspending | 3.6 seconds | * USAspending has no key, so every caller of the server shares its one queue. A question that groups awards by set-aside makes one USAspending request for each code, so it takes a few seconds for each code. * The server does not retry. A source that answers `429` fails the call with that status. * The HigherGov `get_*` tools cache a result for 15 minutes, for the key that asked, so a repeated lookup does not spend quota. * The server adds no limit to `/mcp`. The MCP SDK’s OAuth endpoints limit each address by default: 100 authorization requests and 50 token or revocation requests every 15 minutes, and 20 client registrations an hour. ## What it does not do * It changes nothing at any source. Every tool is read-only. * It stores nothing: no database, no record of your questions or the answers, and no copy of your keys. * It does not give one caller’s key or cached result to another. # Get your keys > The API keys the server uses for SAM.gov, Tango, and HigherGov, where to get each one, how you give them to the server, and how a missing or wrong key behaves. The server calls each source with your own key. SAM.gov, Tango, and HigherGov issue a key to one person or account, so do not share yours. USAspending needs no key. | Source | What it unlocks | Where to get it | | ----------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------- | | SAM.gov | 4 SAM.gov tools and the 2 join tools | The Public API Key in your [SAM.gov account details](https://sam.gov/workspace/profile/account-details) | | Tango | 12 Tango tools | [Tango](https://tango.makegov.com/docs/), the service from makegov | | HigherGov | 9 HigherGov tools | [HigherGov](https://www.highergov.com/api-external/docs/), with an API plan | | USAspending | 6 USAspending tools | No key | * On your own computer every key is optional. The hosted connection needs at least one. A tool needs only the key for its own source. * Without a key, the source is off: the server does not list its tools, and sends nothing to it. * The reference-code lookup needs no key either, so on your own computer with no keys at all the server still has 7 tools. ## Get the SAM.gov key 1. Sign in to SAM.gov and open your [account details](https://sam.gov/workspace/profile/account-details). 2. Find the **Public API Key**, select the eye icon, and enter the one-time password that SAM.gov emails you. SAM.gov shows the key. 3. Paste it into the server’s page when your assistant [connects](/docs/connect/). The [SAM.gov Get Opportunities API documentation](https://open.gsa.gov/api/get-opportunities-public-api/) explains how SAM.gov issues keys. SAM.gov asks personal-key holders to renew the key every 90 days. The server does not know when a key expires, so renew it on your SAM.gov account page and connect again with the new one. SAM.gov also limits how many requests a key may make each day. ## Get the Tango key Create an account with [Tango](https://tango.makegov.com/docs/) and copy your API key from it. Tango limits the requests a key may make each day, and that limit can be small. Ask for what you need in few calls. ## Get the HigherGov key HigherGov offers API access with an API plan. See HigherGov’s [API documentation](https://www.highergov.com/api-external/docs/) for how to get a key. ## How the server gets your keys On the hosted server, the page your assistant opens during connection lists SAM.gov, Tango, and HigherGov. Tick a source and a field for its key appears; a ticked source with no key is refused. You must give at least one key, or the page refuses it. The server does **not** test a key when you enter it. It seals the keys, with AES-256-GCM, inside the access and refresh tokens that it gives your assistant, and it keeps nothing else: no database, no account, no copy. Each of your requests carries the token back, and the server opens it, uses the key for the one source the tool needs, and forgets it when the request ends. Because the keys live in the token: * **To add, replace, or remove a key, connect again.** Disconnect the connector in your assistant and add it again, and enter the keys you want. The old token keeps working until it expires, so rotate a key with its source too if you think it leaked. * **A token lasts 30 days, and the refresh token 90.** After that, your assistant asks you to connect again. * **A server restart ends your assistant’s ability to refresh.** The server remembers registered assistants only in memory. Your access token keeps working until it expires, and then your assistant has to connect again. ## When a key is missing, or wrong * **Missing.** The source is off, as described above. Nothing is sent to it. * **Wrong or expired.** The source answers `401` or `403`, and the call fails with that status in its error text (`auth_failed` for HigherGov). Connect again with the right key. ## Keep a key working * **Keep it private.** Never put a key in a prompt or in tool arguments. Most tools list an `api_key` argument, which the server fills in for you. A key passed there is visible to your assistant and its client, and is used instead of your connection’s key. * **Your keys are yours.** The server never uses a key from its own environment to answer a hosted caller, and never gives one caller’s key to another. * **Where the key goes.** The server sends a key only to the source it belongs to, at that source’s fixed address. SAM.gov and HigherGov take the key as a URL query parameter, so it is part of the request those providers receive. Tango receives it in a header. # Example questions > Calls your assistant can make, as the exact tool and arguments, for common federal procurement questions, and tips for your own. Your assistant turns a question into one tool call. Each call below is the exact tool and arguments for a common question. The repository checks each one against the tool’s input schema. The dates and identifiers are made up: your assistant fills in values that fit the question. ## Check a set-aside code “What does set-aside code 8AN mean?” Ask this before you filter on a code. `8A` is 8(a) Competed and `8AN` is 8(a) Sole Source. This needs no key. ```json { "tool": "lookup_reference_code", "arguments": { "domain": "set_aside", "code": "8AN" } } ``` ## Open opportunities “Find small business set-aside solicitations about software in Texas, posted in the first three weeks of November.” SAM.gov takes dates as `MM/dd/yyyy`. `SBA` is a total small business set-aside. ```json { "tool": "get_sam_opportunities", "arguments": { "posted_from": "11/01/2026", "posted_to": "11/21/2026", "keyword": "software", "set_aside": "SBA", "state": "TX", "limit": 10 } } ``` ## Look up a company “Show me the SAM.gov registration for this UEI.” ```json { "tool": "get_sam_entity_details", "arguments": { "uei": "A1B2C3D4E5F6" } } ``` “Is Acme Corp excluded from federal contracting?” ```json { "tool": "check_sam_exclusions", "arguments": { "entity_name": "Acme Corp" } } ``` “What does this company’s SAM.gov record look like next to the awards it won in fiscal 2025?” ```json { "tool": "get_entity_and_awards", "arguments": { "uei": "A1B2C3D4E5F6", "fiscal_year": 2025, "award_limit": 10 } } ``` ## Awards and spending “How many 8(a) competed and sole source awards did the VA make in August and September 2025?” This tool needs no key. It groups awards without pulling every row, and its answer says which date it filtered on. ```json { "tool": "aggregate_contracts", "arguments": { "group_by": "set_aside", "metric": "count", "date_from": "2025-08-01", "date_to": "2025-09-30", "agency": "Department of Veterans Affairs", "set_aside": [ "8A", "8AN" ] } } ``` “What did Boeing win in fiscal 2025?” ```json { "tool": "search_usaspending_awards_by_recipient", "arguments": { "recipient_name": "Boeing", "fiscal_year": 2025, "limit": 10 } } ``` “Confirm that award’s set-aside and how many offers it got before it goes in a memo.” This is the verification step: it returns the full FPDS record of one award. ```json { "tool": "get_award_detail", "arguments": { "award_id": "CONT_AWD_36C10B26F0223_3600_47QRCA24DV006_4732" } } ``` ## Contracts, protests, and trends with Tango “Which IT contracts did the VA award to service-disabled veteran-owned small businesses in fiscal 2026?” Tango takes an agency as an FPDS code, `3600` for the VA, and a set-aside as exact FPDS codes. ```json { "tool": "search_tango_contracts", "arguments": { "agency": "3600", "naics_code": "541512", "set_aside": [ "SDVOSBS" ], "date_from": "2025-10-01", "date_to": "2026-09-30", "limit": 25 } } ``` “Which VA bid protests were sustained this year?” ```json { "tool": "search_tango_protests", "arguments": { "agency": "3600", "outcome": "Sustained", "filed_date_from": "2025-01-01", "limit": 10 } } ``` “How have this vendor’s obligations moved over three years?” ```json { "tool": "get_tango_entity_metrics", "arguments": { "uei": "A1B2C3D4E5F6", "months": 36, "period_grouping": "quarter" } } ``` ## Forecasts and recompetes with HigherGov “Which IT contracts end in the first half of 2027?” Period-of-performance dates are applied by the server on the page it gets, so the answer says so in `filters` and `warnings`. ```json { "tool": "search_highergov_contracts", "arguments": { "naics": [ "541512" ], "pop_end_after": "2027-01-01", "pop_end_before": "2027-06-30", "limit": 50 } } ``` “Which service-disabled veteran-owned opportunities were posted this month?” ```json { "tool": "search_highergov_opportunities", "arguments": { "set_aside": [ "sdvosb" ], "naics": [ "5415" ], "posted_after": "2026-11-01", "limit": 25 } } ``` ## Tips * **Filter first.** Each source has its own quota, and some are small. One well-filtered call is better than many lookups. * **Read `filters` and `warnings`.** They say which filters the source applied and which the server applied to one page. A `total` of `null` means the count cannot be trusted. * **Check codes before using them.** `lookup_reference_code` lists the codes of a domain. * **Start with a small `limit`**, and page with `next_cursor` for more. * **Use `aggregate_contracts` for population figures.** `get_tango_spending_summary` summarizes one page of at most 100 records, and says when there are more. The [tool reference](/docs/reference/sdk/) lists every tool and argument. # Tool reference > Every tool, its arguments, the result shape, the error codes, and the key status tool. The server has 34 narrow tools over five sources. Every tool is read-only. There is no code to write and no sandbox: your assistant fills in a tool’s arguments, and the server runs the call. This page is generated from the tool definitions in `src/tools`, so it matches what the server accepts. ## Results and errors A result is JSON, returned as text and as structured content. Records from SAM.gov, Tango, HigherGov and USAspending are third-party text: they can contain words that look like instructions. These tools return a list envelope: the records (under a key named for them), `total`, `count_unit`, `filters`, `next_cursor`, and sometimes `date_field` and `warnings`: `search_tango_contracts`, `search_tango_grants`, `search_tango_opportunities`, `search_highergov_contracts`, `search_highergov_people`, `search_highergov_opportunities` and `search_usaspending_awards_by_recipient` (which adds its own summary fields). `search_highergov_forecasts` returns the same keys, built without the client-side check on `total`. `filters.upstream` is what the source applied and `filters.client_side` is what the server applied to the page it got. When any client-side filter ran, `total` is `null` because the source’s total does not reflect it; the source’s own number is then in `total_upstream_unfiltered`, with a warning. Pass `next_cursor` back as `cursor` for the next page. It is `null` on the last page. Other tools that return records keep their own shapes. They carry no `filters` split, `count_unit` or cursor, and a missing `total` becomes `0` rather than `null`: | Tool | Result | | ------------------------------- | ------------------------------------------------- | | `search_sam_entities` | `{ total, entities, page, limit }` | | `get_sam_opportunities` | `{ total, opportunities, dateRange, limit }` | | `check_sam_exclusions` | `{ total, excluded, exclusions, searchCriteria }` | | `search_tango_protests` | `{ total, protests, filters, limit }` | | `search_tango_idvs` | `{ total, idvs, filters, limit }` | | `search_tango_vehicles` | `{ total, vehicles, filters, limit }` | | `search_tango_otas` | `{ total, otas, filters, limit }` | | `list_highergov_saved_searches` | `{ results, source_endpoint, … }` | Here `filters` is the plain list of parameters sent, not an `upstream` and `client_side` pair. Tools that return one record or a summary (for example `get_tango_spending_summary`) have shapes of their own. A call can fail in three ways. Which one you see depends on the tool. * **A structured error.** `{ "error": { "code": "…", "message": "…" } }`, and for the HigherGov tools also `retry_after_seconds`. The result is not marked as an error. The codes are `bad_request` (an argument the tool refuses, including an unknown or mistyped argument), `not_found`, and `ambiguous_award_id`. The HigherGov tools add `auth_failed` (the source refused the key), `rate_limited` (with a wait) and `upstream_error`. * **A plain error text.** `{ "error": "API Error 401: …" }`. The source answered with an error status, or the call could not reach it (`Network error: …`). The text carries the status and the body the source sent. The result is not marked as an error. * **A tool error.** A tool that throws returns `isError: true` with `{ "error": "message" }`. So does a call to a tool name the connection does not have, for example one whose key it lacks: `{ "error": "Tool \"search_tango_contracts\" not found" }`. ## Which tools a connection has | Source | Tools | Needs | | -------------------------------- | ----- | --------------- | | Reference codes | 1 | nothing | | USAspending | 6 | nothing | | SAM.gov | 4 | a SAM.gov key | | SAM.gov and USAspending together | 2 | a SAM.gov key | | Tango | 12 | a Tango key | | HigherGov | 9 | a HigherGov key | The server lists only the tools whose key the connection has. With no keys, that is the 7 reference and USAspending tools. The two tools that join SAM.gov with USAspending need the SAM.gov key. On the hosted server, the keys are the ones you entered when you connected. On your own computer, they are the ones in the server’s environment. ## The `api_key` argument Most tools list an optional `api_key` argument. You do not need it: the server fills it in with the connection’s key for the tool’s source. Never ask your assistant to put a key in it, because anything in a tool call is visible to the assistant and its client. A key passed this way is used instead of the connection’s key. ## Tools ### Reference codes A static table of official FPDS code descriptions. It uses no key and makes no network request, so it always works. #### `lookup_reference_code` `lookup_reference_code(args)` Look up the official FPDS description for a procurement reference code, or list a whole domain. Domains: set_aside, extent_competed, award_type, solicitation_procedure, competition. Use this BEFORE filtering or reporting on any code — e.g. set_aside 8A is ‘8(a) Competed’ while 8AN is ‘8(a) Sole Source’. Static lookup: no API key, no network. Needs no key. | Parameter | Type | Required | Notes | | --------- | ------ | -------- | ----------------------------------------------------------------------------------------------- | | `domain` | string | yes | Code domain: one of set_aside, extent_competed, award_type, solicitation_procedure, competition | | `code` | string | no | The code to look up (e.g. ‘8AN’). Omit to list every code in the domain. | ### USAspending The public USAspending.gov API. It needs no key. Every USAspending call waits its turn behind one pacing queue (see [Limits](#limits)). #### `get_usaspending_awards` `get_usaspending_awards(args)` Get federal awards data for a specific agency and fiscal year. Returns award counts, obligations, and top awards. Needs no key. | Parameter | Type | Required | Notes | | ------------- | ------ | -------- | -------------------------------------------------------- | | `agency_code` | string | yes | 3-digit agency code (e.g., ‘075’ for HHS, ‘097’ for DOD) | | `fiscal_year` | number | no | Fiscal year (e.g., 2024) | | `limit` | number | no | Number of top awards to return (default: 10) | #### `get_usaspending_spending_by_category` `get_usaspending_spending_by_category(args)` Get spending breakdown by award category (contracts, grants, loans, etc.) for an agency and fiscal year. Needs no key. | Parameter | Type | Required | Notes | | ------------- | ------ | -------- | ----------------------------------------- | | `agency_code` | string | yes | 3-digit agency code (e.g., ‘075’ for HHS) | | `fiscal_year` | number | no | Fiscal year (e.g., 2024) | #### `get_usaspending_budgetary_resources` `get_usaspending_budgetary_resources(args)` Get budgetary resources and obligations for an agency in a fiscal year. Needs no key. | Parameter | Type | Required | Notes | | ------------- | ------ | -------- | ----------------------------------------- | | `agency_code` | string | yes | 3-digit agency code (e.g., ‘075’ for HHS) | | `fiscal_year` | number | no | Fiscal year (e.g., 2024) | #### `search_usaspending_awards_by_recipient` `search_usaspending_awards_by_recipient(args)` Search for federal awards by recipient name, with optional filters for time period and amount ranges. Great for investigating specific companies or organizations. Needs no key. | Parameter | Type | Required | Notes | | ---------------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `recipient_name` | string | yes | Name of recipient to search (e.g., ‘Boeing’, ‘Johns Hopkins’) | | `fiscal_year` | number | no | Fiscal year to search by award action date (e.g., 2024) | | `min_amount` | number | no | Minimum award amount filter | | `max_amount` | number | no | Maximum award amount filter | | `award_types` | array of string | no | Award type codes from one USASpending group only (default \[‘A’,‘B’,‘C’,‘D’] for contract prime awards). Search contracts, IDVs, grants, loans, and other assistance groups separately. | | `limit` | number | no | Number of results (default: 10, max: 100) | | `cursor` | string | no | Page number from the prior response’s next_cursor. Reuse the same filters and limit when paging. | #### `get_award_detail` `get_award_detail(args)` Get the full FPDS record for a single procurement award from USASpending — the verification primitive: type_set_aside with description, extent_competed, number_of_offers_received, other_than_full_and_open competition authority, and current vs ultimate completion dates. Use it to confirm that a filtered search actually returned what it claimed before a number goes in a memo. Accepts a procurement generated award ID (CONT_AWD\_… or CONT_IDV\_…) or a bare PIID (resolved via award search first). Assistance IDs (ASST\_…) are rejected because they do not carry FPDS competition fields. Needs no key. | Parameter | Type | Required | Notes | | ---------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | `award_id` | string | yes | USASpending procurement generated_unique_award_id (e.g. ‘CONT_AWD_36C10B26F0223_3600_47QRCA24DV006_4732’) or a bare PIID (e.g. ‘36C10B26F0223’) | #### `aggregate_contracts` `aggregate_contracts(args)` Aggregate federal contract awards from USASpending without pulling rows: group by awarding_agency, awarding_subagency, recipient, naics, psc, month, or set_aside, with metric ‘obligations’ (dollars) or ‘count’ (prime awards). This is the tool for questions like ‘how many 8(a) sole source awards per agency in Aug-Sep 2025’. Counts state their unit and the date filter states its date_type. group_by=set_aside issues one upstream query per code (\~4s each due to rate pacing); metric ‘count’ is supported for group_by set_aside only (USASpending exposes counts per filter, not per category). Needs no key. | Parameter | Type | Required | Notes | | ------------------ | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `group_by` | string | yes | One of: awarding_agency, awarding_subagency, recipient, naics, psc, month, set_aside | | `metric` | string | no | ‘obligations’ (default; aggregated dollars) or ‘count’ (prime award count; only with group_by=set_aside) | | `date_from` | string | yes | Start date YYYY-MM-DD (required) | | `date_to` | string | yes | End date YYYY-MM-DD (required) | | `date_type` | string | no | Which award date the window filters on: ‘action_date’ (default), ‘date_signed’, or ‘new_awards_only’. Different choices produce materially different totals — the response echoes this as date_field. | | `agency` | string | no | Awarding toptier agency NAME as USASpending knows it (e.g. ‘Department of Veterans Affairs’) | | `sub_agency` | string | no | Awarding subtier agency name (requires agency) | | `naics` | array of string | no | NAICS codes | | `psc` | array of string | no | PSC codes | | `set_aside` | value | no | FPDS set-aside code(s), validated (e.g. \[‘8AN’,‘SDVOSBS’]). Required when group_by=set_aside. | | `recipient_search` | string | no | Recipient name or UEI text filter | | `award_type_codes` | array of string | no | Award type codes (default \[‘A’,‘B’,‘C’,‘D’] = contract prime awards; see lookup_reference_code domain award_type) | | `limit` | number | no | Max groups to return for category group_bys (default 25, max 100) | ### SAM.gov The SAM.gov APIs. These tools need your SAM.gov key. #### `search_sam_entities` `search_sam_entities(args)` Search for federal entities/businesses registered in SAM.gov by name, location, or business codes. Useful for finding companies that do business with the government. Needs your SAM.gov key. | Parameter | Type | Required | Notes | | --------- | ------ | -------- | ------------------------------------------------------ | | `query` | string | no | Entity name to search (e.g., ‘Boeing’, ‘Acme Corp’) | | `state` | string | no | State/province filter (e.g., ‘VA’, ‘CA’) | | `naics` | string | no | NAICS industry code filter | | `uei` | string | no | Unique Entity Identifier to search for specific entity | | `limit` | number | no | Number of results to return (default: 10, max: 50) | #### `get_sam_opportunities` `get_sam_opportunities(args)` Fetch federal contract opportunities from SAM.gov by date range, keywords, or set-aside types. Perfect for finding new business opportunities. Needs your SAM.gov key. | Parameter | Type | Required | Notes | | ------------- | ------ | -------- | ---------------------------------------------------------- | | `posted_from` | string | yes | Start date for opportunities (MM/dd/yyyy format, required) | | `posted_to` | string | yes | End date for opportunities (MM/dd/yyyy format, required) | | `keyword` | string | no | Keyword to search in opportunity titles/descriptions | | `set_aside` | string | no | Set-aside type filter (e.g., ‘WOSB’, ‘SDVOSB’, ‘SBA’) | | `state` | string | no | State filter for opportunity location | | `limit` | number | no | Number of results (default: 10, max: 50) | #### `get_sam_entity_details` `get_sam_entity_details(args)` Get comprehensive details for a specific entity using their UEI. Returns registration info, business types, certifications, and contact details. Needs your SAM.gov key. | Parameter | Type | Required | Notes | | --------- | ------ | -------- | ----------------------------------- | | `uei` | string | yes | Unique Entity Identifier (required) | #### `check_sam_exclusions` `check_sam_exclusions(args)` Check if an entity is excluded from federal contracting. Critical for due diligence before doing business with government contractors. Needs your SAM.gov key. | Parameter | Type | Required | Notes | | ------------- | ------ | -------- | ----------------------------------- | | `uei` | string | no | Unique Entity Identifier to check | | `entity_name` | string | no | Entity name to check for exclusions | ### SAM.gov and USAspending together These tools join SAM.gov records with USAspending data. They need your SAM.gov key. #### `get_entity_and_awards` `get_entity_and_awards(args)` Join SAM.gov entity details with their USASpending.gov award history. Perfect for comprehensive analysis of a company’s government business profile. Needs your SAM.gov key. | Parameter | Type | Required | Notes | | ------------- | ------ | -------- | -------------------------------------------- | | `uei` | string | yes | Unique Entity Identifier (required) | | `fiscal_year` | number | no | Fiscal year for awards (default: current FY) | | `award_limit` | number | no | Max number of awards to return (default: 10) | #### `get_opportunity_spending_context` `get_opportunity_spending_context(args)` Join SAM.gov opportunity details with spending context from similar NAICS codes. Helps assess market size and typical award amounts for similar work. Needs your SAM.gov key. | Parameter | Type | Required | Notes | | --------------------- | ------ | -------- | --------------------------------------------------- | | `opportunity_id` | string | no | SAM.gov opportunity/notice ID | | `solicitation_number` | string | no | Solicitation number (alternative to opportunity_id) | | `fiscal_year` | number | no | Fiscal year for spending context (default: 2024) | ### Tango Tango’s unified API (tango.makegov.com). These tools need your Tango key. #### `search_tango_contracts` `search_tango_contracts(args)` Search federal contracts through Tango’s unified API (FPDS-derived). Set-aside filtering is EXACT on FPDS codes (e.g. 8A = 8(a) Competed vs 8AN = 8(a) Sole Source) and every response echoes which filters ran upstream vs client-side — read `warnings` before trusting counts. Paginate with `cursor` to enumerate result sets past one page. Needs your Tango key. | Parameter | Type | Required | Notes | | ------------------ | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `query` | string | no | Search query for contract description or title | | `vendor_name` | string | no | Vendor/contractor name filter (verified client-side against returned records) | | `vendor_uei` | string | no | Vendor Unique Entity Identifier (UEI) | | `agency` | string | no | Awarding agency FPDS code (e.g. 3600=VA, 2100=Army, 1700=Navy, 5700=Air Force, 9700=DoD other, 4732=GSA/FAS, 7000=DHS, 7500=HHS, 1400=Interior, 1500=DOJ). Agency names are rejected: they hang the upstream. | | `naics_code` | string | no | NAICS industry classification code | | `psc_code` | string | no | Product/Service Code (PSC) | | `award_amount_min` | number | no | Minimum contract award amount (USD). Applied client-side per page — the response says so and nulls the total. | | `award_amount_max` | number | no | Maximum contract award amount (USD). Applied client-side per page. | | `date_from` | string | no | Start date for contract awards (YYYY-MM-DD). See date_field in the response for which underlying date this compares. | | `date_to` | string | no | End date for contract awards (YYYY-MM-DD) | | `set_aside` | value | no | FPDS set-aside code(s), matched EXACTLY — e.g. \[“8AN”, “SDVOSBS”, “HZS”]. Unknown codes are rejected with the valid list. Use lookup_reference_code to check a code’s meaning first. | | `limit` | number | no | Number of results per page (default: 10, max: 100) | | `cursor` | string | no | Opaque next_cursor from a previous response. Replays the same query for the next page; do not combine with other filters. | #### `search_tango_grants` `search_tango_grants(args)` Search federal grants and financial assistance awards through Tango’s unified API. Recipient and amount filters are verified client-side and echoed as such. Paginate with `cursor`. Needs your Tango key. | Parameter | Type | Required | Notes | | ------------------ | ------ | -------- | --------------------------------------------------------------- | | `query` | string | no | Search query for grant description or title | | `recipient_name` | string | no | Grant recipient organization name (verified client-side) | | `recipient_uei` | string | no | Recipient Unique Entity Identifier (UEI) (verified client-side) | | `agency` | string | no | Awarding agency name or code | | `cfda_number` | string | no | Catalog of Federal Domestic Assistance (CFDA) number | | `award_amount_min` | number | no | Minimum grant award amount (USD). Applied client-side per page. | | `award_amount_max` | number | no | Maximum grant award amount (USD). Applied client-side per page. | | `date_from` | string | no | Start date for grant awards (YYYY-MM-DD format) | | `date_to` | string | no | End date for grant awards (YYYY-MM-DD format) | | `limit` | number | no | Number of results per page (default: 10, max: 100) | | `cursor` | string | no | Opaque next_cursor from a previous response | #### `get_tango_vendor_profile` `get_tango_vendor_profile(args)` Get comprehensive vendor/entity profile from Tango’s consolidated database. Provides unified view of entity data from SAM.gov with contract history. Needs your Tango key. | Parameter | Type | Required | Notes | | ------------------- | ------- | -------- | ------------------------------------------------ | | `uei` | string | yes | Unique Entity Identifier (UEI) - required | | `include_contracts` | boolean | no | Include recent contract history (default: false) | | `include_grants` | boolean | no | Include recent grant history (default: false) | #### `search_tango_opportunities` `search_tango_opportunities(args)` Search federal contract opportunities through Tango’s unified API. Enhanced opportunity search with forecasts and solicitation notices. Paginate with `cursor`. Needs your Tango key. | Parameter | Type | Required | Notes | | ------------------------ | ------ | -------- | ----------------------------------------------------------- | | `query` | string | no | Search query for opportunity title or description | | `agency` | string | no | Agency name or code | | `naics_code` | string | no | NAICS industry classification code | | `set_aside` | string | no | Set-aside type filter | | `posted_from` | string | no | Start date for opportunities (YYYY-MM-DD format) | | `posted_to` | string | no | End date for opportunities (YYYY-MM-DD format) | | `response_deadline_from` | string | no | Minimum response deadline (YYYY-MM-DD format) | | `status` | string | no | Opportunity status (e.g., ‘active’, ‘closed’, ‘forecasted’) | | `limit` | number | no | Number of results per page (default: 10, max: 100) | | `cursor` | string | no | Opaque next_cursor from a previous response | #### `search_tango_protests` `search_tango_protests(args)` Search GAO bid protest records through Tango. Filter by agency, protester, outcome (Sustained/Denied/Dismissed/Withdrawn), case type, and date ranges. Useful for pre-bid risk scoring and identifying repeat protesters. Needs your Tango key. | Parameter | Type | Required | Notes | | --------------------- | ------ | -------- | ------------------------------------------------------------------------------------ | | `query` | string | no | Full-text search across title, protester, agency, solicitation, and case number | | `agency` | string | no | Agency identifier (name, abbreviation, CGAC/FPDS code). Use ’\|’ for multi-value OR. | | `protester` | string | no | Protester / petitioner name (vector search) | | `outcome` | string | no | Protest outcome: ‘Sustained’, ‘Denied’, ‘Dismissed’, or ‘Withdrawn’ | | `source_system` | string | no | Source system filter (e.g., ‘gao’, ‘cofc’) | | `case_type` | string | no | Case type substring (e.g., ‘Bid Protest’, ‘Cost Claim’) | | `case_number` | string | no | Exact base case number (e.g., ‘b-423274’) | | `solicitation_number` | string | no | Exact solicitation number | | `filed_date_from` | string | no | Filed on or after (YYYY-MM-DD) | | `filed_date_to` | string | no | Filed on or before (YYYY-MM-DD) | | `decision_date_from` | string | no | Decision on or after (YYYY-MM-DD) | | `decision_date_to` | string | no | Decision on or before (YYYY-MM-DD) | | `limit` | number | no | Number of results to return (default: 10, max: 100) | #### `get_tango_protest` `get_tango_protest(args)` Get the full record for a single bid protest by case number (e.g., ‘b-422670’). Returns the same fields as search_tango_protests plus docket URLs and decision URLs. Needs your Tango key. | Parameter | Type | Required | Notes | | ------------- | ------ | -------- | ------------------------------------------------------------------------------------------------- | | `case_number` | string | yes | Protest case number (the `case_number` field returned by search_tango_protests, e.g., ‘b-422670’) | #### `search_tango_idvs` `search_tango_idvs(args)` Search federal Indefinite Delivery Vehicles (IDIQs, BPAs, FSS) through Tango. Returns vehicle-level contracts that issue task/delivery orders. Same filter shape as search_tango_contracts, plus idv_type and last_date_to_order (expiry). Needs your Tango key. | Parameter | Type | Required | Notes | | ----------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------- | | `query` | string | no | Search query (description, title, PIID) | | `vendor_name` | string | no | Vendor / contractor name (recipient) | | `vendor_uei` | string | no | Vendor UEI | | `piid` | string | no | Exact PIID | | `agency` | string | no | Awarding agency name or code | | `funding_agency` | string | no | Funding agency name or code | | `naics_code` | string | no | NAICS code | | `psc_code` | string | no | Product/Service Code (PSC) | | `set_aside` | string | no | Set-aside code(s); use ’\|’ for OR | | `idv_type` | string | no | IDV type code: ‘A’=GWAC, ‘B’=IDC, ‘C’=FSS, ‘D’=BOA, ‘E’=BPA. Accepts the descriptive name too (e.g., ‘GWAC’). | | `award_date_from` | string | no | Award date on or after (YYYY-MM-DD) | | `award_date_to` | string | no | Award date on or before (YYYY-MM-DD) | | `expiring_from` | string | no | Last date to order on or after (YYYY-MM-DD) — find IDVs still accepting orders | | `expiring_to` | string | no | Last date to order on or before (YYYY-MM-DD) — find IDVs about to close to orders | | `limit` | number | no | Number of results to return (default: 10, max: 100) | #### `get_tango_idv_children` `get_tango_idv_children(args)` Get the awards issued under a single IDV (its child IDVs, task/delivery orders, and transactions). Use this after search_tango_idvs to drill into a specific vehicle’s ordering activity. Needs your Tango key. | Parameter | Type | Required | Notes | | ---------------------- | ------- | -------- | ----------------------------------------------------------------------------- | | `idv_key` | string | yes | Tango IDV key (from the `key` field of a search_tango_idvs result) — required | | `include_child_idvs` | boolean | no | Include child IDVs (sub-IDIQs under this parent). Default: true | | `include_task_orders` | boolean | no | Include task/delivery order awards issued against this IDV. Default: true | | `include_transactions` | boolean | no | Include obligation transactions (lower-level, may be large). Default: false | | `limit_per_section` | number | no | Max rows per section (default: 20, max: 100) | #### `search_tango_vehicles` `search_tango_vehicles(args)` Search the federal contract-vehicle catalog (BPAs, GWACs, GSA MAS Schedules, agency-wide IDIQs) through Tango. Vehicles aggregate the holders, scope, and obligations of a procurement instrument. Distinct from /idvs/ which lists raw IDV awards. Needs your Tango key. | Parameter | Type | Required | Notes | | --------------------- | ------ | -------- | ------------------------------------------------------------ | | `query` | string | no | Search query (vehicle name, program acronym, description) | | `vehicle_type` | string | no | Vehicle (IDV) type code; use ’\|’ for OR (e.g., ‘GWAC\|BPA’) | | `type_of_idc` | string | no | Type of IDC code; use ’\|’ for OR | | `contract_type` | string | no | Contract type code; use ’\|’ for OR | | `set_aside` | string | no | Set-aside code(s); use ’\|’ for OR | | `naics_code` | string | no | NAICS code (exact) | | `psc_code` | string | no | PSC / Product Service Code | | `program_acronym` | string | no | Program acronym (e.g., ‘SEWP’, ‘OASIS’, ‘CIO-SP3’) | | `who_can_use` | string | no | Who-can-use code (e.g., ‘gov-wide’, agency-restricted) | | `agency` | string | no | Awarding agency / department / sub-agency | | `organization_id` | string | no | Awarding organization UUID (exact) | | `total_obligated_min` | number | no | Minimum total obligated across the vehicle (USD) | | `total_obligated_max` | number | no | Maximum total obligated across the vehicle (USD) | | `limit` | number | no | Number of results to return (default: 10, max: 100) | #### `search_tango_otas` `search_tango_otas(args)` Search federal Other Transaction Authority (OTA) awards through Tango. OTAs are flexible R\&D / prototype agreements outside the FAR. Note: OTAs have no NAICS or set-aside fields by design. Needs your Tango key. | Parameter | Type | Required | Notes | | ----------------- | ------ | -------- | --------------------------------------------------- | | `query` | string | no | Search query (description, title, PIID) | | `vendor_name` | string | no | Vendor / recipient name | | `vendor_uei` | string | no | Vendor UEI | | `piid` | string | no | Exact PIID | | `agency` | string | no | Awarding agency name or code | | `funding_agency` | string | no | Funding agency name or code | | `award_date_from` | string | no | Award date on or after (YYYY-MM-DD) | | `award_date_to` | string | no | Award date on or before (YYYY-MM-DD) | | `fiscal_year` | number | no | Fiscal year of award | | `limit` | number | no | Number of results to return (default: 10, max: 100) | #### `get_tango_entity_metrics` `get_tango_entity_metrics(args)` Get a time-series of obligations for a single entity (by UEI), bucketed by month/quarter/year over a lookback window. Use this after get_tango_vendor_profile to see spending trends, not just totals. Needs your Tango key. | Parameter | Type | Required | Notes | | ----------------- | ------ | -------- | -------------------------------------------------------------- | | `uei` | string | yes | Unique Entity Identifier (UEI) — required | | `months` | number | no | Lookback window in months (e.g., 12, 36, 60). Default: 36 | | `period_grouping` | string | no | Bucket size: ‘month’, ‘quarter’, or ‘year’. Default: ‘quarter’ | | `group_by` | string | no | Optional secondary slice: ‘agency’ or ‘department’ | #### `get_tango_spending_summary` `get_tango_spending_summary(args)` Get spending summaries and analytics from Tango’s unified platform, aggregated over the fetched page of contracts. WARNING: aggregates at most one page (100 records) — the response says when the underlying result set is larger. For reliable full-population aggregation use aggregate_contracts (USASpending). Needs your Tango key. | Parameter | Type | Required | Notes | | ------------- | ------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | `agency` | string | no | Awarding agency FPDS code (e.g. 3600=VA, 2100=Army, 1700=Navy, 5700=Air Force, 9700=DoD other, 4732=GSA/FAS, 7000=DHS, 7500=HHS, 1400=Interior, 1500=DOJ) | | `vendor_uei` | string | no | Vendor UEI for spending summary | | `fiscal_year` | number | no | Fiscal year for summary (e.g., 2024) | | `group_by` | string | no | Group spending by dimension: ‘agency’, ‘vendor’, ‘naics’, ‘psc’, ‘month’ | | `award_type` | string | no | Filter by award type: ‘contracts’, ‘grants’, ‘all’ (default: ‘all’) | ### HigherGov HigherGov’s API. These tools need your HigherGov key. #### `search_highergov_forecasts` `search_highergov_forecasts(args)` Pull forecasts matching a HigherGov saved search. Returns the paginated list of new or updated forecasts since `since` (default: last 24 hours). Use `next_cursor` to page. Saved-search IDs come from list_highergov_saved_searches or the HigherGov UI. Needs your HigherGov key. | Parameter | Type | Required | Notes | | ----------------- | ------ | -------- | --------------------------------------- | | `saved_search_id` | string | yes | HigherGov saved-search ID (required) | | `since` | string | no | ISO-8601 datetime; defaults to last 24h | | `limit` | number | no | Number of results (default 50, max 200) | | `cursor` | string | no | Page number from prior next_cursor | #### `get_highergov_opportunity` `get_highergov_opportunity(args)` Get one opportunity by HigherGov ID, SAM notice ID, or URL. Returns the full record including agency, NAICS, vehicle, set-aside, value, dates, description, and attachments. If `incumbent_contract_id` is present, follow up with get_highergov_contract to enrich. Needs your HigherGov key. | Parameter | Type | Required | Notes | | --------- | ------ | -------- | --------------------------------------------------------- | | `id` | string | yes | HigherGov opportunity ID, SAM notice ID, or HigherGov URL | #### `search_highergov_contracts` `search_highergov_contracts(args)` Search awarded federal contracts by agency, NAICS, PSC, set-aside, period-of-performance end-date range, and value bounds. Use to find recompete candidates 12–18 months ahead of PoP end. At least one of agency/naics/psc is required. Every response echoes which filters ran upstream vs client-side and warns when a filter could not be verified — read `warnings` before trusting counts. Needs your HigherGov key. | Parameter | Type | Required | Notes | | ---------------- | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `agency` | string | no | Agency name or slug. The upstream API only filters by numeric key (see agency_key), so names are enforced client-side against returned records — see warnings. | | `agency_key` | number | no | HigherGov awarding agency key (numeric). The only agency filter the upstream API honors (awarding_agency_key). Find it on the agency page URL in the HigherGov UI or via /api-external/agency/. | | `awardee_uei` | string | no | Awardee UEI (server-side filter) | | `naics` | array of string | no | | | `psc` | array of string | no | | | `set_aside` | array of string | no | Set-aside slugs or FPDS codes (e.g. \[‘sdvosb’,‘8a’] or \[‘SDVOSBS’,‘8AN’]). Applied client-side against normalized records. | | `pop_end_after` | string | no | ISO-8601 date; period-of-performance end on/after this date (applied client-side; upstream has no PoP filter) | | `pop_end_before` | string | no | ISO-8601 date; period-of-performance end on/before this date (applied client-side) | | `min_value` | number | no | USD (applied client-side; upstream has no value filter) | | `max_value` | number | no | USD (applied client-side) | | `limit` | number | no | Default 50, max 200 | | `cursor` | string | no | Page number from prior next_cursor | #### `get_highergov_contract` `get_highergov_contract(args)` Get full record for one contract by award ID (PIID). Returns incumbent, dates, values, set-aside, vehicle, competition details (extent competed, offers received), pricing type, place of performance, and contracting-office contacts. Needs your HigherGov key. | Parameter | Type | Required | Notes | | --------- | ------ | -------- | ----------------------------- | | `id` | string | yes | HigherGov contract ID or PIID | #### `search_highergov_people` `search_highergov_people(args)` Search federal POCs. The upstream API only filters by contact email; agency and role keywords are applied client-side against returned pages — page with next_cursor to cover more. `email` may be null — if absent, do not draft outreach. Needs your HigherGov key. | Parameter | Type | Required | Notes | | --------------- | --------------- | -------- | --------------------------------------------------------------------------- | | `agency` | string | no | Agency slug or name (applied client-side; see warnings) | | `email` | string | no | Exact contact email (the only server-side filter the upstream API supports) | | `role_keywords` | array of string | no | Matched client-side against contact titles | | `limit` | number | no | Default 20, max 100 | | `cursor` | string | no | Page number from prior next_cursor | #### `get_highergov_person` `get_highergov_person(args)` Get the full profile for one POC by contact email (the only lookup the upstream API supports), including phone and agency. If `email` is null on a search result, there is nothing to look up — do not draft outreach. Needs your HigherGov key. | Parameter | Type | Required | Notes | | --------- | ------ | -------- | ---------------------------------------------------------------------------------- | | `id` | string | yes | Contact email address (person_id from search_highergov_people when it is an email) | #### `search_highergov_opportunities` `search_highergov_opportunities(args)` Search active contract opportunities without a saved search. The upstream API requires posted_after (served by walking its single-day posted_date filter, one request per day, resumable via next_cursor) and/or agency_key; set-aside bundle, NAICS, PSC, agency name, and deadline filters are applied client-side — read the filter echo and warnings. Returns Notice IDs for dedup. Needs your HigherGov key. | Parameter | Type | Required | Notes | | --------------------- | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- | | `set_aside` | array of string | no | Set-aside slugs or FPDS codes (e.g. \[‘8a’,‘sdvosb’,‘hubzone’] or \[‘8AN’,‘SDVOSBS’]); applied client-side | | `naics` | array of string | no | NAICS code prefixes (e.g. \[“5415”] matches 541511); applied client-side | | `psc` | array of string | no | PSC code prefixes; applied client-side | | `agency` | string | no | Agency slug or name (applied client-side; agency_key is the server-side filter) | | `agency_key` | number | no | HigherGov agency key (numeric; server-side filter) | | `posted_after` | string | no | ISO-8601 date; opportunities posted on/after (max 45 days back; walked upstream one day per request) | | `response_due_before` | string | no | ISO-8601 date; response deadline on/before | | `response_due_after` | string | no | ISO-8601 date; response deadline on/after (defaults to now — drops already-closed notices; pass an earlier date to include them) | | `limit` | number | no | Default 50, max 200 | | `cursor` | string | no | Page number from prior next_cursor | #### `list_highergov_saved_searches` `list_highergov_saved_searches(args)` List the saved searches on the HigherGov account behind the API key, so search_highergov_forecasts can be called without hunting for a magic ID. If the upstream API does not expose saved searches, returns guidance on where to find the ID in the HigherGov UI. Needs your HigherGov key. It takes no arguments. #### `get_opportunity_documents` `get_opportunity_documents(args)` List the solicitation documents (RFP, attachments, amendments) for one opportunity, with fetchable URLs, so an agent can read the solicitation without a manual download/upload cycle. Pass the same ID accepted by get_highergov_opportunity. Needs your HigherGov key. | Parameter | Type | Required | Notes | | --------- | ------ | -------- | --------------------------------------------------------- | | `id` | string | yes | HigherGov opportunity ID, SAM notice ID, or HigherGov URL | ## Limits The server paces its calls to each source, one queue for each source for the whole process: | Source | Minimum gap between calls | | ----------- | ------------------------- | | SAM.gov | 0.1 seconds | | Tango | 0.1 seconds | | HigherGov | 0.2 seconds | | USAspending | 3.6 seconds | Calls wait their turn in order. Each request to a source times out after 30 seconds. The server does not retry. A source’s own limits and daily allowances apply to your key on top of this, and a call that hits one fails with the error the source sent. # Tools > The 34 tools by source, what each one does, and which key it needs. The server has 34 narrow tools over five sources, and every one is read-only. Each result is JSON text, with the same object as structured content. A call that fails returns an `error` that says why. A tool needs the key for its own source. The server lists a tool only when the connection has that key, so a source without a key is simply off. The [tool reference](/docs/reference/sdk/) lists every argument of every tool, the list result, and the shapes an error can take. ## Reference codes No key. A built-in table, so it works offline. | Tool | What it does | | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | `lookup_reference_code` | Gives the official FPDS description of a code, or lists a whole domain: set-aside, extent competed, award type, solicitation procedure, or competition. | ## USAspending No key. These calls share one pacing queue. | Tool | What it does | | ---------------------------------------- | -------------------------------------------------------------------------------------------------- | | `get_usaspending_awards` | Award counts, obligations, and top awards for an agency and fiscal year. | | `get_usaspending_spending_by_category` | Spending by award category for an agency and fiscal year. | | `get_usaspending_budgetary_resources` | Budgetary resources and obligations for an agency in a fiscal year. | | `search_usaspending_awards_by_recipient` | Awards by recipient name, with fiscal year and amount filters. | | `get_award_detail` | The full FPDS record of one procurement award: set-aside, competition, offers received, and dates. | | `aggregate_contracts` | Obligations or counts grouped by agency, sub-agency, recipient, NAICS, PSC, month, or set-aside. | ## SAM.gov Needs your SAM.gov key. | Tool | What it does | | ---------------------------------- | ------------------------------------------------------------------------- | | `search_sam_entities` | Finds registered entities by name, state, NAICS code, or UEI. | | `get_sam_opportunities` | Finds contract opportunities by date range, keyword, set-aside, or state. | | `get_sam_entity_details` | The registration record of one entity, by UEI. | | `check_sam_exclusions` | Checks whether an entity is excluded from federal contracting. | | `get_entity_and_awards` | Joins an entity’s SAM.gov record with its USAspending awards. | | `get_opportunity_spending_context` | Joins an opportunity with spending on similar NAICS codes. | ## Tango Needs your Tango key. | Tool | What it does | | ---------------------------- | ------------------------------------------------------------------------------- | | `search_tango_contracts` | Contracts, with exact set-aside matching on FPDS codes. | | `search_tango_grants` | Grants and financial assistance awards. | | `get_tango_vendor_profile` | A vendor profile, with its contract and grant history on request. | | `search_tango_opportunities` | Opportunities and forecasts. | | `get_tango_spending_summary` | A spending summary over one page of contracts, and it says when there are more. | | `search_tango_protests` | GAO bid protests, by agency, protester, outcome, case type, and dates. | | `get_tango_protest` | One protest, by case number. | | `search_tango_idvs` | Indefinite delivery vehicles: IDIQs, BPAs, and FSS. | | `get_tango_idv_children` | The child IDVs, task orders, and transactions under one IDV. | | `search_tango_vehicles` | The catalog of contract vehicles: BPAs, GWACs, MAS, and agency-wide IDIQs. | | `search_tango_otas` | Other Transaction Authority awards. | | `get_tango_entity_metrics` | An entity’s obligations over time, by month, quarter, or year. | ## HigherGov Needs your HigherGov key. | Tool | What it does | | -------------------------------- | -------------------------------------------------------------------------------------- | | `search_highergov_forecasts` | Forecasts that match a HigherGov saved search. | | `search_highergov_opportunities` | Active opportunities by set-aside, NAICS, PSC, agency, and dates. | | `get_highergov_opportunity` | One opportunity, by HigherGov ID, SAM notice ID, or URL. | | `get_opportunity_documents` | The solicitation documents of one opportunity, with links. | | `list_highergov_saved_searches` | The saved searches on the account behind the key. | | `search_highergov_contracts` | Awarded contracts, for finding recompetes by period-of-performance end date and value. | | `get_highergov_contract` | One contract, by award ID or PIID. | | `search_highergov_people` | Federal points of contact, by agency and role. | | `get_highergov_person` | One contact’s profile, by email. | # Security > Where keys live, what the server does and does not do, and how to report a vulnerability. The server calls public APIs with your keys, and it treats everything those APIs return as untrusted text. ## Keys * Your keys are sealed with AES-256-GCM inside the access and refresh tokens that the server gives your assistant. The sealing secret is the server’s `OAUTH_TOKEN_SECRET`, held only in its environment. The server stores no key and has no database. * The server opens a token for the request that carries it, uses the key for the one source a tool needs, and does not keep it. * A key goes only to the source it belongs to, at that source’s fixed address. * Most tools list an optional `api_key` argument, which the server fills in. A key an assistant puts there is visible to it, so never do that. It is used instead of your connection’s key. * The server does not check a key when you enter it, and it has no general redaction: an error carries the status and body a source sent. The HigherGov tools do not pass on the URLs in which HigherGov embeds the key. Rotate a key with its source if you think it leaked. * A token cannot be revoked from the outside. The server tracks revoked tokens only in memory, so a restart forgets them. Rotate the key with its source to cut off a leaked token, or change the server’s secret to invalidate every token. ## Access * Every tool is read-only: the server changes nothing at any source. * Hosted access uses OAuth 2.1 with PKCE and dynamic client registration. Every `/mcp` request needs a valid bearer token. Provider-key headers never authenticate a caller: they only add the caller’s own key for a source. * Access tokens last 30 days and refresh tokens 90, unless the operator sets different lifetimes. * A hosted caller uses only keys it supplied. The server never uses a key from its own environment to answer one. On your own computer, over stdio or loopback HTTP, the environment keys are yours. * Single-user HTTP (`MCP_ALLOW_INSECURE_HTTP`) refuses to listen on anything but loopback, and refuses a request whose Host is not loopback. * The server adds no limit to `/mcp`, so run it behind a proxy that limits requests if you host it for many people. The MCP SDK’s OAuth endpoints limit each address by default (100 authorization requests and 50 token or revocation requests every 15 minutes, and 20 registrations an hour). ## What the server does not do * It runs no code that a model wrote: the tools take arguments, and nothing more. * It does not download documents or files. A tool that lists documents returns their links. * It does not store your questions or the answers. ## Report a vulnerability Do not open a public issue. Open a [private security advisory](https://github.com/blencorp/capture-mcp-server/security/advisories/new), or write to . The full policy is in [SECURITY.md](https://github.com/blencorp/capture-mcp-server/blob/main/SECURITY.md). # Self-host > Run the server on your computer over stdio or loopback HTTP, host it with Docker or Railway for other people, or deploy it to AWS Lambda for a team. The server is not published to npm. Run it from a checkout of the [repository](https://github.com/blencorp/capture-mcp-server), which needs Node.js 24.11 or later (or 26) and [pnpm](https://pnpm.io/) 12: ```bash git clone https://github.com/blencorp/capture-mcp-server.git cd capture-mcp-server pnpm install --frozen-lockfile pnpm build ``` Pick the mode by who uses it. | Mode | Who it serves | Whose keys | How to start it | | ----------- | --------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------- | | stdio | You, in a desktop assistant | Yours, from the environment | `node dist/server.js` | | Local HTTP | You, on your computer | Yours, from the environment | `MCP_TRANSPORT=http MCP_ALLOW_INSECURE_HTTP=true node dist/server.js` | | Hosted HTTP | Many people | Each person’s own, entered when they connect | `MCP_TRANSPORT=http MCP_REQUIRE_OAUTH=true node dist/server.js`, with the settings below | | Lambda | A team | Each caller’s own, sent in headers | `pnpm cdk:deploy` | SAM.gov, Tango, and HigherGov keys are personal. The server never answers one person with another’s key, and a hosted server never uses a key from its own environment for a caller. ## stdio Your assistant starts the server and talks to it over standard input and output. Add it to the assistant’s MCP configuration (here, the format of Claude Desktop’s `claude_desktop_config.json`), with the keys you have: ```json { "mcpServers": { "capture": { "command": "node", "args": ["/path/to/capture-mcp-server/dist/server.js"], "env": { "SAM_GOV_API_KEY": "your-sam-gov-key", "TANGO_API_KEY": "your-tango-key", "HIGHERGOV_API_KEY": "your-highergov-key" } } } } ``` Only the tools whose key you set are listed. With no keys, the 7 reference and USAspending tools work. The repository also builds a Claude Desktop bundle with `pnpm package`, which produces `capture-mcp-server.mcpb`. The bundle is not attached to releases. ## Local HTTP ```bash MCP_TRANSPORT=http MCP_ALLOW_INSECURE_HTTP=true PORT=8080 SAM_GOV_API_KEY=... node dist/server.js ``` There is no sign-in. The server binds to `127.0.0.1`, refuses any other `HOST`, and refuses a request whose Host header is not loopback. A client may send its own keys in `X-Sam-Api-Key`, `X-Tango-Api-Key`, and `X-Highergov-Api-Key` headers, which override the environment. ## Hosted HTTP HTTP mode refuses to start without authentication. For other people, set `MCP_REQUIRE_OAUTH=true`, and the server runs the OAuth flow that [Connect your assistant](/docs/connect/) describes. | Setting | What it does | | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | `MCP_TRANSPORT` | `http`. The default, `stdio`, speaks over standard input and output. | | `MCP_REQUIRE_OAUTH` | `true`. Required for hosting. | | `OAUTH_TOKEN_SECRET` | The secret that seals tokens. Required. Generate one with `openssl rand -base64 48`. Changing it invalidates every token. | | `MCP_PUBLIC_BASE_URL` | The public HTTPS origin your clients use, such as `https://capture.example.com`. Required. | | `OAUTH_ACCESS_TOKEN_TTL_SECONDS`, `OAUTH_REFRESH_TOKEN_TTL_SECONDS` | Token lifetimes. The defaults are 30 and 90 days. | | `MCP_ALLOW_INSECURE_HTTP` | `true` for the single-user mode above. Not for hosting. | | `PORT`, `HOST` | The listening port, and address. Leave `HOST` unset when you host so that Node listens on IPv4 and IPv6. | The server serves the landing page, the policy pages, and this documentation at `/docs`. Put it behind HTTPS, and a proxy that limits requests, because the server adds no limit to `/mcp`. ### Docker The repository’s `Dockerfile` builds the hosted image. It builds this site into the image, runs `node dist/server.js` as an unprivileged user, and refuses to start without authentication: ```bash docker build -t capture-mcp-server . docker run --rm -p 8080:8080 \ -e MCP_REQUIRE_OAUTH=true \ -e OAUTH_TOKEN_SECRET="$(openssl rand -base64 48)" \ -e MCP_PUBLIC_BASE_URL=https://capture.example.com \ capture-mcp-server ``` ### Railway Railway builds the same `Dockerfile` from the repository root. Set the three variables in the service settings. The image carries its own start command and port, but not Railway’s deploy health check, which `railway.toml` declares (`/health`, 30 seconds) and Railway stops reading on 2026-12-01. Set the health check in the service settings or in infrastructure as code before then. ## AWS Lambda The `infrastructure/` folder is a CDK project for a team deployment: a Lambda function behind an HTTP API, and an S3 bucket of access keys, with an optional custom domain. It is its own npm project. ```bash pnpm cdk:deploy pnpm manage-keys create --owner "Jane Doe" ``` Each caller sends two kinds of header: `X-Api-Key`, an access key from the bucket, and their own provider keys in `X-Sam-Api-Key`, `X-Tango-Api-Key`, and `X-Highergov-Api-Key`. The function never uses a provider key from its own environment, and answers `503` on `/mcp` until it has a bucket. It serves no landing page or documentation. ## Rules for every deployment * **Run one replica.** The pacing queues, the cache and the registered assistants are in the server’s memory. Two instances that share a key look like two clients to the source, and an assistant registered on one is unknown to the other. * **Authentication is required.** HTTP mode refuses to start without OAuth or the loopback opt-in. * **Guard `OAUTH_TOKEN_SECRET`.** Anyone who has it can open every token, and so every key sealed in one. ## Full guides These documents are in the repository: * [Accessibility](https://github.com/blencorp/capture-mcp-server/blob/main/docs/accessibility.md) * [Upstream API notes](https://github.com/blencorp/capture-mcp-server/blob/main/docs/upstream-api-notes.md) * [Every setting](https://github.com/blencorp/capture-mcp-server/blob/main/.env.example)