{
  "markdown": "<div align=\"center\">\n\n# @shopana/carrier-api\n\n**Modern type-safe API clients for shipping carriers**\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.x-blue.svg?style=flat-square)](https://www.typescriptlang.org/)\n[![Monorepo](https://img.shields.io/badge/Monorepo-Yarn%20Workspaces-2C8EBB.svg?style=flat-square)](https://yarnpkg.com/features/workspaces)\n\n[Features](#-features) • [Packages](#-packages) • [Quick Start](#-quick-start) • [Documentation](#-documentation) • [Contributing](#-contributing)\n\n</div>\n\n---\n\n## 🚀 Overview\n\nA production-ready monorepo containing **enterprise-grade TypeScript API clients** for shipping carriers. Built with modern architecture patterns, each client features plugin-based design, full type safety, and transport-agnostic implementation.\n\n### 🎯 Why Carrier API?\n\n- ✨ **Type-Safe**: Complete TypeScript coverage with strict typing\n- 🔌 **Plugin Architecture**: Use only what you need, tree-shake the rest\n- 🌐 **Universal**: Works in Node.js, browsers, and edge runtimes\n- 🎨 **Transport-Agnostic**: Bring your own HTTP client\n- 🤖 **AI-Ready**: MCP server for Claude and other AI assistants\n- 📦 **Zero Config**: Sensible defaults, works out of the box\n\n---\n\n## 📦 Packages\n\n### Carrier API Clients\n\n#### [@shopana/novaposhta-api-client](./packages/novaposhta-api-client)\n\n[![npm version](https://img.shields.io/npm/v/@shopana/novaposhta-api-client.svg?style=flat-square)](https://www.npmjs.com/package/@shopana/novaposhta-api-client)\n[![Bundle Size](https://img.shields.io/bundlephobia/minzip/@shopana/novaposhta-api-client?style=flat-square)](https://bundlephobia.com/package/@shopana/novaposhta-api-client)\n\n**Nova Poshta API client** with plugin architecture and complete type safety.\n\n**Features:**\n- 🔧 Plugin-based services (Address, Reference, Tracking, Waybill, Counterparty, ContactPerson)\n- 📛 Namespaced API: `client.address.*`, `client.reference.*`, `client.tracking.*`, `client.waybill.*`\n- 🎯 Full TypeScript support with strict typing\n- 🔄 Transport-agnostic design\n- 🌳 Tree-shakeable - only bundle what you use\n- 📖 Comprehensive documentation with examples\n\n```bash\nnpm i @shopana/novaposhta-api-client @shopana/novaposhta-transport-fetch\n```\n\n[📚 Documentation](./packages/novaposhta-api-client/README.md)\n\n---\n\n### AI Integration\n\n#### [@shopana/novaposhta-mcp-server](./packages/novaposhta-mcp-server)\n\n[![npm version](https://img.shields.io/npm/v/@shopana/novaposhta-mcp-server.svg?style=flat-square)](https://www.npmjs.com/package/@shopana/novaposhta-mcp-server)\n[![MCP](https://img.shields.io/badge/MCP-1.22+-green.svg?style=flat-square)](https://modelcontextprotocol.io)\n[![MCP Badge](https://lobehub.com/badge/mcp/shopanaio-carrier-api)](https://lobehub.com/mcp/shopanaio-carrier-api)\n\n**Model Context Protocol (MCP) server** for integrating Nova Poshta with AI assistants like Claude.\n\n**Features:**\n- 🤖 Full MCP 1.22+ support\n- 📍 Comprehensive tracking and address search\n- 📝 Waybill creation and management\n- 📚 Reference data access\n- 🔄 Dual transport (stdio + HTTP)\n- 🏢 Production-ready with enterprise-grade error handling\n\n```bash\nnpx @shopana/novaposhta-mcp-server\n```\n\n[📚 Documentation](./packages/novaposhta-mcp-server/README.md)\n\n---\n\n### Transport Implementations\n\n#### [@shopana/novaposhta-transport-fetch](./packages/novaposhta-transport-fetch)\n\n[![npm version](https://img.shields.io/npm/v/@shopana/novaposhta-transport-fetch.svg?style=flat-square)](https://www.npmjs.com/package/@shopana/novaposhta-transport-fetch)\n\n**Fetch-based HTTP transport** for Nova Poshta API client.\n\n**Features:**\n- 🌐 Cross-platform (Node.js, browsers, edge runtimes)\n- ⚙️ Configurable headers and fetch implementation\n- 🚫 AbortSignal support for request cancellation\n- 📦 Minimal dependencies\n- ⚡ Lightweight and fast\n\n```bash\nnpm i @shopana/novaposhta-transport-fetch\n```\n\n[📚 Documentation](./packages/novaposhta-transport-fetch/README.md)\n\n---\n\n## 🚀 Quick Start\n\n### Nova Poshta API Client\n\n```typescript\nimport { createClient, AddressService, ReferenceService, TrackingService } from '@shopana/novaposhta-api-client';\nimport { createFetchHttpTransport } from '@shopana/novaposhta-transport-fetch';\n\n// Create client with plugins\nconst client = createClient({\n  transport: createFetchHttpTransport(),\n  baseUrl: 'https://api.novaposhta.ua/v2.0/json/',\n  apiKey: process.env.NOVA_POSHTA_API_KEY,\n})\n  .use(new AddressService())\n  .use(new ReferenceService())\n  .use(new TrackingService());\n\n// Use the namespaced API\nconst cities = await client.address.searchCities({ FindByString: 'Київ', Limit: 10 });\nconst cargoTypes = await client.reference.getCargoTypes();\nconst tracking = await client.tracking.trackDocument({ Documents: ['20450123456789'] });\n\nconsole.log('Found cities:', cities.data.length);\nconsole.log('Package status:', tracking.data[0].Status);\n```\n\n### MCP Server for AI Assistants\n\nAdd to your `.mcp.json` or Claude Desktop config:\n\n```json\n{\n  \"mcpServers\": {\n    \"novaposhta\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"-p\", \"@shopana/novaposhta-mcp-server\", \"novaposhta-mcp\"],\n      \"env\": {\n        \"NOVA_POSHTA_API_KEY\": \"your_api_key_here\"\n      }\n    }\n  }\n}\n```\n\nThen ask Claude:\n- \"Track Nova Poshta package 20450123456789\"\n- \"Find warehouses in Kyiv with POS terminals\"\n- \"Calculate shipping cost from Kyiv to Lviv for 5kg parcel\"\n\n---\n\n## 🏗️ Architecture\n\nAll carrier clients in this monorepo follow a **consistent, battle-tested design pattern**:\n\n```\n┌─────────────────────────────────────────┐\n│           Your Application              │\n└──────────────┬──────────────────────────┘\n               │\n               ▼\n┌─────────────────────────────────────────┐\n│      Plugin-based API Client            │\n│  ┌──────────┐ ┌──────────┐ ┌─────────┐ │\n│  │ Address  │ │Reference │ │Tracking │ │\n│  │ Service  │ │ Service  │ │ Service │ │\n│  └──────────┘ └──────────┘ └─────────┘ │\n└──────────────┬──────────────────────────┘\n               │\n               ▼\n┌─────────────────────────────────────────┐\n│      Transport Layer (Injectable)       │\n│         fetch / axios / custom          │\n└─────────────────────────────────────────┘\n```\n\n### Key Principles\n\n- 🔌 **Plugin-based**: Connect only the services you need\n- 🎯 **Type-safe**: Complete TypeScript coverage with inference\n- 🎨 **Transport-agnostic**: Use fetch, axios, or custom HTTP client\n- 🌳 **Tree-shakeable**: Optimal bundle size - only what you use\n- 📛 **Namespaced API**: Clean, organized method calls\n- 🧪 **Testable**: Mock transport layer for unit tests\n\n---\n\n## 📚 Documentation\n\n### Package Documentation\n\n- [Nova Poshta API Client](./packages/novaposhta-api-client/README.md)\n- [Nova Poshta MCP Server](./packages/novaposhta-mcp-server/README.md)\n- [Nova Poshta Transport (Fetch)](./packages/novaposhta-transport-fetch/README.md)\n\n### Additional Resources\n\n- [Nova Poshta API Official Docs](https://developers.novaposhta.ua/)\n- [Model Context Protocol](https://modelcontextprotocol.io)\n- [TypeScript Documentation](https://www.typescriptlang.org/docs/)\n\n---\n\n## 🛠️ Development\n\n### Prerequisites\n\n- Node.js 18+ or 20+\n- Yarn 3+ (Yarn Workspaces)\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/shopanaio/carrier-api.git\ncd carrier-api\n\n# Install dependencies\nyarn install\n\n# Build all packages\nyarn build\n```\n\n### Available Scripts\n\n```bash\n# Development\nyarn dev                  # Watch mode for API client\nyarn dev:mcp:stdio        # Run MCP server in stdio mode\nyarn dev:mcp:http         # Run MCP server in HTTP mode\n\n# Building\nyarn build                # Build API client\nyarn build:mcp            # Build MCP server\n\n# Testing\nyarn test                 # Run all tests\nyarn test:watch           # Run tests in watch mode\nyarn test:coverage        # Generate coverage report\nyarn test:mcp             # Run MCP server tests\n\n# Code Quality\nyarn lint                 # Lint TypeScript files\nyarn lint:fix             # Fix linting issues\nyarn format               # Format code with Prettier\nyarn format:check         # Check code formatting\nyarn type-check           # Run TypeScript type checking\n```\n\n### Project Structure\n\n```\ncarrier-api/\n├── packages/\n│   ├── novaposhta-api-client/       # Core API client\n│   │   ├── src/\n│   │   │   ├── core/                # Client core logic\n│   │   │   ├── services/            # Service plugins\n│   │   │   ├── types/               # TypeScript types\n│   │   │   └── index.ts\n│   │   └── package.json\n│   │\n│   ├── novaposhta-mcp-server/       # MCP server for AI\n│   │   ├── src/\n│   │   │   ├── cli/                 # CLI entry points\n│   │   │   ├── tools/               # MCP tools\n│   │   │   ├── server.ts            # Server implementation\n│   │   │   └── config.ts\n│   │   └── package.json\n│   │\n│   └── novaposhta-transport-fetch/  # Fetch transport\n│       ├── src/\n│       └── package.json\n│\n├── e2e/                             # End-to-end tests\n├── postman/                         # Postman collections\n├── .mcp.json                        # MCP server config\n└── package.json                     # Root package.json\n```\n\n---\n\n## 🤝 Contributing\n\nWe welcome contributions from the community! Whether it's bug fixes, new features, documentation improvements, or examples - all contributions are appreciated.\n\n### How to Contribute\n\n1. **Fork the repository**\n2. **Create a feature branch**: `git checkout -b feature/amazing-feature`\n3. **Make your changes**: Follow our coding standards\n4. **Add tests**: Ensure your changes are tested\n5. **Run tests**: `yarn test` - make sure everything passes\n6. **Commit your changes**: `git commit -m 'feat: add amazing feature'`\n7. **Push to your fork**: `git push origin feature/amazing-feature`\n8. **Open a Pull Request**\n\n### Development Guidelines\n\n- Write clean, readable TypeScript code\n- Follow the existing code style\n- Add tests for new functionality\n- Update documentation as needed\n- Use conventional commits (feat, fix, docs, chore, etc.)\n\n### Changesets and releases\n\nPackage releases are automated with GitHub Actions and Changesets. Changes to\npackage source files, package scripts, or package manifests must include a\nuser-facing Changeset generated with:\n\n```sh\nyarn changeset\n```\n\nSelect every affected public package and use `patch` for backwards-compatible\nfixes or `minor` for backwards-compatible features. Major Changesets and\nplaceholder release notes are rejected automatically. Documentation-only,\ntest-only, and repository maintenance changes do not need a Changeset.\n\nThe `Changeset Required` workflow checks pull requests before release automation\ncan run.\n\nReleases use the `main` branch:\n\n1. Merge a source change and its `.changeset/*.md` file into `main`.\n2. The `Release` workflow opens a `chore: version packages` pull request.\n3. Review and merge that version pull request.\n4. The same workflow builds and publishes stable package versions to npm with\n   the `latest` tag and creates GitHub releases.\n\nManual release packaging checks are:\n\n```sh\nyarn build\nyarn pack:dry-run\n```\n\nnpm publishing uses Trusted Publishing/OIDC. Configure every public npm package\nto trust the `shopanaio/carrier-api` repository and\n`.github/workflows/release.yml`. Packages that do not exist on npm yet require a\nrepository `NPM_TOKEN` secret for their first publication; it can be removed\nafter Trusted Publishing is configured. A `CHANGESETS_TOKEN` secret is optional\nand is only needed when the default `GITHUB_TOKEN` cannot manage release pull\nrequests.\n\n### Reporting Issues\n\nFound a bug or have a feature request? Please [open an issue](https://github.com/shopanaio/carrier-api/issues) with:\n\n- Clear description of the issue\n- Steps to reproduce (for bugs)\n- Expected vs actual behavior\n- Environment details (Node.js version, OS, etc.)\n\n---\n\n## 🗺️ Roadmap\n\n### Planned Features\n\n- [ ] Additional carrier integrations\n- [ ] GraphQL API layer\n- [ ] React hooks package\n- [ ] CLI tool for common operations\n- [ ] Webhook handling utilities\n- [ ] Rate limiting and retry strategies\n- [ ] Caching layer with configurable adapters\n\n### Future Carriers\n\n**Eastern Europe:**\n- Ukrposhta\n- Meest\n- Justin\n- Delivery\n\n**International:**\n- DHL\n- FedEx\n- UPS\n- DPD\n\nWant to help implement these? [Contributions welcome!](#-contributing)\n\n---\n\n## 📊 Status\n\n| Package | Version | Build | Coverage | Downloads |\n|---------|---------|-------|----------|-----------|\n| [@shopana/novaposhta-api-client](https://www.npmjs.com/package/@shopana/novaposhta-api-client) | [![npm](https://img.shields.io/npm/v/@shopana/novaposhta-api-client.svg?style=flat-square)](https://www.npmjs.com/package/@shopana/novaposhta-api-client) | ![Build](https://img.shields.io/badge/build-passing-brightgreen?style=flat-square) | ![Coverage](https://img.shields.io/badge/coverage-85%25-green?style=flat-square) | ![Downloads](https://img.shields.io/npm/dm/@shopana/novaposhta-api-client?style=flat-square) |\n| [@shopana/novaposhta-mcp-server](https://www.npmjs.com/package/@shopana/novaposhta-mcp-server) | [![npm](https://img.shields.io/npm/v/@shopana/novaposhta-mcp-server.svg?style=flat-square)](https://www.npmjs.com/package/@shopana/novaposhta-mcp-server) | ![Build](https://img.shields.io/badge/build-passing-brightgreen?style=flat-square) | ![Coverage](https://img.shields.io/badge/coverage-80%25-green?style=flat-square) | ![Downloads](https://img.shields.io/npm/dm/@shopana/novaposhta-mcp-server?style=flat-square) |\n| [@shopana/novaposhta-transport-fetch](https://www.npmjs.com/package/@shopana/novaposhta-transport-fetch) | [![npm](https://img.shields.io/npm/v/@shopana/novaposhta-transport-fetch.svg?style=flat-square)](https://www.npmjs.com/package/@shopana/novaposhta-transport-fetch) | ![Build](https://img.shields.io/badge/build-passing-brightgreen?style=flat-square) | ![Coverage](https://img.shields.io/badge/coverage-90%25-green?style=flat-square) | ![Downloads](https://img.shields.io/npm/dm/@shopana/novaposhta-transport-fetch?style=flat-square) |\n\n---\n\n## 📄 License\n\nApache License 2.0 - see [LICENSE](./LICENSE) for details.\n\nThis project is licensed under the Apache License 2.0, which means:\n- ✅ Commercial use allowed\n- ✅ Modification allowed\n- ✅ Distribution allowed\n- ✅ Patent use allowed\n- ✅ Private use allowed\n\n---\n\n## 💬 Support & Community\n\n- **Issues**: [GitHub Issues](https://github.com/shopanaio/carrier-api/issues)\n- **Discussions**: [GitHub Discussions](https://github.com/shopanaio/carrier-api/discussions)\n- **Email**: [support@shopana.io](mailto:support@shopana.io)\n- **Website**: [shopana.io](https://shopana.io)\n\n---\n\n## 🙏 Acknowledgments\n\n- [Nova Poshta](https://novaposhta.ua) for their comprehensive API\n- [Model Context Protocol](https://modelcontextprotocol.io) team at Anthropic\n- All contributors who help improve this project\n\n---\n\n<div align=\"center\">\n\n**Made with ❤️ by [Shopana.io](https://shopana.io)**\n\n[![GitHub stars](https://img.shields.io/github/stars/shopanaio/carrier-api?style=social)](https://github.com/shopanaio/carrier-api)\n[![GitHub forks](https://img.shields.io/github/forks/shopanaio/carrier-api?style=social)](https://github.com/shopanaio/carrier-api/fork)\n[![GitHub watchers](https://img.shields.io/github/watchers/shopanaio/carrier-api?style=social)](https://github.com/shopanaio/carrier-api)\n\n[⬆ Back to Top](#shopanacarrier-api)\n\n</div>\n",
  "bytes": 15458,
  "sha": "214a41ec8f2a2d2b87d50dfbcd53d038fe442adb0d6852217582a0fcd355ba1b",
  "repo_slug": "shopanaio/carrier-api",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_shopanaio_novaposhta_87a76146/readme"
}