io.github.shopanaio/novaposhta

平台与服务

by shopanaio

用于将 Nova Poshta API 集成到 AI 助手的 MCP Server,便于接入物流查询等能力。

什么是 io.github.shopanaio/novaposhta

用于将 Nova Poshta API 集成到 AI 助手的 MCP Server,便于接入物流查询等能力。

README

<div align="center">

@shopana/carrier-api

Modern type-safe API clients for shipping carriers

License TypeScript Monorepo

FeaturesPackagesQuick StartDocumentationContributing

</div>

🚀 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

@shopana/novaposhta-api-client

npm version Bundle Size

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
bash
npm i @shopana/novaposhta-api-client @shopana/novaposhta-transport-fetch

📚 Documentation


AI Integration

@shopana/novaposhta-mcp-server

npm version MCP MCP Badge

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
bash
npx @shopana/novaposhta-mcp-server

📚 Documentation


Transport Implementations

@shopana/novaposhta-transport-fetch

npm version

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
bash
npm i @shopana/novaposhta-transport-fetch

📚 Documentation


🚀 Quick Start

Nova Poshta API Client

typescript
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:

json
{
  "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:

code
┌─────────────────────────────────────────┐
│           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

bash
# 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

bash
# 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

code
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

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes: Follow our coding standards
  4. Add tests: Ensure your changes are tested
  5. Run tests: yarn test - make sure everything passes
  6. Commit your changes: git commit -m 'feat: add amazing feature'
  7. Push to your fork: git push origin feature/amazing-feature
  8. Open a Pull Request

Development Guidelines

  • Write clean, readable TypeScript code
  • Follow the existing code style
  • Add tests for new functionality
  • Update documentation as needed
  • Use conventional commits (feat, fix, docs, chore, etc.)

Reporting Issues

Found a bug or have a feature request? Please open an issue with:

  • Clear description of the issue
  • Steps to reproduce (for bugs)
  • Expected vs actual behavior
  • Environment details (Node.js version, OS, etc.)

🗺️ Roadmap

Planned Features

  • Additional carrier integrations
  • GraphQL API layer
  • React hooks package
  • CLI tool for common operations
  • Webhook handling utilities
  • Rate limiting and retry strategies
  • Caching layer with configurable adapters

Future Carriers

Eastern Europe:

  • Ukrposhta
  • Meest
  • Justin
  • Delivery

International:

  • DHL
  • FedEx
  • UPS
  • DPD

Want to help implement these? Contributions welcome!


📊 Status

PackageVersionBuildCoverageDownloads
@shopana/novaposhta-api-clientnpmBuildCoverageDownloads
@shopana/novaposhta-mcp-servernpmBuildCoverageDownloads
@shopana/novaposhta-transport-fetchnpmBuildCoverageDownloads

📄 License

Apache License 2.0 - see LICENSE for details.

This project is licensed under the Apache License 2.0, which means:

  • ✅ Commercial use allowed
  • ✅ Modification allowed
  • ✅ Distribution allowed
  • ✅ Patent use allowed
  • ✅ Private use allowed

💬 Support & Community


🙏 Acknowledgments


<div align="center">

Made with ❤️ by Shopana.io

GitHub stars GitHub forks GitHub watchers

⬆ Back to Top

</div>

常见问题

io.github.shopanaio/novaposhta 是什么?

用于将 Nova Poshta API 集成到 AI 助手的 MCP Server,便于接入物流查询等能力。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描114.1k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描114.1k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描10.2k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.4k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.4k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
35.4k

评论