aura-courier-mcp 2.3.2 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/LICENSE +192 -21
  2. package/README.md +359 -26
  3. package/README.md.metadata.json +4 -0
  4. package/dist/adapters/base.d.ts +1 -0
  5. package/dist/adapters/base.js.map +1 -0
  6. package/dist/adapters/fraud_engine.d.ts +8 -1
  7. package/dist/adapters/fraud_engine.js +137 -21
  8. package/dist/adapters/google_maps.d.ts +25 -0
  9. package/dist/adapters/google_maps.js +334 -0
  10. package/dist/adapters/paperfly.d.ts +14 -0
  11. package/dist/adapters/paperfly.js +102 -22
  12. package/dist/adapters/pathao.d.ts +37 -1
  13. package/dist/adapters/pathao.js +247 -31
  14. package/dist/adapters/pathao.js.map +1 -0
  15. package/dist/adapters/redx.d.ts +14 -0
  16. package/dist/adapters/redx.js +81 -12
  17. package/dist/adapters/registry.d.ts +20 -0
  18. package/dist/adapters/registry.js +34 -0
  19. package/dist/adapters/registry.js.map +1 -0
  20. package/dist/adapters/steadfast.d.ts +17 -0
  21. package/dist/adapters/steadfast.js +121 -12
  22. package/dist/adapters/steadfast.js.map +1 -0
  23. package/dist/config.d.ts +4 -0
  24. package/dist/config.js +16 -2
  25. package/dist/config.js.map +1 -0
  26. package/dist/envelope.d.ts +55 -0
  27. package/dist/envelope.js +159 -0
  28. package/dist/http.d.ts +8 -1
  29. package/dist/http.js +699 -58
  30. package/dist/http.js.map +1 -0
  31. package/dist/index.js +2 -1
  32. package/dist/index.js.map +1 -0
  33. package/dist/middleware/auth.d.ts +100 -0
  34. package/dist/middleware/auth.js +585 -0
  35. package/dist/middleware/oauth.d.ts +19 -0
  36. package/dist/middleware/oauth.js +1376 -0
  37. package/dist/middleware/rate_limit.d.ts +9 -0
  38. package/dist/middleware/rate_limit.js +71 -0
  39. package/dist/pages.d.ts +8 -0
  40. package/dist/pages.js +317 -0
  41. package/dist/pages.js.map +1 -0
  42. package/dist/registry.d.ts +51 -6
  43. package/dist/registry.js +625 -28
  44. package/dist/server.d.ts +11 -1
  45. package/dist/server.js +407 -51
  46. package/dist/server.js.map +1 -0
  47. package/dist/tariffs.d.ts +46 -0
  48. package/dist/tariffs.js +153 -0
  49. package/dist/test_zero_risk.js +49 -25
  50. package/dist/tools/index.d.ts +3 -0
  51. package/dist/tools/index.js +162 -0
  52. package/dist/tools/index.js.map +1 -0
  53. package/dist/types.d.ts +188 -4
  54. package/dist/types.js.map +1 -0
  55. package/dist/version.d.ts +1 -0
  56. package/dist/version.js +16 -0
  57. package/package.json +12 -9
package/LICENSE CHANGED
@@ -1,21 +1,192 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Aura Ajentic AI
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ Copyright 2026 Aura Agentic AI <khondokartowsif171@gmail.com>
181
+
182
+ Licensed under the Apache License, Version 2.0 (the "License");
183
+ you may not use this file except in compliance with the License.
184
+ You may obtain a copy of the License at
185
+
186
+ http://www.apache.org/licenses/LICENSE-2.0
187
+
188
+ Unless required by applicable law or agreed to in writing, software
189
+ distributed under the License is distributed on an "AS IS" BASIS,
190
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
191
+ See the License for the specific language governing permissions and
192
+ limitations under the License.
package/README.md CHANGED
@@ -1,48 +1,381 @@
1
- # Aura Courier MCP
1
+ # 🚚 AURA COURIER MCP v2.7.1 — THE ENTERPRISE LOGISTICS MASTER MANUAL
2
+ ### Universal Multi-Carrier Logistics Engine, Spatial Intelligence Hub & Zero-Risk COD Gateway
3
+ **Published by Aura Agentic AI · Architected with DeepMind Principles & Google Maps Platform**
2
4
 
3
- Universal Bangladesh courier MCP server — **Steadfast** & **Pathao** with a built-in **fraud-risk engine** — for Claude, Antigravity, Cursor and any MCP-compatible AI agent. Book and track parcels across Bangladesh by just telling your AI.
5
+ [![Google Cloud Partner Advantage](https://img.shields.io/badge/Google_Cloud_Partner-Aura_Ajentic_AI-4285F4?logo=google-cloud&logoColor=white)](https://cloud.google.com/find-a-partner/partner/aura-ajentic-ai)
6
+ [![auraajenticai/aura-courier-mcp MCP server](https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp/badges/score.svg)](https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp)
7
+ [![Antigravity Plugin](https://img.shields.io/badge/Antigravity_Plugin-v2.7.1-0676FF?logo=google&logoColor=white)](plugin.json)
8
+ [![User Guide BN/EN](https://img.shields.io/badge/User_Guide-বাংলা_%26_English-f59e0b)](https://courier.auraajenticai.cloud/guide)
9
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
10
+ [![Status](https://img.shields.io/badge/Status-Production%20Active-success.svg)](https://courier.auraajenticai.cloud)
11
+ [![Node](https://img.shields.io/badge/Node-%3E%3D20.0.0-green.svg)](https://nodejs.org)
4
12
 
5
- By **Aura Ajentic AI** · [auraajenticai.cloud](https://auraajenticai.cloud) · ✓ Verified on Glama
13
+ <a href="https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp">
14
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/auraajenticai/aura-courier-mcp/badges/card.svg" alt="Aura Courier MCP server" />
15
+ </a>
6
16
 
7
- ## Tools
8
17
 
9
- | Tool | What it does |
10
- |------|--------------|
11
- | `list_couriers` | Show supported couriers and which credentials are active |
12
- | `create_parcel` | Book a parcel (Steadfast / Pathao / auto smart-routing) |
13
- | `track_parcel` | Track a shipment by tracking / consignment ID |
14
- | `get_balance` | Merchant account balance & payout details |
15
- | `check_fraud_risk` | Delivery/return-risk score for a Bangladeshi phone number |
18
+ ---
16
19
 
17
- ## Install (add to your AI's MCP config)
20
+ ## 1. Executive Architecture Overview
21
+
22
+ **Aura Courier MCP** (`https://courier.auraajenticai.cloud/mcp`) is an enterprise-grade, carrier-agnostic Cash On Delivery (COD) logistics gateway and Model Context Protocol (MCP) server. It bridges autonomous AI models (Vertex AI, Claude, Antigravity, ChatGPT, Cursor) with physical courier networks across all 64 districts of Bangladesh.
23
+
24
+ ### Core Architectural Pillars
25
+ ```mermaid
26
+ graph TD
27
+ AI[AI Agent / Vertex AI / Dashboard] -->|Streamable-HTTP / MCP| MCP[Aura Courier MCP Server v2.4]
28
+
29
+ subgraph "Intelligent Logic Engines"
30
+ MCP --> ROUTER[Multi-Carrier Smart Router]
31
+ MCP --> FRAUD[Bayesian Fraud & Delivery Risk Engine]
32
+ MCP --> SPATIAL[Google Maps Platform Spatial Engine]
33
+ MCP --> NDR[Automated NDR Resolution Suite]
34
+ MCP --> WEBHOOKS[Bidirectional Webhook Hub]
35
+ end
36
+
37
+ subgraph "Physical Logistics Carriers"
38
+ ROUTER --> SF[Steadfast Courier - 64 Districts]
39
+ ROUTER --> PT[Pathao Express - On-Demand]
40
+ ROUTER --> RX[RedX Delivery - 2,849 Hubs]
41
+ ROUTER --> PF[Paperfly Go - Doorstep Coverage]
42
+ end
43
+
44
+ subgraph "Spatial Services"
45
+ SPATIAL --> GEO[Geocoding API]
46
+ SPATIAL --> ROUTES[Routes API v2:computeRoutes]
47
+ SPATIAL --> STUDIO[Dynamic Map Studio]
48
+ end
49
+ ```
50
+
51
+ 1. **Carrier-Agnostic Multi-Routing**: Unifies Steadfast, Pathao, RedX, and Paperfly into a single normalized interface.
52
+ 2. **Zero Mock Data Policy**: Every single metric, delivery status, tariff calculation, and fraud score is computed against live carrier databases or authentic mathematical models.
53
+ 3. **Spatial Hierarchy Resolver**: Resolves street addresses into precise administrative hierarchies (City → Zone → Area) eliminating HTTP 422 errors.
54
+ 4. **Automated NDR & Dispute Suite**: Resolves failed courier deliveries via automated customer WhatsApp re-engagement and carrier operational hold tickets.
55
+ 5. **Real-Time Webhook Processing**: Instant asynchronous updates from carriers dispatched directly to merchant dashboards.
56
+
57
+ ---
58
+
59
+ ## 2. Multi-Carrier Enterprise Integration Matrix
60
+
61
+ Aura Courier MCP seamlessly interfaces with all tier-1 Bangladesh courier APIs under a unified standard:
62
+
63
+ | Provider | Endpoint / Base URL | Merchant Account / IDs | Auth Header / Secret | Operational Status |
64
+ | :--- | :--- | :--- | :--- | :--- |
65
+ | **Steadfast** | `https://portal.packzy.com/api/v1` | Account: `<MERCHANT>` (ID: `<STORE_ID>`) | `Api-Key`: `<STEADFAST_API_KEY>`<br>`Secret-Key`: `<STEADFAST_SECRET_KEY>` | **Active**: `get_balance` verified 200 OK. Order booking pending carrier-side toggle. |
66
+ | **Pathao** | `https://api-hermes.pathao.com` | User: `<PATHAO_USERNAME>`<br>Store: `<MERCHANT>` (ID: `<PATHAO_STORE_ID>`) | `Client-ID`: `<PATHAO_CLIENT_ID>`<br>`Client-Secret`: `<PATHAO_CLIENT_SECRET>` | **100% Active**: OAuth2 token issuing, price calculation, auto-geocoding live. |
67
+ | **RedX** | `https://openapi.redx.com.bd/v1.0.0-beta` | Shop ID: `<REDX_SHOP_ID>`<br>Pickup Store ID: `<REDX_STORE_ID>` | `API-ACCESS-TOKEN`: `<REDX_API_TOKEN>`<br>(JWT Bearer Token) | **100% Active**: 2,849 delivery areas and parcel booking verified. |
68
+ | **Paperfly** | `https://api.paperfly.com.bd` | Store: `<MERCHANT>`<br>User: `<PAPERFLY_USERNAME>` | `paperflykey`: `<PAPERFLY_KEY>`<br>Basic Auth: `<PAPERFLY_USERNAME>` / `<PAPERFLY_PASSWORD>` | **100% Active**: Order placement (`new_order_v2.php`) and tracking verified. |
69
+ | **Google Maps** | `https://maps.googleapis.com` | Project: `<GOOGLE_CLOUD_PROJECT>` | `<GOOGLE_MAPS_API_KEY>`<br>(Field Masked) | **100% Active**: Geocoding, Routes API, and Dynamic Map Studio active. |
70
+
71
+ ---
72
+
73
+ ## 3. Official Carrier Integration Specifications
74
+
75
+ ### 3.1. Pathao Express Integration
76
+ * **Token Issuance**: `POST /aladdin/api/v1/issue-token`
77
+ ```bash
78
+ curl --location 'https://api-hermes.pathao.com/aladdin/api/v1/issue-token' \
79
+ --header 'Content-Type: application/json' \
80
+ --data-raw '{
81
+ "client_id": "<PATHAO_CLIENT_ID>",
82
+ "client_secret": "<PATHAO_CLIENT_SECRET>",
83
+ "grant_type": "password",
84
+ "username": "<PATHAO_USERNAME>",
85
+ "password": "<PATHAO_PASSWORD>"
86
+ }'
87
+ ```
88
+ * **Store Management**: `GET /aladdin/api/v1/stores`
89
+ - Active Store: `<PATHAO_STORE_ID>` ("<MERCHANT>", Central Hub, Dhaka)
90
+ * **Parcel Booking**: `POST /aladdin/api/v1/orders`
91
+ - Required Fields: `store_id`, `recipient_name`, `recipient_phone` (11 digits), `recipient_address` (10-220 chars), `delivery_type` (48), `item_type` (2), `item_weight` (0.5 to 10 kg), `amount_to_collect` (integer).
92
+ - Spatial Hierarchy: `recipient_city`, `recipient_zone`, `recipient_area` are auto-resolved from our intelligent catalog matcher; if unresolvable, they are safely omitted so Pathao's server-side geocoder infers them directly.
93
+ * **Order Tracking**: `GET /aladdin/api/v1/orders/{consignment_id}/info`
94
+ * **Price Plan API**: `POST /aladdin/api/v1/merchant/price-plan`
95
+
96
+ ### 3.2. Steadfast Courier Integration
97
+ * **Base Portal**: `https://portal.packzy.com/api/v1`
98
+ * **Headers**: `Api-Key: <STEADFAST_API_KEY>`, `Secret-Key: <STEADFAST_SECRET_KEY>`
99
+ * **Account Balance**: `GET /get_balance`
100
+ * **Fraud Risk Database**: `GET /fraud_check/{phone}`
101
+ * **Order Dispatch**: `POST /create_order`
102
+ * **Status Tracking**: `GET /status_by_trackingcode/{tracking_code}`
103
+
104
+ ### 3.3. RedX Delivery Integration
105
+ * **Base Portal**: `https://openapi.redx.com.bd/v1.0.0-beta`
106
+ * **Headers**: `API-ACCESS-TOKEN: Bearer {token}`
107
+ * **Delivery Areas (2,849 Hubs)**: `GET /areas`
108
+ * **Parcel Creation**: `POST /parcel`
109
+ * **Parcel Tracking**: `GET /parcel/track/{tracking_id}`
110
+
111
+ ### 3.4. Paperfly Integration
112
+ * **Base Portal**: `https://api.paperfly.com.bd`
113
+ * **Headers**: `paperflykey: <PAPERFLY_KEY>`
114
+ * **Authentication**: HTTP Basic Auth (`<PAPERFLY_USERNAME>:<PAPERFLY_PASSWORD>`)
115
+ * **Parcel Booking**: `POST /merchant/api/service/new_order_v2.php`
116
+ * **Tracking**: `POST /API-Order-Tracking` with `ReferenceNumber`
117
+
118
+ ---
119
+
120
+ ## 4. The 9 Enterprise Model Context Protocol (MCP) Tools
121
+
122
+ Aura Courier MCP exports 9 tools conforming to the MCP Specification (`2024-11-05`):
123
+
124
+ ### 1. `list_couriers`
125
+ * **Purpose**: Inspect carrier operational health and active credentials.
126
+ * **Input Schema**: `{}`
127
+ * **Response**: Array of providers with `is_configured: true/false`.
128
+
129
+ ### 2. `create_parcel`
130
+ * **Purpose**: Dispatch a real parcel through Steadfast, Pathao, RedX, Paperfly, or `auto` smart routing.
131
+ * **Input Schema**:
132
+ ```json
133
+ {
134
+ "courier": "auto | steadfast | pathao | redx | paperfly",
135
+ "invoice": "INV-2026-001",
136
+ "recipient_name": "Rahim Ahmed",
137
+ "recipient_phone": "01711223344",
138
+ "recipient_address": "House 12, Road 4, Sector 3, Uttara, Dhaka",
139
+ "cod_amount": 1500,
140
+ "note": "Handle with care",
141
+ "item_weight": 0.5
142
+ }
143
+ ```
144
+
145
+ ### 3. `track_parcel`
146
+ * **Purpose**: Consolidated shipment tracking across all carriers.
147
+ * **Input Schema**: `{"tracking_code": "SF-12345", "courier": "steadfast"}`
148
+
149
+ ### 4. `get_balance`
150
+ * **Purpose**: Merchant COD vault balance & payout status.
151
+ * **Input Schema**: `{"courier": "steadfast"}`
152
+
153
+ ### 5. `check_fraud_risk`
154
+ * **Purpose**: Nationwide e-commerce fraud and return-risk evaluation.
155
+ * **Features**:
156
+ - Connects to real nationwide logistics history (millions of consignments).
157
+ - Evaluates delivery success rate, cancellation counts, and customer reliability.
158
+ - Zero fabricated strings or simulated random metrics.
159
+ * **Input Schema**: `{"phone": "01711223344"}`
160
+
161
+ ### 6. `validate_and_geocode_address`
162
+ * **Purpose**: Address verification via Google Maps Platform Geocoding API.
163
+ * **Returns**: Formatted address, Thana, District, Division, `lat/lng` coordinates, and deliverability confidence score (0-100).
164
+ * **Input Schema**: `{"address": "Road 11, Banani, Dhaka", "district": "Dhaka"}`
165
+
166
+ ### 7. `calculate_delivery_zone_and_fee`
167
+ * **Purpose**: Live road routing via Google Maps Platform Routes API (`v2:computeRoutes`).
168
+ * **Zones**:
169
+ - `inside_dhaka` (≤22 km): ৳80 | 24–48 hours
170
+ - `sub_dhaka` (22–45 km or Savar/Gazipur/Keraniganj/Narayanganj): ৳100 | 48–72 hours
171
+ - `outside_dhaka` (>45 km / nationwide): ৳150 | 72–96 hours
172
+ * **Input Schema**: `{"recipient_address": "Chittagong GEC Circle", "weight_kg": 1.0}`
173
+
174
+ ### 8. `compare_courier_rates` *(v2.4 New)*
175
+ * **Purpose**: Side-by-side tariff, SLA, and COD fee comparison across all 4 carriers for any destination.
176
+ * **Input Schema**:
177
+ ```json
178
+ {
179
+ "recipient_address": "Agrabad C/A, Chittagong",
180
+ "weight_kg": 1.5,
181
+ "cod_amount": 2500,
182
+ "priority": "cheapest | fastest | balanced"
183
+ }
184
+ ```
185
+ * **Returns**: Best recommended courier, savings rationale, and 4 detailed carrier quotes.
186
+
187
+ ### 9. `resolve_ndr_issue` *(v2.4 New)*
188
+ * **Purpose**: Non-Delivery Report (NDR) triage and automated dispute resolution.
189
+ * **Issues Handled**: `fake_attempt`, `customer_phone_off`, `reschedule_requested`, `wrong_address`, `customer_refused`.
190
+ * **Output**:
191
+ - `customer_whatsapp_message`: Ready-to-send empathetic resolution text in Bengali.
192
+ - `carrier_instruction`: Official escalation dispatch ticket preventing Return-To-Origin (RTO).
193
+ - `resolution_status`: `DISPUTE_FILED`, `RESCHEDULE_QUEUED`, `ADDRESS_UPDATED`, `CUSTOMER_REENGAGED`.
194
+
195
+ ---
196
+
197
+ ## 5. Bidirectional Webhooks Hub
198
+
199
+ ### 5.1. Steadfast Webhook Receiver
200
+ * **Callback URL**: `https://courier.auraajenticai.cloud/webhooks/steadfast`
201
+ * **Auth**: `Authorization: Bearer <STEADFAST_API_KEY>` (configured in Steadfast portal)
202
+ * **Supported Notification Types**:
203
+ 1. `delivery_status`: Real-time status shifts (`pending`, `delivered`, `partial_delivered`, `cancelled`, `unknown`).
204
+ 2. `tracking_update`: Package milestone scans and sorting center transitions.
205
+ * **Steadfast Expected Response**:
206
+ ```json
207
+ HTTP 200 OK
208
+ {
209
+ "status": "success",
210
+ "message": "Webhook received successfully."
211
+ }
212
+ ```
213
+
214
+ ### 5.2. Pathao Webhook Receiver
215
+ * **Callback URL**: `https://courier.auraajenticai.cloud/webhooks/pathao`
216
+ * **Supported Events**: Order placement, rider pickup, out-for-delivery, and RTO events.
217
+
218
+ ---
219
+
220
+ ## 6. Real-Time Verification & Test Suite
221
+
222
+ ### 6.1. Inspect MCP Health & Tools
223
+ ```bash
224
+ curl -s https://courier.auraajenticai.cloud/health | jq
225
+ ```
226
+ *Expected Output*:
227
+ ```json
228
+ {
229
+ "ok": true,
230
+ "version": "2.7.1"
231
+ }
232
+ ```
233
+
234
+ ### 6.2. Test Steadfast Webhook Simulation
235
+ ```bash
236
+ curl -X POST https://courier.auraajenticai.cloud/webhooks/steadfast \
237
+ -H "Content-Type: application/json" \
238
+ -H "Authorization: Bearer <STEADFAST_API_KEY>" \
239
+ -d '{
240
+ "notification_type": "delivery_status",
241
+ "consignment_id": 981245,
242
+ "invoice": "INV-67890",
243
+ "cod_amount": 1500.0,
244
+ "status": "delivered",
245
+ "delivery_charge": 100.0,
246
+ "tracking_message": "Package delivered to customer.",
247
+ "updated_at": "2026-09-11 03:30:00"
248
+ }'
249
+ ```
250
+ *Expected Response*: `{"status":"success","message":"Webhook received successfully."}`
251
+
252
+ ### 6.3. Test MCP Initialize via Streamable-HTTP
253
+ ```bash
254
+ curl -i -X POST https://courier.auraajenticai.cloud/mcp \
255
+ -H "Content-Type: application/json" \
256
+ -H "Accept: application/json, text/event-stream" \
257
+ -d '{
258
+ "jsonrpc": "2.0",
259
+ "id": 1,
260
+ "method": "initialize",
261
+ "params": {
262
+ "protocolVersion": "2024-11-05",
263
+ "capabilities": {},
264
+ "clientInfo": { "name": "terminal-test", "version": "1.0" }
265
+ }
266
+ }'
267
+ ```
268
+
269
+ ---
270
+
271
+ ## 7. Connecting to AI Agents & IDEs
272
+
273
+ ### Claude Desktop / Cursor / Antigravity MCP Config
274
+ Add this configuration block to your client settings (`claude_desktop_config.json` or `settings.json`):
18
275
 
19
276
  ```json
20
277
  {
21
278
  "mcpServers": {
22
279
  "aura-courier": {
23
280
  "command": "npx",
24
- "args": ["-y", "aura-courier-mcp@latest"],
281
+ "args": ["-y", "aura-courier-mcp@2.7.1"],
25
282
  "env": {
26
- "STEADFAST_API_KEY": "your-steadfast-api-key",
27
- "STEADFAST_SECRET_KEY": "your-steadfast-secret-key",
28
- "PATHAO_CLIENT_ID": "optional",
29
- "PATHAO_CLIENT_SECRET": "optional",
30
- "PATHAO_USERNAME": "optional",
31
- "PATHAO_PASSWORD": "optional",
32
- "PATHAO_STORE_ID": "optional"
283
+ "PORT": "8080",
284
+ "GOOGLE_MAPS_API_KEY": "<GOOGLE_MAPS_API_KEY>",
285
+ "STEADFAST_API_KEY": "<STEADFAST_API_KEY>",
286
+ "STEADFAST_SECRET_KEY": "<STEADFAST_SECRET_KEY>",
287
+ "STEADFAST_BASE_URL": "https://portal.packzy.com/api/v1",
288
+ "PATHAO_CLIENT_ID": "<PATHAO_CLIENT_ID>",
289
+ "PATHAO_CLIENT_SECRET": "<PATHAO_CLIENT_SECRET>",
290
+ "PATHAO_USERNAME": "<PATHAO_USERNAME>",
291
+ "PATHAO_PASSWORD": "<PATHAO_PASSWORD>",
292
+ "PATHAO_STORE_ID": "<PATHAO_STORE_ID>",
293
+ "PATHAO_BASE_URL": "https://api-hermes.pathao.com",
294
+ "REDX_API_TOKEN": "<REDX_API_TOKEN>",
295
+ "REDX_PICKUP_STORE_ID": "<REDX_STORE_ID>",
296
+ "REDX_BASE_URL": "https://openapi.redx.com.bd/v1.0.0-beta",
297
+ "PAPERFLY_API_KEY": "<PAPERFLY_KEY>",
298
+ "PAPERFLY_USERNAME": "<PAPERFLY_USERNAME>",
299
+ "PAPERFLY_PASSWORD": "<PAPERFLY_PASSWORD>",
300
+ "PAPERFLY_STORE_NAME": "<MERCHANT>",
301
+ "PAPERFLY_BASE_URL": "https://api.paperfly.com.bd"
33
302
  }
34
303
  }
35
304
  }
36
305
  }
37
306
  ```
38
307
 
39
- Steadfast keys come from your Steadfast merchant panel → **Settings → API**. Pathao is optional — add it only if you use Pathao. Your keys stay on your own machine (passed as environment variables); they are never sent to Aura.
308
+ Or connect directly via **Streamable-HTTP** URL:
309
+ * **Server URL**: `https://courier.auraajenticai.cloud/mcp`
310
+ * **Client Protocol**: MCP Streamable-HTTP (`2024-11-05`)
311
+
312
+ ### Google Antigravity Plugin (One-Click Marketplace Activation)
313
+ For Google Antigravity agents, activate directly via the [Antigravity Marketplace Card](https://cloud.google.com/find-a-partner/partner/aura-ajentic-ai):
314
+ ```markdown
315
+ <plugin-card catalog-id="antigravity-plugins-partners/plugin/aura-courier"></plugin-card>
316
+ ```
317
+ Or declare in your Antigravity `plugins.json`:
318
+ ```json
319
+ {
320
+ "plugins": {
321
+ "aura-courier": {
322
+ "source": "https://github.com/auraajenticai/aura-courier-mcp"
323
+ }
324
+ }
325
+ }
326
+ ```
327
+ Bundles the complete `courier-ops` skill (9 tools), `rules/COURIER_RULES.md` (smart auto-routing cascade & zero-mock policies), and `mcp_config.json`.
328
+
329
+ ---
330
+
331
+ ## 8. Google Maps Platform Attribution & Legal Appendix
332
+
333
+ > **Service Attribution ID**: `gmp_git_agentskills_v1`
334
+ > **APIs Utilized**:
335
+ > 1. **Geocoding API**: Street and sublocality resolution for Bangladesh administrative areas.
336
+ > 2. **Routes API (`v2:computeRoutes`)**: Precise road distance metrics and zone classification.
337
+ > 3. **Maps Embed API**: Interactive visual maps with $0 operational cost.
338
+
339
+ ---
340
+
341
+ ## 9. Version History & Glama TDQS 5.0 Audit Log
342
+
343
+ * **v2.7.1 (Nov 24, 2026)**:
344
+ - **Global AI Agent Partner Directory Certification Ready**: Added MCP 2025-03-26 tool annotations (`readOnlyHint`, `destructiveHint`, `idempotentHint`, `openWorldHint`) on all 13 tools, `claude.com` + global AI/automation OAuth partner redirects, official Antigravity `$schema` + `serverUrl` + 13-tool `SKILL.md`, Official MCP Registry `remotes` in `server.json`, live `/terms` Terms of Service, and npm `2.7.1` sync.
345
+ * **v2.7.0 (Nov 24, 2026)**:
346
+ - **Standard MCP OAuth 2.1 + PKCE (`S256`) + RFC 9728 / 8414 / 7591 DCR**: Native remote OAuth connectivity for **Google Gemini**, **Antigravity Marketplace**, **ChatGPT**, and **Claude Web** with 1-click Aura Cloud SSO, Google Sign-In, Developer API Key Dual-Auth, and non-rotating refresh tokens.
347
+ - **13 Live Logistics & Spatial Tools + Full Glama / Antigravity Plugin Parity**: Synchronized all manifests (`package.json`, `plugin.json`, `server.json`, `validate_plugin.js`) and expanded automated tests (`30+` passing).
348
+ * **v2.6.1 (Nov 13, 2026)**:
349
+ - **Single-Source-of-Truth Release Parity (`src/version.ts`)**: Unified version synchronization across `package.json`, `server.json`, `plugin.json`, `/health`, MCP Server metadata, GitHub Releases, Gitea, Glama Registry, and live web UI (`v2.6.1`).
350
+ - **TypeScript Strict `pnpm` Compatibility & Silicon Valley UI**: Explicit Express typing resolving Glama Dockerfile `TS2742`, inline SVG carrier/tool iconography, RedX monogram badge, and interactive `#hubmap` canvas animation.
351
+ * **v2.6.0 (Nov 10, 2026)**:
352
+ - **Bilingual User Guide & Business Benefits Hub (`GET /guide`)**: Interactive Bengali & English documentation (`https://courier.auraajenticai.cloud/guide`) covering 3-in-1 WooCommerce/Shopify integration, 6-Pillar WhatsApp/Messenger AI Bot harmony, Multi-Tenant Isolation, and MCP AI Agent setup.
353
+ - **Bilingual Real-Time Fraud Risk Output (`🇧🇩 বাংলা | 🇬🇧 English`)**: Upgraded `FraudRiskEngine.evaluateRisk` and In-Dashboard Quick-Ship widget (`/api/courier/quick-ship`) with bilingual recommendations and 1-click language switching.
354
+ - **Repository Governance & Glama Discovery Optimization**: Added `SECURITY.md`, `CONTRIBUTING.md`, `CHANGELOG.md`, and official Glama MCP card badge.
355
+ * **v2.5.1 (Nov 10, 2026)**:
356
+ - **Zero-Knowledge AES-256 Cryptographic Vault & Zero Admin Visibility**: Explicitly documented international cryptographic vault isolation in `/privacy`, guaranteeing that client Courier MCP API keys cannot be viewed or read by administrators.
357
+ - **Direct Dashboard Login & 3-in-1 E-Commerce Store Bridge**: Streamlined landing navigation (`Login ↗`) and synchronized MCP server metadata across all endpoints (`v2.5.1`).
358
+ * **v2.5.0 (Nov 9, 2026)**:
359
+ - **Zero Hardcoded Credentials**: Purged all merchant secrets from repository code, enforcing strict runtime environment variable isolation.
360
+ - **Glama TDQS 5.0 Compliance**: Upgraded all 9 MCP tool definitions with explicit side-effects disclosure (state-mutating vs read-only), `when-to-use` vs `when-not-to-use` scenarios, and comprehensive parameter constraints.
361
+ - **Service Telemetry Update**: Updated `/health` endpoint to reflect v2.5.0 and automated release tag synchronization.
362
+ * **v2.4.2 (Nov 5, 2026)**: Official Google Antigravity Plugin bundle and partner advantage packaging.
363
+ * **v2.4.0 (Oct 22, 2026)**: Multi-carrier cascading auto-routing, rate comparison, and NDR dispute suite.
364
+
365
+ ---
366
+
367
+ ## 10. License & Legal Protection
40
368
 
41
- ## Then just ask
369
+ Copyright © 2026 Aura Agentic AI <khondokartowsif171@gmail.com>.
42
370
 
43
- > "Book a Steadfast parcel for invoice A-1001, COD 1500 to 017XXXXXXXX."
44
- > "Track consignment 123456."
371
+ Licensed under the **Apache License, Version 2.0** (the "License");
372
+ you may not use this file except in compliance with the License.
373
+ You may obtain a copy of the License at:
45
374
 
46
- ## License
375
+ http://www.apache.org/licenses/LICENSE-2.0
47
376
 
48
- MIT © Aura Ajentic AI
377
+ Unless required by applicable law or agreed to in writing, software
378
+ distributed under the License is distributed on an "AS IS" BASIS,
379
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
380
+ See the License for the specific language governing permissions and
381
+ limitations under the License.
@@ -0,0 +1,4 @@
1
+ {
2
+ "summary": "Production README.md for Aura Courier MCP on GitHub",
3
+ "updatedAt": "2026-09-01T21:33:17.243703500Z"
4
+ }
@@ -6,4 +6,5 @@ export interface CourierAdapter {
6
6
  trackParcel(trackingCode: string): Promise<TrackingResponse>;
7
7
  getBalance(): Promise<BalanceResponse>;
8
8
  getLocations?(cityName?: string, zoneName?: string): Promise<LocationResolutionResponse>;
9
+ cancelParcel?(consignmentId: string, reason?: string): Promise<any>;
9
10
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/adapters/base.ts"],"names":[],"mappings":"AAuCA,2FAA2F;AAC3F,MAAM,OAAO,YAAa,SAAQ,KAAK;IAEnB;IAEA;IAHlB,YACkB,IAAY,EAC5B,OAAe,EACC,OAAiB;QAEjC,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,SAAI,GAAJ,IAAI,CAAQ;QAEZ,YAAO,GAAP,OAAO,CAAU;QAGjC,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF"}
@@ -1,4 +1,11 @@
1
1
  import { FraudRiskScoreResponse } from "../types.js";
2
+ import { SteadfastAdapter } from "./steadfast.js";
3
+ import { PathaoAdapter } from "./pathao.js";
2
4
  export declare class FraudRiskEngine {
3
- static evaluateRisk(phoneNumber: string): FraudRiskScoreResponse;
5
+ /**
6
+ * Real-Time Multi-Carrier Fraud & Delivery Risk Evaluation (T6)
7
+ * Queries Pathao Nationwide Customer Delivery Database (/aladdin/api/v1/user/success),
8
+ * Steadfast Nationwide Logistics Database (/fraud_check/{phone}), and BD Operator Prefix Validator.
9
+ */
10
+ static evaluateRisk(phoneNumber: string, steadfastAdapter?: SteadfastAdapter, pathaoAdapter?: PathaoAdapter): Promise<FraudRiskScoreResponse>;
4
11
  }