usaspending-mcp-server — Claude Code 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.
claude mcp add --transport http usaspending-mcp-server https://usaspending.caseyjhand.com/mcpWhat usaspending-mcp-server 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.
What it helps with
- 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 for the agent
- 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.
How to install usaspending-mcp-server
1Platform CLI: remote server
claude mcp add --transport http usaspending-mcp-server https://usaspending.caseyjhand.com/mcp2Platform CLI
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-serverReplace <…> with your own values. 1 more environment variable is in the server README
1Platform CLI: remote server
codex mcp add usaspending-mcp-server --url https://usaspending.caseyjhand.com/mcp2Platform CLI
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-serverReplace <…> with your own values. 1 more environment variable is in the server README
Config file
{
"mcpServers": {
"usaspending-mcp-server": {
"url": "https://usaspending.caseyjhand.com/mcp"
}
}
}{
"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
Config file
{
"servers": {
"usaspending-mcp-server": {
"type": "http",
"url": "https://usaspending.caseyjhand.com/mcp"
}
}
}{
"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
1Platform CLI: remote server
gemini mcp add -t http usaspending-mcp-server https://usaspending.caseyjhand.com/mcp2Platform CLI
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-serverReplace <…> with your own values. 1 more environment variable is in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about usaspending-mcp-server
How do I install usaspending-mcp-server in Claude Code?
Add the hosted HTTP server with claude mcp add --transport http usaspending-mcp-server https://usaspending.caseyjhand.com/mcp.
What does usaspending-mcp-server do?
It gives an agent tools for searching federal awards and recipients, examining agencies and federal accounts, and aggregating spending across geography, categories, and time.
Can I run it locally instead of using the hosted server?
Yes. The local STDIO option runs through npx -y @cyanheads/usaspending-mcp-server. Its configuration uses MCP_LOG_LEVEL, MCP_TRANSPORT_TYPE, MCP_HTTP_HOST, MCP_HTTP_PORT, and MCP_HTTP_ENDPOINT_PATH.