@carrierllc/mcp 0.0.1 → 0.1.0
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.
- package/README.md +216 -3
- package/dist/client.d.ts +38 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +82 -0
- package/dist/client.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +44 -0
- package/dist/index.js.map +1 -0
- package/dist/intelligence.d.ts +10 -0
- package/dist/intelligence.d.ts.map +1 -0
- package/dist/intelligence.js +732 -0
- package/dist/intelligence.js.map +1 -0
- package/dist/prompts.d.ts +6 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +150 -0
- package/dist/prompts.js.map +1 -0
- package/dist/tools.d.ts +29 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +702 -0
- package/dist/tools.js.map +1 -0
- package/package.json +48 -6
- package/index.js +0 -1
package/README.md
CHANGED
|
@@ -1,5 +1,218 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @carrierllc/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Natural language control of your MVNO/eSIM fleet. 43 OCS tools + 8 intelligence composites + 5 prompts. Direct stdio mode — no OAuth required.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@carrierllc/mcp)
|
|
6
|
+
[](https://github.com/Lifecycle-Innovations-Limited/carrier.llc/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Quick start
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
ESIMVAULT_API_TOKEN=your_key npx -y @carrierllc/mcp
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Get a key at [mcp.carrier.llc](https://mcp.carrier.llc).
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Install in Claude Desktop
|
|
21
|
+
|
|
22
|
+
Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"mcpServers": {
|
|
27
|
+
"carrier": {
|
|
28
|
+
"command": "npx",
|
|
29
|
+
"args": ["-y", "@carrierllc/mcp"],
|
|
30
|
+
"env": {
|
|
31
|
+
"ESIMVAULT_API_TOKEN": "YOUR_KEY"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Install in Cursor
|
|
39
|
+
|
|
40
|
+
Add to `~/.cursor/mcp.json`:
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"mcpServers": {
|
|
45
|
+
"carrier": {
|
|
46
|
+
"command": "npx",
|
|
47
|
+
"args": ["-y", "@carrierllc/mcp"],
|
|
48
|
+
"env": {
|
|
49
|
+
"ESIMVAULT_API_TOKEN": "YOUR_KEY"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Install in Windsurf
|
|
57
|
+
|
|
58
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"carrier": {
|
|
64
|
+
"command": "npx",
|
|
65
|
+
"args": ["-y", "@carrierllc/mcp"],
|
|
66
|
+
"env": {
|
|
67
|
+
"ESIMVAULT_API_TOKEN": "YOUR_KEY"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Remote HTTP (OAuth 2.1)
|
|
75
|
+
|
|
76
|
+
For multi-user deployments with OAuth 2.1 + PKCE, use the remote endpoint:
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"mcpServers": {
|
|
81
|
+
"carrier": {
|
|
82
|
+
"type": "http",
|
|
83
|
+
"url": "https://mcp.carrier.llc/mcp"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Environment variables
|
|
92
|
+
|
|
93
|
+
| Variable | Required | Default | Description |
|
|
94
|
+
|----------|----------|---------|-------------|
|
|
95
|
+
| `ESIMVAULT_API_TOKEN` | Yes | — | Your eSIMVault OCS API token |
|
|
96
|
+
| `CARRIER_OCS_API_TOKEN` | Alternative | — | Alias for `ESIMVAULT_API_TOKEN` |
|
|
97
|
+
| `CARRIER_OCS_BASE_URL` | No | `https://ocs.esimvault.cloud` | OCS base URL (no trailing slash) |
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Tools (51 total)
|
|
102
|
+
|
|
103
|
+
### Reseller (6)
|
|
104
|
+
|
|
105
|
+
| Tool | Scope | Description |
|
|
106
|
+
|------|-------|-------------|
|
|
107
|
+
| `list_reseller_accounts` | read | List all accounts across all resellers |
|
|
108
|
+
| `get_reseller_info` | read | Retrieve reseller details |
|
|
109
|
+
| `esim_status_per_account` | read | eSIM status breakdown per account |
|
|
110
|
+
| `list_sponsors` | read | List all sponsor networks |
|
|
111
|
+
| `list_steering_lists` | read | List all network steering lists |
|
|
112
|
+
| `modify_account_balance` | write | Adjust or set reseller account balance |
|
|
113
|
+
|
|
114
|
+
### Subscriber (13)
|
|
115
|
+
|
|
116
|
+
| Tool | Scope | Description |
|
|
117
|
+
|------|-------|-------------|
|
|
118
|
+
| `get_subscriber` | read | Get full subscriber details by ICCID or MSISDN |
|
|
119
|
+
| `list_subscribers` | read | List subscribers with optional filters |
|
|
120
|
+
| `get_sim_provider_status` | read | Check SIM provider-level status |
|
|
121
|
+
| `get_subscriber_location` | read | Get last known subscriber location |
|
|
122
|
+
| `hlr_get_bitrate` | read | Get HLR bitrate for a subscriber |
|
|
123
|
+
| `modify_subscriber_balance` | write | Adjust or set subscriber balance |
|
|
124
|
+
| `modify_subscriber_status` | write | Change subscriber OCS status |
|
|
125
|
+
| `change_sim_status` | write | Change SIM status at provider level |
|
|
126
|
+
| `modify_subscriber_contact_info` | write | Update subscriber contact info |
|
|
127
|
+
| `set_subscriber_traffic_restrictions` | write | Configure traffic restrictions |
|
|
128
|
+
| `modify_subscriber_steering_list` | write | Change network steering list for a subscriber |
|
|
129
|
+
| `hlr_set_bitrate` | write | Set HLR bitrate for a subscriber |
|
|
130
|
+
| `move_subscriber_range_to_account` | write | Move subscriber range to another account |
|
|
131
|
+
|
|
132
|
+
### Packages (9)
|
|
133
|
+
|
|
134
|
+
| Tool | Scope | Description |
|
|
135
|
+
|------|-------|-------------|
|
|
136
|
+
| `list_subscriber_packages` | read | List all prepaid packages for a subscriber |
|
|
137
|
+
| `list_package_templates` | read | List all prepaid package templates |
|
|
138
|
+
| `assign_package` | write | Assign package template to subscriber |
|
|
139
|
+
| `assign_recurring_package` | write | Assign recurring package to subscriber |
|
|
140
|
+
| `modify_package_limits` | write | Change data/voice/SMS limits on active package |
|
|
141
|
+
| `modify_package_expiry` | write | Change expiration date of active package |
|
|
142
|
+
| `modify_package_status` | write | Activate or deactivate a subscriber package |
|
|
143
|
+
| `stop_resume_recurring_package` | write | Stop or resume recurring package auto-renewal |
|
|
144
|
+
| `delete_subscriber_package` | write | Remove a package from a subscriber |
|
|
145
|
+
|
|
146
|
+
### Templates & Zones (7)
|
|
147
|
+
|
|
148
|
+
| Tool | Scope | Description |
|
|
149
|
+
|------|-------|-------------|
|
|
150
|
+
| `clean_all_packages` | write | Remove ALL packages from a subscriber |
|
|
151
|
+
| `create_package_template` | write | Create a new prepaid package template |
|
|
152
|
+
| `modify_template_core` | write | Modify core settings of a package template |
|
|
153
|
+
| `modify_template_recurring` | write | Modify recurring settings of a package template |
|
|
154
|
+
| `modify_template_throttling` | write | Modify throttling settings of a package template |
|
|
155
|
+
| `list_location_zones` | read | List countries/networks in a location zone |
|
|
156
|
+
| `list_detailed_location_zones` | read | Get detailed location zone definitions |
|
|
157
|
+
|
|
158
|
+
### Statistics & Misc (8)
|
|
159
|
+
|
|
160
|
+
| Tool | Scope | Description |
|
|
161
|
+
|------|-------|-------------|
|
|
162
|
+
| `subscriber_usage` | read | Get daily usage for a subscriber (max 7 days) |
|
|
163
|
+
| `subscriber_network_events` | read | Get network events for a subscriber (max 7 days) |
|
|
164
|
+
| `subscriber_active_period` | read | Get subscriber active period |
|
|
165
|
+
| `get_tariff` | read | Retrieve customer tariff/pricing table |
|
|
166
|
+
| `list_destination_prefixes` | read | List phone number prefixes in destination lists |
|
|
167
|
+
| `list_network_profiles` | read | List all available network profiles |
|
|
168
|
+
| `create_location_zone` | write | Create a new location zone |
|
|
169
|
+
| `send_sms` | write | Send MT SMS to a subscriber |
|
|
170
|
+
|
|
171
|
+
### Intelligence (8)
|
|
172
|
+
|
|
173
|
+
AI composites that chain multiple OCS calls to produce structured insights:
|
|
174
|
+
|
|
175
|
+
| Tool | Description |
|
|
176
|
+
|------|-------------|
|
|
177
|
+
| `diagnose_subscriber` | Chains 5+ OCS calls to diagnose connectivity issues |
|
|
178
|
+
| `fleet_health` | Single-call fleet overview: accounts, eSIM counts, low-balance alerts |
|
|
179
|
+
| `detect_usage_anomalies` | Detect abnormal usage patterns and burn-rate risks |
|
|
180
|
+
| `optimize_package` | Match subscriber usage to the best available package |
|
|
181
|
+
| `churn_risk` | Score churn risk (0-100) with retention recommendations |
|
|
182
|
+
| `audit_network_coverage` | Audit network coverage and steering effectiveness |
|
|
183
|
+
| `marketing_intelligence` | Market segmentation and upsell opportunities |
|
|
184
|
+
| `high_cost_subscribers` | Identify highest-cost subscribers for margin optimization |
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Prompts (5)
|
|
189
|
+
|
|
190
|
+
| Prompt | Args | Description |
|
|
191
|
+
|--------|------|-------------|
|
|
192
|
+
| `fleet_health_report` | — | Full fleet health overview |
|
|
193
|
+
| `subscriber_deep_dive` | `iccid` | Deep diagnostic for a single subscriber |
|
|
194
|
+
| `revenue_optimization` | — | Revenue analysis and upsell opportunities |
|
|
195
|
+
| `coverage_analysis` | — | Network coverage audit and steering recommendations |
|
|
196
|
+
| `bulk_operations_planner` | `operation` | Plan and dry-run a bulk fleet operation |
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Destructive tools and dry_run
|
|
201
|
+
|
|
202
|
+
All write/admin tools accept an optional `dry_run: true` argument. When set, the tool returns the would-be request without calling OCS — safe for previewing operations.
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
"Suspend ICCID 8988... but check what it would do first (dry_run)"
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Links
|
|
211
|
+
|
|
212
|
+
- Product page: [mcp.carrier.llc](https://mcp.carrier.llc)
|
|
213
|
+
- Source: [github.com/Lifecycle-Innovations-Limited/carrier.llc](https://github.com/Lifecycle-Innovations-Limited/carrier.llc)
|
|
214
|
+
- OCS docs: [docs.esimvault.cloud/ocs-api](https://docs.esimvault.cloud/ocs-api)
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
MIT License. Copyright 2025 Lifecycle Innovations Limited.
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* eSIMVault OCS API client — stdio edition.
|
|
3
|
+
*
|
|
4
|
+
* Token held at class level (single-user stdio mode; set once from env).
|
|
5
|
+
* All requests: POST ${baseUrl}/v1?token=<api_key> body: { methodName: params }
|
|
6
|
+
* Responses: { status: { code, msg }, methodName: { ...data } }
|
|
7
|
+
*
|
|
8
|
+
* PR #10 broadening:
|
|
9
|
+
* params accepts Record<string, unknown> | number | string to support
|
|
10
|
+
* bare-scalar OCS methods (listSponsor, listSteeringList, getCustomerTariff,
|
|
11
|
+
* listDetailedLocationZone, getSimProviderStatus).
|
|
12
|
+
* Fix #14:
|
|
13
|
+
* getCustomerTariff response key remapped "listTariffRule" → method key.
|
|
14
|
+
*/
|
|
15
|
+
export interface OcsStatus {
|
|
16
|
+
code: number;
|
|
17
|
+
msg: string;
|
|
18
|
+
}
|
|
19
|
+
export interface OcsResponse<T = Record<string, unknown>> {
|
|
20
|
+
status: OcsStatus;
|
|
21
|
+
[method: string]: T | OcsStatus;
|
|
22
|
+
}
|
|
23
|
+
export declare class OcsApiError extends Error {
|
|
24
|
+
readonly code: number;
|
|
25
|
+
readonly method: string;
|
|
26
|
+
constructor(code: number, message: string, method: string);
|
|
27
|
+
}
|
|
28
|
+
export declare class OcsClient {
|
|
29
|
+
private readonly baseUrl;
|
|
30
|
+
private readonly token;
|
|
31
|
+
/**
|
|
32
|
+
* @param baseUrl OCS root, e.g. https://ocs.esimvault.cloud (no trailing slash, no /v1)
|
|
33
|
+
* @param token API token (from ESIMVAULT_API_TOKEN env)
|
|
34
|
+
*/
|
|
35
|
+
constructor(baseUrl: string, token: string);
|
|
36
|
+
call<T = Record<string, unknown>>(method: string, params?: Record<string, unknown> | number | string): Promise<T>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACtD,MAAM,EAAE,SAAS,CAAC;IAClB,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;CACjC;AAED,qBAAa,WAAY,SAAQ,KAAK;aAElB,IAAI,EAAE,MAAM;aAEZ,MAAM,EAAE,MAAM;gBAFd,IAAI,EAAE,MAAM,EAC5B,OAAO,EAAE,MAAM,EACC,MAAM,EAAE,MAAM;CAKjC;AAKD,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAE/B;;;OAGG;gBACS,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAKpC,IAAI,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpC,MAAM,EAAE,MAAM,EACd,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,MAAW,GACrD,OAAO,CAAC,CAAC,CAAC;CAgEd"}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* eSIMVault OCS API client — stdio edition.
|
|
3
|
+
*
|
|
4
|
+
* Token held at class level (single-user stdio mode; set once from env).
|
|
5
|
+
* All requests: POST ${baseUrl}/v1?token=<api_key> body: { methodName: params }
|
|
6
|
+
* Responses: { status: { code, msg }, methodName: { ...data } }
|
|
7
|
+
*
|
|
8
|
+
* PR #10 broadening:
|
|
9
|
+
* params accepts Record<string, unknown> | number | string to support
|
|
10
|
+
* bare-scalar OCS methods (listSponsor, listSteeringList, getCustomerTariff,
|
|
11
|
+
* listDetailedLocationZone, getSimProviderStatus).
|
|
12
|
+
* Fix #14:
|
|
13
|
+
* getCustomerTariff response key remapped "listTariffRule" → method key.
|
|
14
|
+
*/
|
|
15
|
+
export class OcsApiError extends Error {
|
|
16
|
+
code;
|
|
17
|
+
method;
|
|
18
|
+
constructor(code, message, method) {
|
|
19
|
+
super(`[${method}] OCS error ${code}: ${message}`);
|
|
20
|
+
this.code = code;
|
|
21
|
+
this.method = method;
|
|
22
|
+
this.name = "OcsApiError";
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const RETRY_DELAYS_MS = [250, 500, 1000];
|
|
26
|
+
const REQUEST_TIMEOUT_MS = 20_000;
|
|
27
|
+
export class OcsClient {
|
|
28
|
+
baseUrl;
|
|
29
|
+
token;
|
|
30
|
+
/**
|
|
31
|
+
* @param baseUrl OCS root, e.g. https://ocs.esimvault.cloud (no trailing slash, no /v1)
|
|
32
|
+
* @param token API token (from ESIMVAULT_API_TOKEN env)
|
|
33
|
+
*/
|
|
34
|
+
constructor(baseUrl, token) {
|
|
35
|
+
this.baseUrl = baseUrl.replace(/\/+$/, "");
|
|
36
|
+
this.token = token;
|
|
37
|
+
}
|
|
38
|
+
async call(method, params = {}) {
|
|
39
|
+
const url = `${this.baseUrl}/v1?token=${this.token}`;
|
|
40
|
+
const body = JSON.stringify({ [method]: params });
|
|
41
|
+
let lastError = new OcsApiError(-1, "unreachable", method);
|
|
42
|
+
for (let attempt = 0; attempt <= RETRY_DELAYS_MS.length; attempt++) {
|
|
43
|
+
if (attempt > 0) {
|
|
44
|
+
const delay = RETRY_DELAYS_MS[attempt - 1];
|
|
45
|
+
if (delay !== undefined) {
|
|
46
|
+
await new Promise((r) => setTimeout(r, delay));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
let res;
|
|
50
|
+
try {
|
|
51
|
+
res = await fetch(url, {
|
|
52
|
+
method: "POST",
|
|
53
|
+
headers: { "Content-Type": "application/json" },
|
|
54
|
+
body,
|
|
55
|
+
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
lastError = err;
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
if (res.status >= 500) {
|
|
63
|
+
lastError = new OcsApiError(res.status, `HTTP ${res.status} ${res.statusText}`, method);
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (!res.ok) {
|
|
67
|
+
throw new OcsApiError(res.status, `HTTP ${res.status} ${res.statusText}`, method);
|
|
68
|
+
}
|
|
69
|
+
const json = (await res.json());
|
|
70
|
+
if (json.status?.code !== 0) {
|
|
71
|
+
throw new OcsApiError(json.status?.code ?? -1, json.status?.msg ?? "Unknown error", method);
|
|
72
|
+
}
|
|
73
|
+
// Fix #14: getCustomerTariff response is keyed as "listTariffRule"
|
|
74
|
+
if (method === "getCustomerTariff" && json["listTariffRule"] !== undefined) {
|
|
75
|
+
return json["listTariffRule"];
|
|
76
|
+
}
|
|
77
|
+
return json[method] ?? json;
|
|
78
|
+
}
|
|
79
|
+
throw lastError;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @carrierllc/mcp — stdio entry point.
|
|
4
|
+
*
|
|
5
|
+
* Single-user stdio MCP server. Reads ESIMVAULT_API_TOKEN (or CARRIER_OCS_API_TOKEN)
|
|
6
|
+
* and CARRIER_OCS_BASE_URL from env. No OAuth — direct OCS access.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* ESIMVAULT_API_TOKEN=<token> npx -y @carrierllc/mcp
|
|
10
|
+
*
|
|
11
|
+
* MCP config (Claude Desktop / Cursor / Windsurf):
|
|
12
|
+
* {
|
|
13
|
+
* "command": "npx",
|
|
14
|
+
* "args": ["-y", "@carrierllc/mcp"],
|
|
15
|
+
* "env": { "ESIMVAULT_API_TOKEN": "YOUR_KEY" }
|
|
16
|
+
* }
|
|
17
|
+
*/
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;GAeG"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* @carrierllc/mcp — stdio entry point.
|
|
4
|
+
*
|
|
5
|
+
* Single-user stdio MCP server. Reads ESIMVAULT_API_TOKEN (or CARRIER_OCS_API_TOKEN)
|
|
6
|
+
* and CARRIER_OCS_BASE_URL from env. No OAuth — direct OCS access.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* ESIMVAULT_API_TOKEN=<token> npx -y @carrierllc/mcp
|
|
10
|
+
*
|
|
11
|
+
* MCP config (Claude Desktop / Cursor / Windsurf):
|
|
12
|
+
* {
|
|
13
|
+
* "command": "npx",
|
|
14
|
+
* "args": ["-y", "@carrierllc/mcp"],
|
|
15
|
+
* "env": { "ESIMVAULT_API_TOKEN": "YOUR_KEY" }
|
|
16
|
+
* }
|
|
17
|
+
*/
|
|
18
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
19
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
20
|
+
import { OcsClient } from "./client.js";
|
|
21
|
+
import { registerAllTools } from "./tools.js";
|
|
22
|
+
import { registerAllIntelligenceTools } from "./intelligence.js";
|
|
23
|
+
import { registerAllPrompts } from "./prompts.js";
|
|
24
|
+
const baseUrl = process.env.CARRIER_OCS_BASE_URL ??
|
|
25
|
+
process.env.ESIMVAULT_BASE_URL ??
|
|
26
|
+
"https://ocs.esimvault.cloud";
|
|
27
|
+
const token = process.env.ESIMVAULT_API_TOKEN ??
|
|
28
|
+
process.env.CARRIER_OCS_API_TOKEN;
|
|
29
|
+
if (!token) {
|
|
30
|
+
process.stderr.write("ERROR: ESIMVAULT_API_TOKEN (or CARRIER_OCS_API_TOKEN) must be set.\n" +
|
|
31
|
+
"Get a key at https://mcp.carrier.llc\n");
|
|
32
|
+
process.exit(1);
|
|
33
|
+
}
|
|
34
|
+
const client = new OcsClient(baseUrl, token);
|
|
35
|
+
const server = new McpServer({ name: "carrier-mcp", version: "0.1.0" }, {
|
|
36
|
+
instructions: "Carrier MCP — direct eSIMVault OCS access via stdio. 51 tools for MVNO/eSIM fleet management. " +
|
|
37
|
+
"43 OCS tools (read/write/admin) + 8 intelligence composites + 5 prompts.",
|
|
38
|
+
});
|
|
39
|
+
registerAllTools(server, client);
|
|
40
|
+
registerAllIntelligenceTools(server, client);
|
|
41
|
+
registerAllPrompts(server);
|
|
42
|
+
const transport = new StdioServerTransport();
|
|
43
|
+
await server.connect(transport);
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,OAAO,GACX,OAAO,CAAC,GAAG,CAAC,oBAAoB;IAChC,OAAO,CAAC,GAAG,CAAC,kBAAkB;IAC9B,6BAA6B,CAAC;AAEhC,MAAM,KAAK,GACT,OAAO,CAAC,GAAG,CAAC,mBAAmB;IAC/B,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC;AAEpC,IAAI,CAAC,KAAK,EAAE,CAAC;IACX,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,sEAAsE;QACtE,wCAAwC,CACzC,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;AAE7C,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,EAAE,EACzC;IACE,YAAY,EACV,gGAAgG;QAChG,0EAA0E;CAC7E,CACF,CAAC;AAEF,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACjC,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,kBAAkB,CAAC,MAAM,CAAC,CAAC;AAE3B,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Carrier MCP stdio — Intelligence tools (8 composites).
|
|
3
|
+
*
|
|
4
|
+
* These tools chain multiple OCS read methods to produce structured insights.
|
|
5
|
+
* Stdio variant: no scope enforcement, no audit hook, no Sentry.
|
|
6
|
+
*/
|
|
7
|
+
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
8
|
+
import { OcsClient } from "./client.js";
|
|
9
|
+
export declare function registerAllIntelligenceTools(server: McpServer, client: OcsClient): void;
|
|
10
|
+
//# sourceMappingURL=intelligence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intelligence.d.ts","sourceRoot":"","sources":["../src/intelligence.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAmDxC,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,GAAG,IAAI,CA60BvF"}
|