# usaspending-mcp-server

Connects an agent to USAspending.gov data on federal awards, recipients, agencies, and spending. Use it to search records or break spending down by several dimensions.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: cyanheads
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/cyanheads/usaspending-mcp-server
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/usaspending-mcp-server

## What it does

usaspending-mcp-server exposes 18 tools backed by USAspending.gov. An agent can search awards and recipients, inspect agencies and federal accounts, retrieve award transactions and subawards, and trace the accounts that funded an award.

The server also groups spending by state, county, congressional district, category, fiscal period, or disaster program. It supports a hosted Streamable HTTP endpoint and a local STDIO process started with `npx -y @cyanheads/usaspending-mcp-server`. The local setup uses `MCP_LOG_LEVEL`, `MCP_TRANSPORT_TYPE`, `MCP_HTTP_HOST`, `MCP_HTTP_PORT`, and `MCP_HTTP_ENDPOINT_PATH`; the hosted option avoids that local configuration.

## Requirements
- Needs: Node.js (commands run via npx)
- Remote server: `https://usaspending.caseyjhand.com/mcp`
- Environment variables: `MCP_LOG_LEVEL`, `MCP_TRANSPORT_TYPE`, `MCP_HTTP_HOST`, `MCP_HTTP_PORT`, `MCP_HTTP_ENDPOINT_PATH`, `MCP_AUTH_MODE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

1. **Platform CLI: remote server**
```bash
claude mcp add --transport http usaspending-mcp-server https://usaspending.caseyjhand.com/mcp
```

2. **Platform CLI**
```bash
claude mcp add --env MCP_LOG_LEVEL=<MCP_LOG_LEVEL> --env MCP_TRANSPORT_TYPE=<MCP_TRANSPORT_TYPE> --env MCP_HTTP_HOST=<MCP_HTTP_HOST> --env MCP_HTTP_PORT=<MCP_HTTP_PORT> --env MCP_HTTP_ENDPOINT_PATH=<MCP_HTTP_ENDPOINT_PATH> --transport stdio usaspending-mcp-server -- npx -y @cyanheads/usaspending-mcp-server
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Codex

1. **Platform CLI: remote server**
```bash
codex mcp add usaspending-mcp-server --url https://usaspending.caseyjhand.com/mcp
```

2. **Platform CLI**
```bash
codex mcp add usaspending-mcp-server --env MCP_LOG_LEVEL=<MCP_LOG_LEVEL> --env MCP_TRANSPORT_TYPE=<MCP_TRANSPORT_TYPE> --env MCP_HTTP_HOST=<MCP_HTTP_HOST> --env MCP_HTTP_PORT=<MCP_HTTP_PORT> --env MCP_HTTP_ENDPOINT_PATH=<MCP_HTTP_ENDPOINT_PATH> -- npx -y @cyanheads/usaspending-mcp-server
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "usaspending-mcp-server": {
            "url": "https://usaspending.caseyjhand.com/mcp"
        }
    }
}
```
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "usaspending-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@cyanheads/usaspending-mcp-server"
            ],
            "env": {
                "MCP_LOG_LEVEL": "<MCP_LOG_LEVEL>",
                "MCP_TRANSPORT_TYPE": "<MCP_TRANSPORT_TYPE>",
                "MCP_HTTP_HOST": "<MCP_HTTP_HOST>",
                "MCP_HTTP_PORT": "<MCP_HTTP_PORT>",
                "MCP_HTTP_ENDPOINT_PATH": "<MCP_HTTP_ENDPOINT_PATH>"
            }
        }
    }
}
```
Replace <…> with your own values. 1 more environment variable is in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "usaspending-mcp-server": {
            "type": "http",
            "url": "https://usaspending.caseyjhand.com/mcp"
        }
    }
}
```
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "usaspending-mcp-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@cyanheads/usaspending-mcp-server"
            ],
            "env": {
                "MCP_LOG_LEVEL": "<MCP_LOG_LEVEL>",
                "MCP_TRANSPORT_TYPE": "<MCP_TRANSPORT_TYPE>",
                "MCP_HTTP_HOST": "<MCP_HTTP_HOST>",
                "MCP_HTTP_PORT": "<MCP_HTTP_PORT>",
                "MCP_HTTP_ENDPOINT_PATH": "<MCP_HTTP_ENDPOINT_PATH>"
            }
        }
    }
}
```
Replace <…> with your own values. 1 more environment variable is in the server README

### Gemini CLI

1. **Platform CLI: remote server**
```bash
gemini mcp add -t http usaspending-mcp-server https://usaspending.caseyjhand.com/mcp
```

2. **Platform CLI**
```bash
gemini mcp add -e MCP_LOG_LEVEL=<MCP_LOG_LEVEL> -e MCP_TRANSPORT_TYPE=<MCP_TRANSPORT_TYPE> -e MCP_HTTP_HOST=<MCP_HTTP_HOST> -e MCP_HTTP_PORT=<MCP_HTTP_PORT> -e MCP_HTTP_ENDPOINT_PATH=<MCP_HTTP_ENDPOINT_PATH> usaspending-mcp-server npx -y @cyanheads/usaspending-mcp-server
```
Replace <…> with your own values. 1 more environment variable is in the server README

## When to use it
- search federal awards by recipient, agency, or date
- inspect an award’s transactions and subawards
- trace which federal accounts funded an award
- group spending by geography, category, or time
- break down disaster and emergency spending

## Example prompts
- Search USAspending.gov for federal awards linked to this recipient and summarize the amounts.
- Get the full award record, then list its transactions, subawards, and federal accounts.
- Compare spending by state for the requested period and separate disaster-related funding.

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 392262
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33989
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89609
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81163
- [Front-End Checklist](https://affpapa.org/en/nevibecode/mcp/front-end-checklist.md) — MCP server · ★ 74569
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89899

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
