# SDKs and packages Two packages are published on npm. npm install samgovapi adds a typed JavaScript and TypeScript client with cursor paging and no runtime dependencies. npx -y samgovapi-mcp runs a local stdio MCP server for Claude, Cursor and other agents. Both send your SAMGOVAPI_API_KEY when it is set, and their search and fetch work without one. It runs in Node, Bun, Deno and edge runtimes that ship fetch.Checked on 2026-11-12.Official source: [samgovapi on npm](https://www.npmjs.com/package/samgovapi) | JavaScript client | npm install samgovapi | | --- | --- | | MCP server | npx -y samgovapi-mcp | | Key variable | SAMGOVAPI_API_KEY | | Runtime | Node 18 or later | ## JavaScript and TypeScript client The client wraps every documented endpoint with typed methods, follows meta.next_cursor for you, and throws errors that carry the API error code and the limit that was hit. It runs in Node, Bun, Deno and edge runtimes that ship fetch. - [samgovapi on npm](https://www.npmjs.com/package/samgovapi) ``` npm install samgovapi import { SamGovAPI } from "samgovapi"; const client = new SamGovAPI({ apiKey: process.env.SAMGOVAPI_API_KEY }); console.log(await client.search("53U20")); ``` ## Local MCP server For agents that only run local processes, samgovapi-mcp exposes the same tools over stdio. Without a key it offers the keyless search and fetch tools; with a key it adds entity, opportunity, exclusion and award lookups. The hosted server at /api/mcp needs no install at all. - [samgovapi-mcp on npm](https://www.npmjs.com/package/samgovapi-mcp) - [MCP Registry: io.github.samgovapi/samgovapi](https://registry.modelcontextprotocol.io/v0/servers?search=io.github.samgovapi) ``` claude mcp add samgovapi -e SAMGOVAPI_API_KEY=sg_YOUR_KEY -- npx -y samgovapi-mcp ``` ## Plain HTTP works too The packages are optional. Every endpoint is plain JSON over HTTPS with a Bearer key, so curl, Python requests or any HTTP client is enough; the Python and JavaScript guides have runnable examples. ## Related - [JavaScript](https://samgovapi.io/javascript) - [Python](https://samgovapi.io/python) - [MCP server](https://samgovapi.io/mcp) - [Pagination](https://samgovapi.io/docs/pagination)Updated 2026-11-12. Sources checked 2026-11-12.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/sdks . Markdown: https://samgovapi.io/sdks.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
