Skip to main content
Glama
Capture MCP Server

Capture MCP Server

by blencorp

Capture MCP

CI license: Apache-2.0 Node

Ask your AI assistant real questions about federal contracts, grants and spending, and get answers grounded in SAM.gov, USAspending, Tango and HigherGov.

Documentation: capture.mcp.blencorp.com/docs has connect guides, key setup, example questions and the tool reference.

This is a Model Context Protocol server with 34 narrow, read-only tools over five sources. Your assistant picks a tool and fills in its arguments, and the server calls the source with your own key.

Independent open-source 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 to the hosted server

BLEN hosts the server at:

https://capture.mcp.blencorp.com/mcp

Add it as a custom connector (a remote MCP server) in Claude, ChatGPT, Cursor, VS Code or another assistant; the docs have a guide for each. Your assistant then opens a page from the server. Tick the sources you use and paste your own key for each. There is no account to create: the server seals your keys inside the OAuth token it gives your assistant and stores nothing. See the privacy policy and terms.

Related MCP server: USASpending MCP Server

What's covered

Source

Tools

Key

Reference codes (FPDS set-aside, competition, award-type descriptions)

1

none

USAspending.gov (awards, spending by category, budgetary resources, grouping)

6

none

SAM.gov (opportunities, entities, exclusions) and two tools that join them with USAspending

4 + 2

SAM.gov

Tango (contracts, grants, vendors, protests, IDVs, vehicles, OTAs, metrics)

12

Tango

HigherGov (forecasts, opportunities, contracts, contacts, documents)

9

HigherGov

The server lists only the tools whose key the connection has. On your own computer with no keys the 7 reference and USAspending tools work; the hosted connection asks for at least one key. The main search tools (Tango contracts, grants and opportunities; HigherGov contracts, people, opportunities and forecasts; USAspending awards by recipient) echo which filters the source applied and which the server applied itself, say what their total counts, and return null when a total cannot be trusted. The other list tools (SAM.gov, and Tango protests, IDVs, vehicles and OTAs) return a plain { total, records, … } shape. docs/sdk-reference.md lists every tool and argument, and examples/ holds example calls.

API keys

Source

Where to get the key

Env var (own computer)

Header

SAM.gov

The Public API Key in your SAM.gov account details

SAM_GOV_API_KEY

X-Sam-Api-Key

Tango

tango.makegov.com

TANGO_API_KEY

X-Tango-Api-Key

HigherGov

highergov.com

HIGHERGOV_API_KEY

X-Highergov-Api-Key

Keys are personal. The server never uses a key from its own environment to answer a remote caller, and never gives one caller's key to another. Get your keys has the steps.

Run it on your own computer

The server is not published to npm. Clone the repository (Node.js 24.11 or later, or 26, and pnpm 12):

git clone https://github.com/blencorp/capture-mcp-server.git
cd capture-mcp-server
pnpm install --frozen-lockfile
pnpm build

Then add it to your assistant's MCP configuration, for example Claude Desktop's claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "capture": {
      "command": "node",
      "args": ["/ABSOLUTE/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"
      }
    }
  }
}

Every key is optional. pnpm package also builds a Claude Desktop extension, capture-mcp-server.mcpb, that asks for the keys when you install it; it is not attached to releases. pnpm dev runs the server from source.

Self-hosting (remote HTTP)

# Local, single user, no sign-in (binds 127.0.0.1 and refuses any other HOST):
MCP_TRANSPORT=http MCP_ALLOW_INSECURE_HTTP=true PORT=8080 SAM_GOV_API_KEY=... node dist/server.js

# Your own hosted server: OAuth, where each person enters their own keys.
MCP_TRANSPORT=http MCP_REQUIRE_OAUTH=true \
  OAUTH_TOKEN_SECRET="$(openssl rand -base64 48)" \
  MCP_PUBLIC_BASE_URL=https://capture.example.com \
  node dist/server.js

HTTP mode fails closed: it refuses to start without MCP_REQUIRE_OAUTH=true or the loopback opt-in. The root Dockerfile builds the hosted image (Railway builds it too) and puts the landing page, the policy pages and the documentation site at /, /privacy-policy, /terms and /docs. The server adds no limit to /mcp, so host it behind a proxy that does. For a team on AWS, docs/lambda.md deploys a Lambda function with S3-backed access keys. Self-host describes every mode.

Configuration

Variable

Purpose

MCP_TRANSPORT

stdio (default) or http.

MCP_REQUIRE_OAUTH, OAUTH_TOKEN_SECRET, MCP_PUBLIC_BASE_URL

Hosted HTTP; all three are required together.

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 single-user HTTP on loopback.

PORT, HOST

The listening port and address.

SAM_GOV_API_KEY, TANGO_API_KEY, HIGHERGOV_API_KEY

Keys for stdio and single-user HTTP only.

Development

pnpm install --frozen-lockfile
pnpm typecheck      # tsc --noEmit (src, scripts, web, web/e2e)
pnpm lint           # eslint: correctness and security rules, zero warnings
pnpm test           # builds, then tsx --test over src/**/*.test.ts
pnpm test:web       # Playwright + axe over the landing, policy and docs pages
pnpm kit:check      # the shared portal kit matches web/portal-kit.json
pnpm docs:reference # regenerate docs/sdk-reference.md from the tool definitions

CONTRIBUTING.md describes the workflow and CLAUDE.md describes the code.

Security

Report vulnerabilities privately; see SECURITY.md.

Contributing

See CONTRIBUTING.md and the Code of Conduct. Support is described in SUPPORT.md.

License

Apache-2.0. Releases up to v1.0.2 were MIT, and NOTICE keeps the notices for contributions made under that license. Changes are listed in CHANGELOG.md.

Hosted service policies

The BLEN-hosted service is governed by the Privacy Policy and the Terms of Service, also served at /privacy-policy and /terms.

Available Tools

7 tools
aggregate_contractsA

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).

Inputs: date_to (required), group_by (required), date_from (required), psc, +9 more.

get_award_detailA

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.

Inputs: award_id (required).

get_usaspending_awardsB

Get federal awards data for a specific agency and fiscal year. Returns award counts, obligations, and top awards.

Inputs: agency_code (required), limit, fiscal_year.

get_usaspending_budgetary_resourcesA

Get budgetary resources and obligations for an agency in a fiscal year.

Inputs: agency_code (required), fiscal_year.

get_usaspending_spending_by_categoryB

Get spending breakdown by award category (contracts, grants, loans, etc.) for an agency and fiscal year.

Inputs: agency_code (required), fiscal_year.

lookup_reference_codeA

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.

Inputs: domain (required), code.

search_usaspending_awards_by_recipientB

Search for federal awards by recipient name, with optional filters for time period and amount ranges. Great for investigating specific companies or organizations.

Inputs: recipient_name (required), limit, cursor, max_amount, +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools map to clearly different operations—reference lookup, recipient search, award detail, aggregation, and budget summaries. However, get_usaspending_awards, get_usaspending_spending_by_category, and get_usaspending_budgetary_resources are similarly named summary endpoints, and get_usaspending_awards overlaps somewhat with aggregate_contracts in producing counts and obligations.

    Naming Consistency4/5

    All names are snake_case and action-oriented, so the general pattern is readable. There is a minor inconsistency: get_usaspending_* and search_usaspending_* use a domain prefix, while get_award_detail, aggregate_contracts, and lookup_reference_code omit it.

    Tool Count5/5

    Seven tools is a well-scoped size for this server's purpose. Each tool addresses a distinct querying, lookup, or aggregation need without padding or unnecessary duplication.

    Completeness4/5

    The server covers award summaries, spending categories, budgetary resources, recipient search, award detail verification, reference code lookups, and flexible contract aggregation. Minor gaps include no assistance-award detail endpoint and no general award search by arbitrary fields, but the core workflows are well supported.

    Maintenance

    ActivityMaintained
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables research of federal contract awards and competitive landscape analysis using the USASpending.gov API. Supports searching for contracts, analyzing recipients, tracking spending trends, and identifying market opportunities in government contracting.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables research of federal contract awards, market opportunities, and competitive landscapes using the USASpending.gov API. It provides specialized tools for AI agents to analyze government spending trends, identify incumbents, and search contractor details.
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables AI agents to search and analyze federal government contract opportunities and awards from SAM.gov and USASpending.gov, with tools for contract search, detail, agency spending, and trending sectors.
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to search federal contracts, analyze agency spending, track competitor wins, and monitor small business set-aside opportunities using SAM.gov, USASpending.gov, and FPDS data.
      1
      -