extract_gov_landscape
Analyze government tech contractors by querying federal contracts, GitHub activity, Hacker News discussions, and product changelogs to assess market position, development pace, and developer community awareness.
Instructions
Composite government intelligence tool. Given a company name, keyword, or NAICS code, simultaneously queries: (1) USASpending.gov for federal contract awards, (2) GitHub for the company's repo activity, (3) Hacker News for developer community awareness, and (4) their product changelog for release velocity. Answers: Who is winning government contracts in this space? Are they actually building? Does the dev community know about them? Returns a unified 4-source timestamped report. Unique — not available in any other MCP server.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Company name (e.g. 'Palantir'), keyword (e.g. 'artificial intelligence'), or NAICS code (e.g. '541511'). For GitHub and changelog sections, also optionally provide a GitHub URL. | |
| github_url | No | Optional GitHub repo URL for the company (e.g. 'https://github.com/palantir/palantir-java-format'). If omitted, GitHub and changelog sections use the query as a search term. | |
| max_length | No |
Implementation Reference
- src/server.ts:312-350 (handler)The handler function for 'extract_gov_landscape' which aggregates data from USASpending, Hacker News, GitHub, and a Changelog adapter.
async ({ query, github_url, max_length }) => { const perSection = Math.floor((max_length ?? 12000) / 4); // All four sources fire in parallel — if one fails the others still return const [contractsResult, hnResult, repoResult, changelogResult] = await Promise.allSettled([ // 1. The anchor: who is actually winning federal money in this space govContractsAdapter({ url: query, maxLength: perSection }), // 2. Dev community signal: does anyone in tech know about these companies hackerNewsAdapter({ url: `https://hn.algolia.com/api/v1/search?query=${encodeURIComponent(query)}&tags=story&hitsPerPage=10`, maxLength: perSection, }), // 3. GitHub activity: are they actually building, or contract farmers repoSearchAdapter({ url: github_url ?? query, maxLength: perSection }), // 4. Release velocity: how fast are they shipping product changelogAdapter({ url: github_url ?? query, maxLength: perSection }), ]); const section = ( label: string, result: PromiseSettledResult<{ raw: string; content_date: string | null; freshness_confidence: string }> ) => result.status === "fulfilled" ? `## ${label}\n${result.value.raw}` : `## ${label}\n[Unavailable: ${(result as PromiseRejectedResult).reason}]`; const combined = [ `# Government Intelligence Landscape: "${query}"`, `Generated: ${new Date().toISOString()}`, `Sources: USASpending.gov · Hacker News · GitHub · Changelog`, "", section("🏛️ Federal Contract Awards (USASpending.gov)", contractsResult), section("💬 Developer Community Awareness (Hacker News)", hnResult), section("📦 GitHub Repository Activity", repoResult), section("🔄 Product Release Velocity (Changelog)", changelogResult), ].join("\n\n"); return { content: [{ type: "text", text: combined }] }; } - src/server.ts:296-311 (registration)Registration of the 'extract_gov_landscape' tool including description and input schema.
server.registerTool( "extract_gov_landscape", { description: "Composite government intelligence tool. Given a company name, keyword, or NAICS code, simultaneously queries: (1) USASpending.gov for federal contract awards, (2) GitHub for the company's repo activity, (3) Hacker News for developer community awareness, and (4) their product changelog for release velocity. Answers: Who is winning government contracts in this space? Are they actually building? Does the dev community know about them? Returns a unified 4-source timestamped report. Unique — not available in any other MCP server.", inputSchema: z.object({ query: z.string().describe( "Company name (e.g. 'Palantir'), keyword (e.g. 'artificial intelligence'), or NAICS code (e.g. '541511'). For GitHub and changelog sections, also optionally provide a GitHub URL." ), github_url: z.string().optional().describe( "Optional GitHub repo URL for the company (e.g. 'https://github.com/palantir/palantir-java-format'). If omitted, GitHub and changelog sections use the query as a search term." ), max_length: z.number().optional().default(12000), }), annotations: { readOnlyHint: true, openWorldHint: true }, },