@adrien1212balitrand/auros-mcp 1.2.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.
package/README.md ADDED
@@ -0,0 +1,146 @@
1
+ # @adrien1212balitrand/auros-mcp
2
+
3
+ <p align="center">
4
+ <a href="https://getauros.com/developers/docs/mcp-server">
5
+ <img src="https://getauros.com/auros-logo.svg" alt="AUROS" width="120" />
6
+ </a>
7
+ </p>
8
+
9
+ [MCP](https://modelcontextprotocol.io) server for the [AUROS Protocol](https://getauros.com/developers) — expose RWA intelligence tools to **Cursor**, **Claude Desktop**, and any MCP-compatible agent.
10
+
11
+ Thin wrapper over `https://getauros.com/api/v1/*` — no local scoring logic.
12
+
13
+ ## Tools
14
+
15
+ | Tool | API | Auth |
16
+ |------|-----|------|
17
+ | `score` | `POST /api/v1/score` | Bearer |
18
+ | `score_batch` | `POST /api/v1/score/batch` | Bearer |
19
+ | `products` | `GET /api/v1/products` | Bearer |
20
+ | `jurisdictions` | `GET /api/v1/jurisdictions` | Bearer |
21
+ | `checklist` | `POST /api/v1/checklist` | Bearer |
22
+ | `compare` | `POST /api/v1/compare` | Bearer |
23
+ | `green_watt_score` | `GET /api/green/watt/{id}` | None |
24
+ | `green_carbon_quality` | `GET /api/green/carbon-quality/{id}` | None |
25
+ | `green_watt_batch` | `POST /api/v1/green/watt/batch` | Bearer |
26
+ | `green_carbon_quality_batch` | `POST /api/v1/green/carbon-quality/batch` | Bearer |
27
+ | `regulatory_feed` | `GET /api/v1/regulatory/feed` | Bearer (premium) |
28
+ | `status` | `GET /api/v1/status` | None |
29
+ | `green_score` | `GET /api/green/score/{id}` | Optional Bearer |
30
+ | `green_registry` | `GET /api/green/registry?serial=…` | Optional Bearer |
31
+ | `green_nature_index` | `GET /api/green/nature-index` | Optional Bearer |
32
+ | `green_api_status` | `GET /api/green/status` | None |
33
+ | `chargeflow_list` | `GET /api/v1/chargeflow` | Bearer (premium) |
34
+ | `chargeflow_create_e` | `POST /api/v1/chargeflow` | Bearer (premium) |
35
+ | `chargeflow_from_ocpi` | `POST /api/v1/chargeflow/from-ocpi` | Bearer (premium) |
36
+ | `chargeflow_partners` | `GET /api/v1/chargeflow/partners` | None |
37
+ | `chargeflow_partner_sync` | `POST /api/v1/chargeflow/partners/sync` | Bearer (premium) |
38
+ | `chargeflow_get` | `GET /api/v1/chargeflow/:id` | None |
39
+ | `chargeflow_retire` | `POST /api/v1/chargeflow/:id/retire` | Bearer (premium) |
40
+
41
+ ## Install
42
+
43
+ ```bash
44
+ npm install -g @adrien1212balitrand/auros-mcp
45
+ ```
46
+
47
+ Or run from the monorepo:
48
+
49
+ ```bash
50
+ cd packages/auros-mcp && npm install && npm run build
51
+ node dist/index.js
52
+ ```
53
+
54
+ ## Environment
55
+
56
+ | Variable | Default | Description |
57
+ |----------|---------|-------------|
58
+ | `AUROS_API_KEY` | `auros_pk_test_demo` | Bearer API key ([free tier](https://getauros.com/developers) — 1000 req/mo) |
59
+ | `AUROS_BASE_URL` | `https://getauros.com` | API base URL |
60
+
61
+ Get your own key:
62
+
63
+ ```bash
64
+ curl -X POST https://getauros.com/api/v1/keys \
65
+ -H "Content-Type: application/json" \
66
+ -d '{"email":"you@company.com"}'
67
+ ```
68
+
69
+ ## Cursor configuration
70
+
71
+ Add to `.cursor/mcp.json` (project) or global MCP settings:
72
+
73
+ ```json
74
+ {
75
+ "mcpServers": {
76
+ "auros-protocol": {
77
+ "command": "npx",
78
+ "args": ["-y", "@adrien1212balitrand/auros-mcp"],
79
+ "env": {
80
+ "AUROS_API_KEY": "auros_pk_test_demo"
81
+ }
82
+ }
83
+ }
84
+ }
85
+ ```
86
+
87
+ Local development (monorepo):
88
+
89
+ ```json
90
+ {
91
+ "mcpServers": {
92
+ "auros-protocol": {
93
+ "command": "node",
94
+ "args": ["C:/path/to/auros/packages/auros-mcp/dist/index.js"],
95
+ "env": {
96
+ "AUROS_API_KEY": "auros_pk_test_demo"
97
+ }
98
+ }
99
+ }
100
+ }
101
+ ```
102
+
103
+ ## Claude Desktop configuration
104
+
105
+ Edit `%APPDATA%\Claude\claude_desktop_config.json` (Windows) or `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
106
+
107
+ ```json
108
+ {
109
+ "mcpServers": {
110
+ "auros-protocol": {
111
+ "command": "npx",
112
+ "args": ["-y", "@adrien1212balitrand/auros-mcp"],
113
+ "env": {
114
+ "AUROS_API_KEY": "auros_pk_test_demo"
115
+ }
116
+ }
117
+ }
118
+ }
119
+ ```
120
+
121
+ Restart Cursor or Claude Desktop after saving.
122
+
123
+ ## Example agent prompts
124
+
125
+ - *"Score this Luxembourg real-estate SPV for MiCA readiness: retail warehouse €2.5M, professional investors, whitepaper draft."*
126
+ - *"Compare maple-usdc, realt-portfolio, and backed-bib01 side by side."*
127
+ - *"What jurisdictions rank best for tokenized bonds with a 6-month timeline?"*
128
+
129
+ ## Publishing (maintainers)
130
+
131
+ ```bash
132
+ cd packages/auros-mcp
133
+ npm run build
134
+ npm login
135
+ npm publish --access public
136
+ ```
137
+
138
+ ## Disclaimer
139
+
140
+ Responses are **indicative intelligence only** — not legal, tax, or investment advice.
141
+
142
+ ## Links
143
+
144
+ - [MCP server docs](https://getauros.com/developers/docs/mcp-server)
145
+ - [Developer portal](https://getauros.com/developers)
146
+ - [OpenAPI spec](https://getauros.com/auros-openapi.yaml)
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "../dist/index.js";
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/index.js ADDED
@@ -0,0 +1,550 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
5
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
6
+
7
+ // src/client.ts
8
+ var DEFAULT_BASE_URL = "https://getauros.com";
9
+ var DEFAULT_DEMO_KEY = "auros_pk_test_demo";
10
+ var AurosApiClient = class {
11
+ apiKey;
12
+ baseUrl;
13
+ constructor(options = {}) {
14
+ this.apiKey = (options.apiKey ?? process.env.AUROS_API_KEY ?? DEFAULT_DEMO_KEY).trim();
15
+ this.baseUrl = (options.baseUrl ?? process.env.AUROS_BASE_URL ?? DEFAULT_BASE_URL).replace(
16
+ /\/$/,
17
+ ""
18
+ );
19
+ if (!this.apiKey) {
20
+ throw new Error("AUROS_API_KEY is required");
21
+ }
22
+ }
23
+ async score(body) {
24
+ return this.request("POST", "/api/v1/score", body);
25
+ }
26
+ async scoreBatch(body) {
27
+ return this.request("POST", "/api/v1/score/batch", body);
28
+ }
29
+ async products(query = {}) {
30
+ return this.request("GET", "/api/v1/products", void 0, query);
31
+ }
32
+ async jurisdictions(query = {}) {
33
+ return this.request("GET", "/api/v1/jurisdictions", void 0, query);
34
+ }
35
+ async checklist(body) {
36
+ return this.request("POST", "/api/v1/checklist", body);
37
+ }
38
+ async compare(body) {
39
+ return this.request("POST", "/api/v1/compare", body);
40
+ }
41
+ async regulatoryFeed(query = {}) {
42
+ return this.request("GET", "/api/v1/regulatory/feed", void 0, query);
43
+ }
44
+ async status() {
45
+ return this.request("GET", "/api/v1/status", void 0, void 0, false);
46
+ }
47
+ async greenScore(id) {
48
+ return this.request("GET", `/api/green/score/${encodeURIComponent(id)}`, void 0, void 0, false);
49
+ }
50
+ async greenRegistry(serial) {
51
+ return this.request("GET", "/api/green/registry", void 0, { serial }, false);
52
+ }
53
+ async greenNatureIndex() {
54
+ return this.request("GET", "/api/green/nature-index", void 0, void 0, false);
55
+ }
56
+ async greenApiStatus() {
57
+ return this.request("GET", "/api/green/status", void 0, void 0, false);
58
+ }
59
+ async greenWattScore(id) {
60
+ return this.request("GET", `/api/green/watt/${encodeURIComponent(id)}`, void 0, void 0, false);
61
+ }
62
+ async greenCarbonQuality(id) {
63
+ return this.request(
64
+ "GET",
65
+ `/api/green/carbon-quality/${encodeURIComponent(id)}`,
66
+ void 0,
67
+ void 0,
68
+ false
69
+ );
70
+ }
71
+ async greenWattBatch(body) {
72
+ return this.request("POST", "/api/v1/green/watt/batch", body);
73
+ }
74
+ async greenCarbonQualityBatch(body) {
75
+ return this.request("POST", "/api/v1/green/carbon-quality/batch", body);
76
+ }
77
+ async greenH2oScore(id) {
78
+ return this.request("GET", `/api/green/h2o/${encodeURIComponent(id)}`, void 0, void 0, false);
79
+ }
80
+ async greenH2oBatch(body) {
81
+ return this.request("POST", "/api/v1/green/h2o/batch", body);
82
+ }
83
+ async eauCheck(body) {
84
+ return this.request("POST", "/api/eau/check", body, void 0, false);
85
+ }
86
+ async listChargeflow(query = {}) {
87
+ return this.request("GET", "/api/v1/chargeflow", void 0, query);
88
+ }
89
+ async createChargeflowE(body) {
90
+ return this.request("POST", "/api/v1/chargeflow", body);
91
+ }
92
+ async createChargeflowFromOcpi(body) {
93
+ return this.request("POST", "/api/v1/chargeflow/from-ocpi", body);
94
+ }
95
+ async listChargeflowPartners() {
96
+ return this.request(
97
+ "GET",
98
+ "/api/v1/chargeflow/partners",
99
+ void 0,
100
+ void 0,
101
+ false
102
+ );
103
+ }
104
+ async syncChargeflowPartner(body) {
105
+ return this.request("POST", "/api/v1/chargeflow/partners/sync", body);
106
+ }
107
+ async getChargeflow(id) {
108
+ return this.request(
109
+ "GET",
110
+ `/api/v1/chargeflow/${encodeURIComponent(id)}`,
111
+ void 0,
112
+ void 0,
113
+ false
114
+ );
115
+ }
116
+ async retireChargeflow(id, body = {}) {
117
+ return this.request(
118
+ "POST",
119
+ `/api/v1/chargeflow/${encodeURIComponent(id)}/retire`,
120
+ body
121
+ );
122
+ }
123
+ async request(method, path, body, query, auth = true) {
124
+ const params = new URLSearchParams();
125
+ if (query) {
126
+ for (const [key, value] of Object.entries(query)) {
127
+ if (value !== void 0 && value !== null) {
128
+ params.set(key, String(value));
129
+ }
130
+ }
131
+ }
132
+ const qs = params.toString();
133
+ const url = `${this.baseUrl}${path}${qs ? `?${qs}` : ""}`;
134
+ const headers = {
135
+ Accept: "application/json",
136
+ "X-AUROS-Protocol-Version": "1.0"
137
+ };
138
+ if (body !== void 0) {
139
+ headers["Content-Type"] = "application/json";
140
+ }
141
+ if (auth) {
142
+ headers.Authorization = `Bearer ${this.apiKey}`;
143
+ }
144
+ const res = await fetch(url, {
145
+ method,
146
+ headers,
147
+ body: body !== void 0 ? JSON.stringify(body) : void 0
148
+ });
149
+ const json = await res.json();
150
+ if (!res.ok) {
151
+ const err = typeof json === "object" && json !== null && "error" in json ? json.error : void 0;
152
+ throw new Error(
153
+ `[${err?.code ?? res.status}] ${err?.message ?? res.statusText} (${method} ${path})`
154
+ );
155
+ }
156
+ return json;
157
+ }
158
+ };
159
+
160
+ // src/tools.ts
161
+ import { z } from "zod";
162
+ function jsonResult(data) {
163
+ return {
164
+ content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
165
+ };
166
+ }
167
+ function toolError(err) {
168
+ const message = err instanceof Error ? err.message : String(err);
169
+ return {
170
+ content: [{ type: "text", text: `AUROS API error: ${message}` }],
171
+ isError: true
172
+ };
173
+ }
174
+ var assetType = z.enum([
175
+ "real_estate",
176
+ "private_fund",
177
+ "bonds",
178
+ "private_credit",
179
+ "commodities",
180
+ "stablecoins",
181
+ "other"
182
+ ]).optional();
183
+ var AUROS_MCP_TOOLS = [
184
+ {
185
+ name: "score",
186
+ description: "Score MiCA readiness 0\u2013100 for a tokenization project. Pass a free-text description or structured fields (asset_type, jurisdiction, investor_type, etc.).",
187
+ schema: {
188
+ description: z.string().optional().describe("Free-text project description"),
189
+ asset_type: assetType,
190
+ issuer_type: z.enum(["company_spv", "existing_fund", "individual", "unsure"]).optional(),
191
+ asset_class: z.enum(["financial_instrument", "art_utility", "e_money", "unsure"]).optional(),
192
+ eu_nexus: z.enum(["issuer_eu", "asset_eu", "investors_eu", "no_eu", "unsure"]).optional(),
193
+ whitepaper: z.enum(["ready", "draft", "none", "unsure"]).optional(),
194
+ investor_type: z.enum(["professional", "retail", "mixed", "unsure"]).optional(),
195
+ value_eur: z.number().optional(),
196
+ jurisdiction: z.string().optional(),
197
+ has_kyc: z.boolean().optional(),
198
+ has_data_room: z.boolean().optional(),
199
+ documents_count: z.number().optional(),
200
+ record_history: z.boolean().optional()
201
+ },
202
+ handler: (client2, args) => client2.score(args)
203
+ },
204
+ {
205
+ name: "score_batch",
206
+ description: "Score up to 20 assets in one call. Each item accepts the same fields as score. Counts as 1 quota unit.",
207
+ schema: {
208
+ items: z.array(
209
+ z.object({
210
+ description: z.string().optional(),
211
+ asset_type: assetType,
212
+ issuer_type: z.enum(["company_spv", "existing_fund", "individual", "unsure"]).optional(),
213
+ jurisdiction: z.string().optional(),
214
+ investor_type: z.enum(["professional", "retail", "mixed", "unsure"]).optional()
215
+ })
216
+ ).min(1).max(20).describe("Array of score requests (max 20)"),
217
+ record_history: z.boolean().optional()
218
+ },
219
+ handler: (client2, args) => client2.scoreBatch(args)
220
+ },
221
+ {
222
+ name: "products",
223
+ description: "Browse the AUROS RWA product catalog (120+ tokenized products). Filter by category, chain, yield, jurisdiction.",
224
+ schema: {
225
+ category: z.enum([
226
+ "stablecoins",
227
+ "real_estate",
228
+ "bonds",
229
+ "commodities",
230
+ "private_credit",
231
+ "all"
232
+ ]).optional(),
233
+ jurisdiction: z.string().optional(),
234
+ chain: z.string().optional(),
235
+ yield_min: z.number().optional(),
236
+ yield_max: z.number().optional(),
237
+ sort: z.enum(["apy", "tvl", "name"]).optional(),
238
+ limit: z.number().int().min(1).max(100).optional()
239
+ },
240
+ handler: (client2, args) => client2.products(args)
241
+ },
242
+ {
243
+ name: "jurisdictions",
244
+ description: "Rank tokenization jurisdictions by regulatory fit for an asset type, budget, and timeline.",
245
+ schema: {
246
+ asset_type: assetType,
247
+ investor_type: z.enum(["professional", "retail", "mixed", "unsure"]).optional(),
248
+ timeline_months: z.number().optional(),
249
+ budget: z.number().optional(),
250
+ structure: z.string().optional()
251
+ },
252
+ handler: (client2, args) => client2.jurisdictions(args)
253
+ },
254
+ {
255
+ name: "checklist",
256
+ description: "Generate a compliance checklist (20+ items) for a tokenization project by asset type and jurisdiction.",
257
+ schema: {
258
+ asset_type: z.enum([
259
+ "real_estate",
260
+ "private_fund",
261
+ "bonds",
262
+ "private_credit",
263
+ "commodities",
264
+ "stablecoins",
265
+ "other"
266
+ ]).describe("Asset type"),
267
+ jurisdiction: z.string().describe("Target jurisdiction (e.g. luxembourg, france)"),
268
+ structure: z.string().optional().describe("Legal structure (e.g. spv, fund)"),
269
+ investor_type: z.enum(["professional", "retail", "mixed", "unsure"]).optional()
270
+ },
271
+ handler: (client2, args) => client2.checklist(args)
272
+ },
273
+ {
274
+ name: "compare",
275
+ description: "Side-by-side comparison of 2\u20134 RWA products by explicit product_ids or filter criteria.",
276
+ schema: {
277
+ product_ids: z.array(z.string()).min(2).max(4).optional().describe("2\u20134 product IDs to compare"),
278
+ category: z.string().optional(),
279
+ yield_min: z.number().optional(),
280
+ risk_tier: z.string().optional(),
281
+ jurisdiction: z.string().optional(),
282
+ limit: z.number().int().optional()
283
+ },
284
+ handler: (client2, args) => client2.compare(args)
285
+ },
286
+ {
287
+ name: "green_watt_score",
288
+ description: "Free public Watt Score (0\u2013100) for an AUROS Green energy compare reference (solar, wind, REC, PPA). No auth required.",
289
+ schema: {
290
+ id: z.string().describe("Compare reference id, e.g. sunexchange")
291
+ },
292
+ handler: (client2, args) => client2.greenWattScore(String(args.id))
293
+ },
294
+ {
295
+ name: "green_carbon_quality",
296
+ description: "Free public Carbon Quality Score (CQS, 0\u2013100) for an AUROS Green carbon compare reference. No auth required.",
297
+ schema: {
298
+ id: z.string().describe("Compare reference id, e.g. toucan")
299
+ },
300
+ handler: (client2, args) => client2.greenCarbonQuality(String(args.id))
301
+ },
302
+ {
303
+ name: "green_watt_batch",
304
+ description: "Batch Watt Scores for up to 50 energy assets (premium key required). Each item: id (compare ref) or text (free-form). Counts as 1 quota unit.",
305
+ schema: {
306
+ items: z.array(
307
+ z.object({
308
+ id: z.string().optional(),
309
+ text: z.string().min(10).optional()
310
+ })
311
+ ).min(1).max(50)
312
+ },
313
+ handler: (client2, args) => client2.greenWattBatch(args)
314
+ },
315
+ {
316
+ name: "green_carbon_quality_batch",
317
+ description: "Batch Carbon Quality Scores \u2014 free tier: 10 items, premium: 50. Each item: id, text, or serial. Counts as 1 quota unit.",
318
+ schema: {
319
+ items: z.array(
320
+ z.object({
321
+ id: z.string().optional(),
322
+ text: z.string().min(10).optional()
323
+ })
324
+ ).min(1).max(50)
325
+ },
326
+ handler: (client2, args) => client2.greenCarbonQualityBatch(args)
327
+ },
328
+ {
329
+ name: "green_h2o_score",
330
+ description: "Free public H\u2082O Score (0\u2013100) for a hydrological catalog reference (concession, water rights, desalination, blue bond). No auth required.",
331
+ schema: {
332
+ id: z.string().describe("Hydrological compare reference id, e.g. pilot-concession-france")
333
+ },
334
+ handler: (client2, args) => client2.greenH2oScore(String(args.id))
335
+ },
336
+ {
337
+ name: "green_h2o_batch",
338
+ description: "Batch H\u2082O Scores for hydrological assets (premium key required). Each item: id (catalog ref) or text (free-form). Counts as 1 quota unit.",
339
+ schema: {
340
+ items: z.array(
341
+ z.object({
342
+ id: z.string().optional(),
343
+ text: z.string().min(10).optional()
344
+ })
345
+ ).min(1).max(50)
346
+ },
347
+ handler: (client2, args) => client2.greenH2oBatch(args)
348
+ },
349
+ {
350
+ name: "eau_check",
351
+ description: "Public hydrological readiness check from free text (min 10 chars). Returns H\u2082O Score preview and passport unlock path. No auth required.",
352
+ schema: {
353
+ text: z.string().min(10).describe("Project description mentioning m\xB3, concession, water rights, etc.")
354
+ },
355
+ handler: (client2, args) => client2.eauCheck({ text: args.text })
356
+ },
357
+ {
358
+ name: "regulatory_feed",
359
+ description: "Curated MiCA/ESMA/AMF/BaFin regulatory feed (premium key required). Filter by jurisdiction, tag, since date.",
360
+ schema: {
361
+ jurisdiction: z.string().optional(),
362
+ tag: z.enum(["mica", "esma", "amf", "bafin"]).optional(),
363
+ since: z.string().optional().describe("ISO date \u2014 items published on or after"),
364
+ limit: z.number().int().min(1).max(100).optional()
365
+ },
366
+ handler: (client2, args) => client2.regulatoryFeed(args)
367
+ },
368
+ {
369
+ name: "status",
370
+ description: "AUROS Protocol API health \u2014 service probes, version, deployed commit. No auth required.",
371
+ schema: {},
372
+ handler: (client2) => client2.status()
373
+ },
374
+ {
375
+ name: "green_score",
376
+ description: "AUROS Green unified score (CQS + Watt + Nature + benchmark) for a catalog id (e.g. toucan, moss). Free public read.",
377
+ schema: {
378
+ id: z.string().describe("Green compare catalog id")
379
+ },
380
+ handler: (client2, args) => client2.greenScore(String(args.id))
381
+ },
382
+ {
383
+ name: "green_registry",
384
+ description: "Registry Connect \u2014 Verra/Gold Standard/Puro serial to CQS + Nature Score. Free public read.",
385
+ schema: {
386
+ serial: z.string().describe("Registry serial e.g. VCS-674")
387
+ },
388
+ handler: (client2, args) => client2.greenRegistry(String(args.serial))
389
+ },
390
+ {
391
+ name: "green_nature_index",
392
+ description: "AUROS Nature Score Index ranking \u2014 biodiversity & nature-based assets.",
393
+ schema: {},
394
+ handler: (client2) => client2.greenNatureIndex()
395
+ },
396
+ {
397
+ name: "green_api_status",
398
+ description: "AUROS Green API health probes (score, registry, nature-index, openapi).",
399
+ schema: {},
400
+ handler: (client2) => client2.greenApiStatus()
401
+ },
402
+ {
403
+ name: "chargeflow_list",
404
+ description: "List ChargeFlow CFU units for the API key (Premium). Filter by kind (e|w|f), status, operator_id.",
405
+ schema: {
406
+ kind: z.enum(["e", "w", "f"]).optional(),
407
+ status: z.enum(["active", "retired"]).optional(),
408
+ operator_id: z.string().optional(),
409
+ limit: z.number().int().min(1).max(100).optional(),
410
+ offset: z.number().int().min(0).optional()
411
+ },
412
+ handler: (client2, args) => client2.listChargeflow(args)
413
+ },
414
+ {
415
+ name: "chargeflow_create_e",
416
+ description: "Mint a CFU-E charge session unit (Premium). Pass session + optional attributes.",
417
+ schema: {
418
+ session: z.object({
419
+ external_session_id: z.string(),
420
+ started_at: z.string(),
421
+ ended_at: z.string(),
422
+ energy_kwh: z.number(),
423
+ operator_id: z.string().optional(),
424
+ source_format: z.enum(["ocpi", "ocpp_summary", "csv", "json_custom"]).optional(),
425
+ location: z.object({
426
+ country: z.string().optional(),
427
+ site_id: z.string().optional(),
428
+ connector_id: z.string().optional()
429
+ }).optional(),
430
+ vehicle_ref: z.string().optional()
431
+ }).describe("Charge session payload"),
432
+ attributes: z.object({
433
+ renewable_claim: z.enum(["none", "go", "rec", "ppa_matched", "unknown"]).optional(),
434
+ grid_mix_note: z.string().optional(),
435
+ compare_ref_id: z.string().optional()
436
+ }).optional()
437
+ },
438
+ handler: (client2, args) => client2.createChargeflowE(args)
439
+ },
440
+ {
441
+ name: "chargeflow_from_ocpi",
442
+ description: "Offline OCPI CDR / CSV rows \u2192 CFU-E batch (Premium). Not a live OCPI client. Max 50 items.",
443
+ schema: {
444
+ cdrs: z.array(
445
+ z.object({
446
+ id: z.string(),
447
+ start_date_time: z.string(),
448
+ end_date_time: z.string(),
449
+ total_energy: z.number(),
450
+ country: z.string().optional(),
451
+ location_id: z.string().optional(),
452
+ cpo_id: z.string().optional(),
453
+ party_id: z.string().optional(),
454
+ auth_id: z.string().optional()
455
+ })
456
+ ).optional(),
457
+ csv_rows: z.array(
458
+ z.object({
459
+ external_session_id: z.string(),
460
+ started_at: z.string(),
461
+ ended_at: z.string(),
462
+ energy_kwh: z.number(),
463
+ country: z.string().optional(),
464
+ site_id: z.string().optional(),
465
+ operator_id: z.string().optional()
466
+ })
467
+ ).optional(),
468
+ default_operator_id: z.string().optional()
469
+ },
470
+ handler: (client2, args) => client2.createChargeflowFromOcpi(args)
471
+ },
472
+ {
473
+ name: "chargeflow_partners",
474
+ description: "List ChargeFlow partner connectors (Tesla Fleet / TotalEnergies / generic OCPI). Public catalogue.",
475
+ schema: {},
476
+ handler: (client2) => client2.listChargeflowPartners()
477
+ },
478
+ {
479
+ name: "chargeflow_partner_sync",
480
+ description: "Sync partner sessions to CFU-E (Premium). mode=sandbox (fixtures) or live (credentials required). Not an official Tesla/Total partnership.",
481
+ schema: {
482
+ partner: z.enum(["tesla_fleet", "total_energies", "generic_ocpi"]),
483
+ mode: z.enum(["sandbox", "live"]).optional(),
484
+ operator_id: z.string().optional(),
485
+ limit: z.number().int().min(1).max(50).optional(),
486
+ credentials: z.object({
487
+ access_token: z.string().optional(),
488
+ vin: z.string().optional(),
489
+ base_url: z.string().optional(),
490
+ token: z.string().optional(),
491
+ party_id: z.string().optional()
492
+ }).optional()
493
+ },
494
+ handler: (client2, args) => client2.syncChargeflowPartner(args)
495
+ },
496
+ {
497
+ name: "chargeflow_get",
498
+ description: "Get a ChargeFlow unit by id (public verify).",
499
+ schema: {
500
+ id: z.string().describe("cfu_e_* / cfu_w_* / cfu_f_*")
501
+ },
502
+ handler: (client2, args) => client2.getChargeflow(String(args.id))
503
+ },
504
+ {
505
+ name: "chargeflow_retire",
506
+ description: "Retire an active ChargeFlow unit (Premium, same API key).",
507
+ schema: {
508
+ id: z.string(),
509
+ reason: z.string().optional()
510
+ },
511
+ handler: (client2, args) => client2.retireChargeflow(String(args.id), {
512
+ reason: args.reason
513
+ })
514
+ }
515
+ ];
516
+ function registerAurosTools(server2, client2) {
517
+ for (const tool of AUROS_MCP_TOOLS) {
518
+ server2.registerTool(
519
+ tool.name,
520
+ {
521
+ description: tool.description,
522
+ inputSchema: tool.schema
523
+ },
524
+ async (args) => {
525
+ try {
526
+ const data = await tool.handler(client2, args);
527
+ return jsonResult(data);
528
+ } catch (err) {
529
+ return toolError(err);
530
+ }
531
+ }
532
+ );
533
+ }
534
+ }
535
+
536
+ // src/index.ts
537
+ var server = new McpServer({
538
+ name: "auros-protocol",
539
+ version: "1.0.0"
540
+ });
541
+ var client = new AurosApiClient();
542
+ registerAurosTools(server, client);
543
+ async function main() {
544
+ const transport = new StdioServerTransport();
545
+ await server.connect(transport);
546
+ }
547
+ main().catch((err) => {
548
+ console.error("AUROS MCP server failed:", err);
549
+ process.exit(1);
550
+ });
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@adrien1212balitrand/auros-mcp",
3
+ "version": "1.2.1",
4
+ "description": "MCP server for AUROS Protocol — RWA intelligence tools for Cursor and Claude Desktop",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "bin": {
10
+ "auros-mcp": "bin/auros-mcp.js"
11
+ },
12
+ "files": [
13
+ "bin",
14
+ "dist",
15
+ "README.md"
16
+ ],
17
+ "scripts": {
18
+ "build": "tsup src/index.ts --format esm --dts --clean",
19
+ "start": "node dist/index.js",
20
+ "prepublishOnly": "npm run build"
21
+ },
22
+ "keywords": [
23
+ "auros",
24
+ "mcp",
25
+ "model-context-protocol",
26
+ "rwa",
27
+ "mica",
28
+ "cursor",
29
+ "claude"
30
+ ],
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "https://github.com/getauros/auros",
34
+ "directory": "packages/auros-mcp"
35
+ },
36
+ "homepage": "https://getauros.com/developers/docs/mcp-server",
37
+ "dependencies": {
38
+ "@modelcontextprotocol/sdk": "^1.12.1",
39
+ "zod": "^3.25.76"
40
+ },
41
+ "devDependencies": {
42
+ "@types/node": "^20",
43
+ "tsup": "^8.5.0",
44
+ "typescript": "^5"
45
+ },
46
+ "engines": {
47
+ "node": ">=18"
48
+ },
49
+ "publishConfig": {
50
+ "access": "public",
51
+ "registry": "https://registry.npmjs.org/"
52
+ }
53
+ }