UA

ups-api/ups-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

31 stars 12 forks 品質 68 トレンド 11MIT

UPS API 用の MCP サーバー

概要

UPSの船積みおよび兵站学の機能のためのモデルコンテキスト プロトコル(MCP)サーバー。 このサーバーは、AIシステムがUPS APIツールとシームレスに統合できるようにします。 ユーザーは、AIエージェントが出荷状況の追跡、最新のトランジット画面、および予想される配送日と時刻を含む、代理で追跡イベントを容易にできるようにするために、MCPサーバーと統合できます。 エージェントは、UPS Developer Portal でアプリケーション作成後、ユーザーに提供される OAuth クライアントの資格情報を使用して認証されます。 - クライアント ID と Client Secret を入手: OAuth の資格情報を取得するために、UPS Developer Portal でアプリケーションを作成する - クライアント ID とクライアントシークレット。 ([https://developer.ups.com/get-started?loc=en_US)]]) - Python 3.12 以上 - uv をインストール (Python パッケージ) - - UPSクライアントID - - UPSクライアントシークレット - - テスト(CIE)または生産(受容値:テスト、生産)を指すかどうか : API の認証情報は機密です。 バージョン管理にコミットしないでください.

概要(AI 翻訳)

UPSの船積みおよび兵站学の機能のためのモデルコンテキスト プロトコル(MCP)サーバー。 このサーバーは、AIシステムがUPS APIツールとシームレスに統合できるようにします。

ユーザーは、AIエージェントが出荷状況の追跡、最新のトランジット画面、および予想される配送日と時刻を含む、代理で追跡イベントを容易にできるようにするために、MCPサーバーと統合できます。 エージェントは、UPS Developer Portal でアプリケーション作成後、ユーザーに提供される OAuth クライアントの資格情報を使用して認証されます。

使用法

前提条件

  • クライアント ID とクライアントシークレットを取得: OAuth 認証情報 – クライアント ID とクライアントシークレットを取得するために、UPS 開発者ポータルでアプリケーションを作成します。 (https://developer.ups.com/get-started?loc=en_US))
  • Python 3.12以上
  • uvをインストール (Pythonパッケージ)

環境変数 ・

  • UPSクライアントID ・
  • UPSの顧客の秘密 ・
  • テスト(CIE)または生産(受容値:テスト、生産)を指すかどうか

注記: APIの認証情報は機密です。 バージョン管理にコミットしないでください。 GitHub Secrets、Vault、またはパスワード マネジャーを使用して秘密を安全に管理することをお勧めします。

執行

uvx を使用してパッケージを実行できます

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

UPS MCP Server

A Model Context Protocol (MCP) server for UPS shipping and logistics capabilities. This server enables AI systems to seamlessly integrate with UPS API tools.

Users can integrate with the MCP server to allow AI agents to facilitate tracking events on their behalf, including tracking the status of a shipment, the latest transit screen, and expected delivery date and time. Agents will be authenticated using OAuth client credentials provided by the user after application creation on the UPS Developer Portal.

Usage

Prerequisites

  • Obtain a Client ID and Client Secret: Create an application on the UPS Developer Portal to obtain your OAuth credentials – Client ID and Client Secret. (https://developer.ups.com/get-started?loc=en_US)
  • Python 3.12 or higher
  • Install uv (Python Package)

Environment Variables

  • CLIENT_ID - UPS Client ID
  • CLIENT_SECRET - UPS Client Secret
  • ENVIRONMENT - Whether to point to Test (CIE) or Production (Accepted values: test, production)

Note: Your API credentials are sensitive. Do not commit them to version control. We recommend managing secrets securely using GitHub Secrets, a vault, or a password manager.

Execution

You can run the package using uvx:

uvx --from git+https://github.com/UPS-API/ups-mcp ups-mcp

To use an older version, you can specify the version number like so:

uvx --from git+https://github.com/UPS-API/[email protected] ups-mcp

Here are sample config files for popular integrations. Different MCP Clients may require modification.

Claude Desktop

{
  "mcpServers": {
    "ups-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "git+https://github.com/UPS-API/ups-mcp", "ups-mcp"],
      "env": {
        "CLIENT_ID": "**********",
        "CLIENT_SECRET": "**********",
        "ENVIRONMENT": "test"
      }
    }
  }
}

GitHub Copilot in VS Code

{
  "servers": {
    "ups-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["--from", "git+https://github.com/UPS-API/ups-mcp", "ups-mcp"],
      "env": {
        "CLIENT_ID": "**********",
        "CLIENT_SECRET": "**********",
        "ENVIRONMENT": "test"
      }
    }
  }
}

Available Tools

  • track_package: Track a package using the UPS Tracking API

    Args:

    • inquiryNumber (str): the unique package identifier. Each inquiry number must be between 7 and 34 characters in length. Required.
    • locale (str): Language and country code of the user, separated by an underscore. Default value is ‘en_US’. Not required.
    • returnSignature (bool): a boolean to indicate whether a signature is required, default is false. Not required.
    • returnMilestones (bool): a boolean to indicate whether detailed information on a package’s movements is required, default is false. Not required
GitHub で README 全文を見る

インストール

uvx --from git+https://github.com/UPS-API/ups-mcp ups-mcp
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "ups-mcp": { "type": "stdio", "command": "uvx", "args": ["--from", "git+https://github.com/UPS-API/ups-mcp", "ups-mcp"], "env": { "CLIENT_ID": "**********", "CLIENT_SECRET": "**********", "ENVIRONMENT": "test" } } } }