USA Spending API
Test MCP Server for USA Spending API
What is USA Spending API?
USA Spending API is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to test mcp server for usa spending api
Test MCP Server for USA Spending API
This server falls under the APIs and Analytics categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Test MCP Server for USA Spending API
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx usa-spending-mcp-server-demoConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use USA Spending API
The USA Spending MCP Server provides AI assistants with structured access to USASpending.gov, the official open-data portal for US federal government expenditures. It runs locally over stdio for Claude Desktop or as an HTTP server for cloud deployments, and requires no API key for basic read-only queries of federal spending data.
Prerequisites
- Python 3.11 or higher
- The uv package manager (https://docs.astral.sh/uv/)
- Git for cloning the repository
- Claude Desktop or another MCP-compatible client for local use
- Optional: login.gov OIDC credentials if deploying the authenticated HTTP mode
Install uv
The project uses uv for dependency management and running tasks. Install it with the official script.
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc # or ~/.zshrcInstall the server via uv tool
Install the usa-spending-mcp-server directly from GitHub. This makes the command available globally.
uv tool install git+https://github.com/GSA-TTS/usa-spending-mcp-serverVerify the installation
Confirm the binary was installed and is reachable from your PATH.
usa-spending-mcp-server --helpConfigure Claude Desktop
Add the server to your Claude Desktop configuration. On macOS the file is at ~/Library/Application Support/Claude/claude_desktop_config.json.
{
"mcpServers": {
"usa-spending": {
"command": "usa-spending-mcp-server"
}
}
}Optional: clone for development or HTTP deployment
If you want to run tests, lint, or deploy the HTTP server variant, clone the repo and use uv sync.
git clone https://github.com/GSA-TTS/usa-spending-mcp-server
cd usa-spending-mcp-server
uv sync --dev
uv run task dev # HTTP server without auth
uv run task test # run test suiteUSA Spending API Examples
Client configuration
Minimal Claude Desktop config for local stdio mode—no environment variables required for public data access.
{
"mcpServers": {
"usa-spending": {
"command": "usa-spending-mcp-server"
}
}
}HTTP server with authentication (optional)
Environment variables needed when running the HTTP variant with login.gov OIDC authentication.
{
"mcpServers": {
"usa-spending-http": {
"command": "usa-spending-mcp-server-http",
"env": {
"REQUIRE_AUTH": "true",
"BASE_URL": "https://your-server.example.com",
"LOGINGOV_CLIENT_ID": "your-oidc-client-id",
"JWT_SIGNING_KEY": "your-32-byte-hex-secret",
"LOGINGOV_CONFIG_URL": "https://idp.int.identitysandbox.gov/.well-known/openid-configuration",
"PORT": "8080"
}
}
}
}Prompts to try
Sample prompts to query federal spending data through the MCP server.
- "How much did the Department of Defense spend in fiscal year 2023?"
- "List the top 10 federal contractors by total contract awards in 2022"
- "Show me grants awarded to universities in California last fiscal year"
- "What agencies had the highest spending on IT contracts in 2023?"
- "Find all federal contracts awarded to small businesses in Texas in Q1 2023"Troubleshooting USA Spending API
usa-spending-mcp-server command not found after installation
Run `uv tool update-shell` to ensure uv's tool bin directory is on your PATH, then restart your terminal. Alternatively, find the binary with `uv tool dir` and add it to PATH manually.
API requests return rate limit or timeout errors
USASpending.gov enforces rate limits on its public API. Space out large queries, reduce date ranges, or add pagination parameters to your requests. The public API does not require an API key but still throttles high-frequency calls.
HTTP mode fails to start with authentication errors
Generate a fresh JWT signing key with `python -c "import secrets; print(secrets.token_hex(32))"` and verify your LOGINGOV_CLIENT_ID matches exactly what is registered in the login.gov partner portal. The redirect URI must be set to {BASE_URL}/auth/callback.
Frequently Asked Questions about USA Spending API
What is USA Spending API?
USA Spending API is a Model Context Protocol (MCP) server that test mcp server for usa spending api It connects AI assistants to external tools and data sources through a standardized interface.
How do I install USA Spending API?
Follow the installation instructions on the USA Spending API GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with USA Spending API?
USA Spending API works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is USA Spending API free to use?
Yes, USA Spending API is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
USA Spending API Alternatives — Similar APIs Servers
Looking for alternatives to USA Spending API? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
★ 43.4k🦍 The API and AI Gateway
API Mega List
★ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHub—period. 💪
Fetch
★ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
★ 2.1kSelf-Hosted API Management for Builders
Korean Law
★ 1.8k국가법령정보MCP v4.0 | 법제처 41개 API → 17개 MCP 도구. 법령·판례·조례 검색 + LLM 환각 방지 인용검증 + 조문 영향 그래프(impact_map) + 시점 비교 자동 diff(time_travel) + 시민 5단계 실행 가이드(action_plan) | 41 Korean legal APIs → 17 MCP tools
RuleGo
★ 1.5k⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Browse More APIs MCP Servers
Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up USA Spending API in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use USA Spending API?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.