{"_id":"@beshkenadze/govinfo-sdk","name":"@beshkenadze/govinfo-sdk","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@beshkenadze/govinfo-sdk","version":"0.1.0","description":"TypeScript SDK and MCP server for the GovInfo API","author":{"name":"Aleksandr Beshkenadze","email":"beshkenadze@gmail.com"},"license":"MIT","keywords":["govinfo","government","federal","documents","api","sdk","mcp","typescript"],"homepage":"https://github.com/beshkenadze/ecfr-sdk#readme","repository":{"type":"git","url":"git+https://github.com/beshkenadze/ecfr-sdk.git","directory":"packages/govinfo-sdk"},"bugs":{"url":"https://github.com/beshkenadze/ecfr-sdk/issues"},"type":"module","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./mcp":{"types":"./dist/mcp/index.d.ts","import":"./dist/mcp/index.mjs","require":"./dist/mcp/index.js"}},"scripts":{"dev":"bun run src/index.ts","build":"bun run build.ts","download":"bun run scripts/download-openapi.ts","generate":"orval","format":"biome format --write .","lint":"biome lint --write .","check":"biome check --write .","check:ci":"biome ci .","prepublishOnly":"bun run build","test":"bun test src","test:watch":"bun test --watch src","test:integration":"SKIP_INTEGRATION_TESTS=false bun test src","test:e2e":"bun test tests/e2e","test:e2e:api":"bun test tests/e2e/api.e2e.test.ts","test:e2e:mcp":"bun test tests/e2e/mcp-server.e2e.test.ts","test:all":"bun test","mcp:server":"bun run src/mcp/server.ts"},"devDependencies":{"@biomejs/biome":"^2.1.2","@types/bun":"latest","@types/node":"^24.1.0","@us-legal-tools/tsconfig":"workspace:*","orval":"^7.10.0","typescript":"^5.8.3"},"dependencies":{"@modelcontextprotocol/sdk":"^1.16.0","axios":"^1.10.0","zod":"^3.24.1"},"peerDependencies":{"typescript":"^5.0.0"},"engines":{"node":">=22.0.0"},"_id":"@beshkenadze/govinfo-sdk@0.1.0","gitHead":"382204b5f11991e9baf2fe4eb85d9aebb6b3a9c4","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-gYa8b3EZBFHERqAMYXK7t/L4SZN2rDttOkbQHcsi8Dr4g9Te/p6PuM51k/40d8WMWy+LCdsHDPA0yNnZmWkGIw==","shasum":"bca720fdea20ef1f4801e6615b7c02b77eda0edc","tarball":"https://registry.npmjs.org/@beshkenadze/govinfo-sdk/-/govinfo-sdk-0.1.0.tgz","fileCount":10,"unpackedSize":402193,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFfgTEMD8ooWJL4MdSSvlYAi0MlkrjXQkYRqj05bx3CsAiAB1gGRHGDaGA+kp628T+hY64Zi6dCHir40KJd5w3KdfA=="}]},"_npmUser":{"name":"beshkenadze","email":"beshkenadze@gmail.com"},"directories":{},"maintainers":[{"name":"beshkenadze","email":"beshkenadze@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/govinfo-sdk_0.1.0_1753447877905_0.35233740896658117"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-25T12:51:17.528Z","0.1.0":"2025-07-25T12:51:18.134Z","modified":"2025-07-25T12:51:18.377Z"},"maintainers":[{"name":"beshkenadze","email":"beshkenadze@gmail.com"}],"description":"TypeScript SDK and MCP server for the GovInfo API","homepage":"https://github.com/beshkenadze/ecfr-sdk#readme","keywords":["govinfo","government","federal","documents","api","sdk","mcp","typescript"],"repository":{"type":"git","url":"git+https://github.com/beshkenadze/ecfr-sdk.git","directory":"packages/govinfo-sdk"},"author":{"name":"Aleksandr Beshkenadze","email":"beshkenadze@gmail.com"},"bugs":{"url":"https://github.com/beshkenadze/ecfr-sdk/issues"},"license":"MIT","readme":"# @beshkenadze/govinfo-sdk\n\nTypeScript SDK and MCP server for the GovInfo API - providing programmatic access to federal government information from the U.S. Government Publishing Office.\n\n## Installation\n\n```bash\nnpm install @beshkenadze/govinfo-sdk\n# or\nyarn add @beshkenadze/govinfo-sdk\n# or\nbun add @beshkenadze/govinfo-sdk\n```\n\n## Features\n\n- 🚀 Full TypeScript support with auto-generated types\n- 📦 Lightweight and tree-shakeable\n- 🔧 Built on top of Axios for reliable HTTP requests\n- 🤖 MCP (Model Context Protocol) server included\n- ⚡ Support for all GovInfo API endpoints\n- 🛡️ Type-safe request and response handling\n\n## Quick Start\n\n```typescript\nimport { createGovInfoClient } from '@beshkenadze/govinfo-sdk';\n\n// Initialize the client\nconst client = createGovInfoClient({\n  apiKey: 'YOUR_API_KEY', // Get from https://api.data.gov/signup/\n});\n\n// Example: Search for documents\nconst searchResults = await client.search({\n  query: 'climate change',\n  pageSize: 10,\n});\n```\n\n## API Client Usage\n\n### Configuration\n\n```typescript\nimport { createGovInfoClient } from '@beshkenadze/govinfo-sdk';\n\nconst client = createGovInfoClient({\n  apiKey: 'YOUR_API_KEY',\n  baseURL: 'https://api.govinfo.gov', // Optional, this is the default\n  timeout: 30000, // Optional timeout in ms\n});\n```\n\n### Available Methods\n\nThe SDK provides methods for all GovInfo API endpoints. Methods will be auto-generated based on the OpenAPI specification.\n\n## MCP Server\n\nThe package includes an MCP server that can be used with Claude Desktop or other MCP-compatible applications.\n\n### Configuration\n\nAdd to your Claude Desktop configuration:\n\n```json\n{\n  \"mcpServers\": {\n    \"govinfo\": {\n      \"command\": \"npx\",\n      \"args\": [\"@beshkenadze/govinfo-sdk/mcp\"],\n      \"env\": {\n        \"GOVINFO_API_KEY\": \"YOUR_API_KEY\"\n      }\n    }\n  }\n}\n```\n\n### Available Tools\n\nThe MCP server exposes GovInfo API operations as tools that can be called by Claude or other MCP clients. Each API endpoint becomes a callable tool with appropriate parameters.\n\n## Development\n\n### Building from Source\n\n```bash\n# Clone the repository\ngit clone https://github.com/beshkenadze/ecfr-sdk.git\ncd ecfr-sdk/packages/govinfo-sdk\n\n# Install dependencies\nbun install\n\n# Generate SDK from OpenAPI spec\nbun run generate\n\n# Build the package\nbun run build\n\n# Run tests\nbun test\n```\n\n### Testing\n\nThe test suite requires a GovInfo API key. You can obtain one for free at https://api.data.gov/signup/.\n\n```bash\n# Set your API key in the environment\nexport GOV_INFO_API_KEY=your_api_key_here\n\n# Or create a .env file in the project root\necho \"GOV_INFO_API_KEY=your_api_key_here\" >> ../../.env\n\n# Run all tests\nbun test\n\n# Run e2e tests specifically\nbun run test:e2e\n```\n\n### Scripts\n\n- `bun run generate` - Download OpenAPI spec and generate SDK code\n- `bun run build` - Build the package for distribution\n- `bun run test` - Run unit tests\n- `bun run test:integration` - Run integration tests\n- `bun run mcp:server` - Run the MCP server locally\n\n## API Documentation\n\nFor detailed API documentation, visit:\n- [GovInfo API Documentation](https://api.govinfo.gov/docs/)\n- [GovInfo Developer Resources](https://www.govinfo.gov/developers)\n\n## License\n\nMIT\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Support\n\nFor issues and feature requests, please use the [GitHub issue tracker](https://github.com/beshkenadze/ecfr-sdk/issues).","readmeFilename":"README.md","_rev":"1-16d8c7be694353e5892852d69cf32592"}