BS

bfrs/shiprocket-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

29 stars 16 forks 质量 68 趋势 8

这是一个用于Shiprocket的模型上下文协议(MCP)服务器。

概览

这是一个用于Shiprocket的模型上下文协议(MCP)服务器。 通过这个,你可以:- 查看最佳且最快的可服务快递合作伙伴(基于城市或邮政编码)及其运费 - 创建、更新(单份或批量)和取消订单 - 直接发货 - 使用 AWB 号码、Shiprocket 订单 ID 或来源订单 ID 跟踪订单 它通过电子邮件和密码直接连接到你的个人Shiprocket账户。 - Node(版本> 20.0.0 和 < 23.0.0)- Claude 桌面应用(或光标) 请在你的claude_desktop_config.json或mcp.json中添加以下内容 对于 Claude,请将此文件保存为 claude_desktop_config.json,存放在您的 Claude Desktop 配置文件目录中: 对于光标,请将此保存为mcp.json,存于你的光标配置文件目录: 打开Claude Desktop,你现在应该会看到Shiprocket作为可用的集成。

概述(AI 翻译)

这是一个用于Shiprocket的模型上下文协议(MCP)服务器。

通过这些,你可以:

  • 根据城市或邮编查询最佳且最快的快递合作伙伴及其运费
  • 创建、更新(单份或批量)和取消订单
  • 直接下船订单
  • 使用AWB编号、Shiprocket订单ID或源订单ID跟踪订单

它通过电子邮件和密码直接连接到你的个人Shiprocket账户。

这里有一个例子,说明当它连接到克劳德时你可以做什么。


🛠️ 先修条件

  • 节点(版本>20.0.0和< 23.0.0)
  • Claude 桌面应用(或光标)

🛠️ 安装

1.克隆仓库

2.使用现有package.json安装依赖

3.连接到MCP服务器

在你的claude_desktop_config.json或mcp.json中添加以下内容。

对于 Claude,请将此文件保存为 claude_desktop_config.json,存放在您的 Claude Desktop 配置文件目录中:

对于光标,请将此保存为mcp.json,存于你的光标配置文件目录:

打开Claude Desktop,你现在应该会看到“Shiprocket’作为可用的集成。

或者重启光标。

作为远程(HTTP + OAuth)服务器运行

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

🚀 Shiprocket MCP Integration

This is a Model Context Protocol (MCP) server for Shiprocket.

With this, you can:

  • Check best and fastest serviceable courier partners(based on city or pincodes) and their shipping rates
  • Create, update (single or bulk), and cancel orders
  • Ship orders directly
  • Track orders using the AWB number, Shiprocket Order ID, or Source Order ID

It connects to your personal Shiprocket account directly via Email and password.

Here’s an example of what you can do when it’s connected to Claude.


🛠️ Prerequisites

  • Node (version > 20.0.0 and < 23.0.0)
  • Claude Desktop app (or Cursor)

🛠️ Installation

1. Clone the Repository

git clone https://github.com/bfrs/shiprocket-mcp.git
cd shiprocket-mcp

2. Install Dependencies using the existing package.json

# Install dependencies
npm install

# Build the binary
npm run build

3. Connect to MCP server

Add the following to your claude_desktop_config.json or mcp.json

{
 "mcpServers": {
   "Shiprocket": {
     "command": "npm",
      "args": [
        "--prefix",
        "{{PATH_TO_SRC}}",
        "start",
        "--silent"
      ],
      "env": {
       "SELLER_EMAIL":"",
       "SELLER_PASSWORD":""
     }
   }
 }
}

For Claude, save this as claude_desktop_config.json in your Claude Desktop configuration directory at:

~/Library/Application Support/Claude/claude_desktop_config.json

For Cursor, save this as mcp.json in your Cursor configuration directory at:

~/.cursor/mcp.json

Open Claude Desktop and you should now see Shiprocket as an available integration.

Or restart Cursor.

Running as a remote (HTTP + OAuth) server

Instead of every user running a local copy with their password in a config file, the server can be hosted once and sellers connect by URL. Clients (Claude.ai, ChatGPT, Claude Code, Cursor) discover the OAuth endpoints automatically and open a browser login.

cp .env.example .env            # then fill in the HTTP section
npm run build && npm run start:http
# or: docker compose up
Variable Required Purpose
OAUTH_ISSUER production Public base URL, e.g. https://mcp.example.com
TOKEN_ENC_KEY production Base64 32-byte key; seller tokens are AES-256-GCM encrypted in Redis. Generate with openssl rand -base64 32. Rotating it invalidates every stored token (sellers re-login).
REDIS_HOST / REDIS_PORT / REDIS_PASSWORD / REDIS_TLS production Token store. Without REDIS_HOST an in-memory store is used (development only).

Endpoints: /.well-known/oauth-authorization-server, /oauth/register (DCR), /oauth/authorize, /oauth/consent, /oauth/token, /oauth/revoke (RFC 7009 — revoking either token of a pair invalidates both and closes any live MCP session), /mcp.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "Shiprocket": { "command": "npm", "args": [ "--prefix", "{{PATH_TO_SRC}}", "start", "--silent" ], "env": { "SELLER_EMAIL":"<Your Shiprocket Email>", "SELLER_PASSWORD":"<Your Shiprocket password>" } } } }