๐ Overview
A 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.
๐ฏ Why Carrier API?
- โจ Type-Safe: Complete TypeScript coverage with strict typing
- ๐ Plugin Architecture: Use only what you need, tree-shake the rest
- ๐ Universal: Works in Node.js, browsers, and edge runtimes
- ๐จ Transport-Agnostic: Bring your own HTTP client
- ๐ค AI-Ready: MCP server for Claude and other AI assistants
- ๐ฆ Zero Config: Sensible defaults, works out of the box
๐ฆ Packages
Carrier API Clients

Nova Poshta API client with plugin architecture and complete type safety.
Features:
- ๐ง Plugin-based services (Address, Reference, Tracking, Waybill, Counterparty, ContactPerson)
- ๐ Namespaced API:
client.address.*, client.reference.*, client.tracking.*, client.waybill.*
- ๐ฏ Full TypeScript support with strict typing
- ๐ Transport-agnostic design
- ๐ณ Tree-shakeable - only bundle what you use
- ๐ Comprehensive documentation with examples
npm i @shopana/novaposhta-api-client @shopana/novaposhta-transport-fetch
๐ Documentation
AI Integration

Model Context Protocol (MCP) server for integrating Nova Poshta with AI assistants like Claude.
Features:
- ๐ค Full MCP 1.22+ support
- ๐ Comprehensive tracking and address search
- ๐ Waybill creation and management
- ๐ Reference data access
- ๐ Dual transport (stdio + HTTP)
- ๐ข Production-ready with enterprise-grade error handling
npx @shopana/novaposhta-mcp-server
๐ Documentation
Transport Implementations

Fetch-based HTTP transport for Nova Poshta API client.
Features:
- ๐ Cross-platform (Node.js, browsers, edge runtimes)
- โ๏ธ Configurable headers and fetch implementation
- ๐ซ AbortSignal support for request cancellation
- ๐ฆ Minimal dependencies
- โก Lightweight and fast
npm i @shopana/novaposhta-transport-fetch
๐ Documentation
๐ Quick Start
Nova Poshta API Client
import { createClient, AddressService, ReferenceService, TrackingService } from '@shopana/novaposhta-api-client';
import { createFetchHttpTransport } from '@shopana/novaposhta-transport-fetch';
// Create client with plugins
const client = createClient({
transport: createFetchHttpTransport(),
baseUrl: 'https://api.novaposhta.ua/v2.0/json/',
apiKey: process.env.NOVA_POSHTA_API_KEY,
})
.use(new AddressService())
.use(new ReferenceService())
.use(new TrackingService());
// Use the namespaced API
const cities = await client.address.searchCities({ FindByString: 'ะะธัะฒ', Limit: 10 });
const cargoTypes = await client.reference.getCargoTypes();
const tracking = await client.tracking.trackDocument({ Documents: ['20450123456789'] });
console.log('Found cities:', cities.data.length);
console.log('Package status:', tracking.data[0].Status);
MCP Server for AI Assistants
Add to your .mcp.json or Claude Desktop config:
{
"mcpServers": {
"novaposhta": {
"command": "npx",
"args": ["-y", "-p", "@shopana/novaposhta-mcp-server", "novaposhta-mcp"],
"env": {
"NOVA_POSHTA_API_KEY": "your_api_key_here"
}
}
}
}
Then ask Claude:
- "Track Nova Poshta package 20450123456789"
- "Find warehouses in Kyiv with POS terminals"
- "Calculate shipping cost from Kyiv to Lviv for 5kg parcel"
๐๏ธ Architecture
All carrier clients in this monorepo follow a consistent, battle-tested design pattern:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Your Application โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Plugin-based API Client โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ Address โ โReference โ โTracking โ โ
โ โ Service โ โ Service โ โ Service โ โ
โ โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Transport Layer (Injectable) โ
โ fetch / axios / custom โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Key Principles
- ๐ Plugin-based: Connect only the services you need
- ๐ฏ Type-safe: Complete TypeScript coverage with inference
- ๐จ Transport-agnostic: Use fetch, axios, or custom HTTP client
- ๐ณ Tree-shakeable: Optimal bundle size - only what you use
- ๐ Namespaced API: Clean, organized method calls
- ๐งช Testable: Mock transport layer for unit tests
๐ Documentation
Package Documentation
Additional Resources
๐ ๏ธ Development
Prerequisites
- Node.js 18+ or 20+
- Yarn 3+ (Yarn Workspaces)
Setup
# Clone the repository
git clone https://github.com/shopanaio/carrier-api.git
cd carrier-api
# Install dependencies
yarn install
# Build all packages
yarn build
Available Scripts
# Development
yarn dev # Watch mode for API client
yarn dev:mcp:stdio # Run MCP server in stdio mode
yarn dev:mcp:http # Run MCP server in HTTP mode
# Building
yarn build # Build API client
yarn build:mcp # Build MCP server
# Testing
yarn test # Run all tests
yarn test:watch # Run tests in watch mode
yarn test:coverage # Generate coverage report
yarn test:mcp # Run MCP server tests
# Code Quality
yarn lint # Lint TypeScript files
yarn lint:fix # Fix linting issues
yarn format # Format code with Prettier
yarn format:check # Check code formatting
yarn type-check # Run TypeScript type checking
Project Structure
carrier-api/
โโโ packages/
โ โโโ novaposhta-api-client/ # Core API client
โ โ โโโ src/
โ โ โ โโโ core/ # Client core logic
โ โ โ โโโ services/ # Service plugins
โ โ โ โโโ types/ # TypeScript types
โ โ โ โโโ index.ts
โ โ โโโ package.json
โ โ
โ โโโ novaposhta-mcp-server/ # MCP server for AI
โ โ โโโ src/
โ โ โ โโโ cli/ # CLI entry points
โ โ โ โโโ tools/ # MCP tools
โ โ โ โโโ server.ts # Server implementation
โ โ โ โโโ config.ts
โ โ โโโ package.json
โ โ
โ โโโ novaposhta-transport-fetch/ # Fetch transport
โ โโโ src/
โ โโโ package.json
โ
โโโ e2e/ # End-to-end tests
โโโ postman/ # Postman collections
โโโ .mcp.json # MCP server config
โโโ package.json # Root package.json
๐ค Contributing
We welcome contributions from the community! Whether it's bug fixes, new features, documentation improvements, or examples - all contributions are appreciated.
How to Contribute
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes: Follow our coding standards
- Add tests: Ensure your changes are tested
- Run tests:
yarn test - make sure everything passes
- Commit your changes:
git commit -m 'feat: add amazing feature'
- Push to your fork:
git push origin feature/amazing-feature
- Open a Pull Request
Development Guidelines