# How do I use SAM.gov data inside Cursor or Claude Code while I build? Add the MCP server to the editor: in Cursor, an entry in ~/.cursor/mcp.json with the URL https://samgovapi.io/api/mcp and an Authorization header; in Claude Code, one claude mcp add command. The agent can then pull real records while it writes code, and read /openapi.json to generate typed clients. Coding agents write better integrations when they see real responses: actual field names, nulls, date formats and cursors.Checked on 2026-11-15.Source: [Cursor MCP docs](https://cursor.com/docs/context/mcp) | Cursor config | ~/.cursor/mcp.json | | --- | --- | | OpenAPI | /openapi.json | | Full reference | /llms-full.txt | | Key variable | SAMGOVAPI_API_KEY | ## The answer in detail Coding agents write better integrations when they see real responses: actual field names, nulls, date formats and cursors. With the MCP server connected, ask the agent to fetch a sample entity and an opportunity before it writes the parser.For generated clients, point the agent at /openapi.json (every endpoint, parameter and error) and /llms-full.txt (the full reference in one text file).Keep the key in an environment variable such as SAMGOVAPI_API_KEY and reference it from the config, so it never lands in the repository. ## How the options compare | Option | Price | Access and limits | Coverage and history | Best for | Checked | | --- | --- | --- | --- | --- | --- | | [sam-gov-mcp (open source, PyPI)](https://pypi.org/project/sam-gov-mcp/) | Free | Hosted edition: no key, 6 tools; local edition: 20 tools on your own SAM.gov key, so SAM.gov's daily limits apply | Wraps the official SAM.gov REST APIs live (version 1.0.18, released 27 Oct 2026) | Agents that need a few live SAM.gov calls a day | 2026-11-15 | | [GovCon API (govconapi.com)](https://govconapi.com/pricing) | Developer $19/mo, Pro $39/mo; 14-day trial | 1,000 requests an hour (50 a minute burst); trial 50 a day | 12,265,150 contracts and 758,552 opportunities from FY2025; 904,090 entities, monthly | Developers who want the lowest entry price and FY2025+ history | 2026-11-15 | | [samgovapi.io](https://samgovapi.io/pricing) | Free (100 credits a month, no card); Developer $49/mo, Pro $149/mo, Scale $499/mo | 20 to 180 requests a minute by plan, no daily cap; REST, MCP and keyless MCP search | 881,370 entities (1 Nov 2026 extract), 74,420 notices, 169,191 exclusions, 114,954 awards since 1 Oct 2026 | Developers and AI agents who want entities, bids and exclusions joined in one API | 2026-11-15 | ## Where samgovapi.io is the weaker choice - The free plan's 100 credits go fast if an agent loops; set a low limit in tests or use a paid key. ## Try it Cursor config; Claude Code uses the one-line command shown on the Claude page. ``` { "mcpServers": { "samgovapi": { "url": "https://samgovapi.io/api/mcp", "headers": { "Authorization": "Bearer ${env:SAMGOVAPI_API_KEY}" } } } } ``` ## Questions Does VS Code support it?Yes, through its MCP support with the same URL and header; see the VS Code guide.Can the agent use the API without MCP?Yes, through plain HTTP calls with the Bearer key, using the OpenAPI document. ## Related - [Cursor setup](https://samgovapi.io/agents/cursor) - [VS Code setup](https://samgovapi.io/agents/vs-code) - [Claude Code setup](https://samgovapi.io/agents/claude-code) - [API docs](https://samgovapi.io/docs) - [Pricing](https://samgovapi.io/pricing) - [Answers](https://samgovapi.io/answers)Updated 2026-11-15. Sources checked 2026-11-15.Independent. Not affiliated with, endorsed by or sponsored by GSA, SAM.gov or any U.S. government agency. Registering in SAM.gov is free at sam.gov.

---

HTML version: https://samgovapi.io/answers/cursor-claude-code-federal-data . Markdown: https://samgovapi.io/answers/cursor-claude-code-federal-data.md

Independent. Not affiliated with, endorsed by or sponsored by GSA, SAM.gov or any U.S. government agency. Registering in SAM.gov is free at sam.gov.

Get a free API key: https://samgovapi.io/sign-up?ref=ai-claudebot
