@ampeco/public-api-mcp 0.2.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/LICENSE +21 -0
- package/README.md +734 -0
- package/dist/build/flattener.d.ts +39 -0
- package/dist/build/flattener.d.ts.map +1 -0
- package/dist/build/flattener.js +193 -0
- package/dist/build/flattener.js.map +1 -0
- package/dist/build/index.d.ts +13 -0
- package/dist/build/index.d.ts.map +1 -0
- package/dist/build/index.js +175 -0
- package/dist/build/index.js.map +1 -0
- package/dist/build/optimizer.d.ts +32 -0
- package/dist/build/optimizer.d.ts.map +1 -0
- package/dist/build/optimizer.js +222 -0
- package/dist/build/optimizer.js.map +1 -0
- package/dist/build/parser.d.ts +35 -0
- package/dist/build/parser.d.ts.map +1 -0
- package/dist/build/parser.js +83 -0
- package/dist/build/parser.js.map +1 -0
- package/dist/build/types.d.ts +91 -0
- package/dist/build/types.d.ts.map +1 -0
- package/dist/build/types.js +5 -0
- package/dist/build/types.js.map +1 -0
- package/dist/build/zod-generator.d.ts +34 -0
- package/dist/build/zod-generator.d.ts.map +1 -0
- package/dist/build/zod-generator.js +317 -0
- package/dist/build/zod-generator.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +99 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/generated/build-stats.json +7 -0
- package/dist/generated/endpoints.json +32181 -0
- package/dist/generated/schemas.d.ts +8157 -0
- package/dist/generated/schemas.d.ts.map +1 -0
- package/dist/generated/schemas.js +2726 -0
- package/dist/generated/schemas.js.map +1 -0
- package/dist/generated/schemas.ts +3171 -0
- package/dist/server/factory.d.ts +11 -0
- package/dist/server/factory.d.ts.map +1 -0
- package/dist/server/factory.js +450 -0
- package/dist/server/factory.js.map +1 -0
- package/dist/server/factory.test.d.ts +5 -0
- package/dist/server/factory.test.d.ts.map +1 -0
- package/dist/server/factory.test.js +77 -0
- package/dist/server/factory.test.js.map +1 -0
- package/dist/server/http.d.ts +10 -0
- package/dist/server/http.d.ts.map +1 -0
- package/dist/server/http.js +110 -0
- package/dist/server/http.js.map +1 -0
- package/dist/server/index.d.ts +8 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +1502 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/loader.d.ts +10 -0
- package/dist/server/loader.d.ts.map +1 -0
- package/dist/server/loader.js +19 -0
- package/dist/server/loader.js.map +1 -0
- package/dist/server/prompts.d.ts +6 -0
- package/dist/server/prompts.d.ts.map +1 -0
- package/dist/server/prompts.js +462 -0
- package/dist/server/prompts.js.map +1 -0
- package/dist/server/stdio.d.ts +10 -0
- package/dist/server/stdio.d.ts.map +1 -0
- package/dist/server/stdio.js +25 -0
- package/dist/server/stdio.js.map +1 -0
- package/package.json +60 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACnG,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,KAAK,MAAM,YAAY,CAAC;AAK/B,wCAAwC;AACxC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAA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build/types.js';
|
|
6
|
+
/**
|
|
7
|
+
* Load pre-processed endpoints from build artifacts
|
|
8
|
+
*/
|
|
9
|
+
export declare function loadEndpoints(): BuildOutput;
|
|
10
|
+
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/server/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD;;GAEG;AACH,wBAAgB,aAAa,IAAI,WAAW,CAI3C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Endpoint loader module
|
|
3
|
+
* Loads pre-processed endpoints from build artifacts
|
|
4
|
+
*/
|
|
5
|
+
import { readFileSync } from 'fs';
|
|
6
|
+
import { join, dirname } from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
// Get the directory name for ES modules
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = dirname(__filename);
|
|
11
|
+
/**
|
|
12
|
+
* Load pre-processed endpoints from build artifacts
|
|
13
|
+
*/
|
|
14
|
+
export function loadEndpoints() {
|
|
15
|
+
const endpointsPath = join(__dirname, '../generated/endpoints.json');
|
|
16
|
+
const content = readFileSync(endpointsPath, 'utf-8');
|
|
17
|
+
return JSON.parse(content);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=loader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader.js","sourceRoot":"","sources":["../../src/server/loader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAGpC,wCAAwC;AACxC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC;;GAEG;AACH,MAAM,UAAU,aAAa;IAC3B,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC;IACrE,MAAM,OAAO,GAAG,YAAY,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC;IACrD,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAgB,CAAC;AAC5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/server/prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CA6ctF"}
|
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt handlers for MCP server
|
|
3
|
+
* Contains the full text content for workflow prompts
|
|
4
|
+
*/
|
|
5
|
+
export function getPromptContent(promptName, args) {
|
|
6
|
+
switch (promptName) {
|
|
7
|
+
case 'charging_session_workflow': {
|
|
8
|
+
const evseId = args.evseId;
|
|
9
|
+
const sessionId = args.sessionId;
|
|
10
|
+
let specificGuidance = '';
|
|
11
|
+
if (evseId) {
|
|
12
|
+
specificGuidance += `\n## Specific Task: Work with EVSE ${evseId}\n\nYou have been provided with EVSE ID: ${evseId}\nUse this ID when starting a charging session in Step 2.\n`;
|
|
13
|
+
}
|
|
14
|
+
if (sessionId) {
|
|
15
|
+
specificGuidance += `\n## Specific Task: Monitor/Stop Session ${sessionId}\n\nYou have been provided with session ID: ${sessionId}\nUse this ID to retrieve session details or stop the charging session.\n`;
|
|
16
|
+
}
|
|
17
|
+
return `# Charging Session Workflow${specificGuidance}
|
|
18
|
+
|
|
19
|
+
This guide explains how to implement a complete EV charging session using the AMPECO API.
|
|
20
|
+
|
|
21
|
+
## Overview
|
|
22
|
+
|
|
23
|
+
The charging session lifecycle follows this sequence:
|
|
24
|
+
1. **Discovery**: Find available charge points
|
|
25
|
+
2. **Start Session**: Initiate charging
|
|
26
|
+
3. **Monitor**: Track session progress via webhooks
|
|
27
|
+
4. **Stop Session**: End charging
|
|
28
|
+
5. **Retrieve Details**: Get final session metrics and billing
|
|
29
|
+
|
|
30
|
+
## Step 1: Find Available Charge Points
|
|
31
|
+
|
|
32
|
+
Use the top-level listing endpoints to discover charging infrastructure:
|
|
33
|
+
|
|
34
|
+
**Get Locations:**
|
|
35
|
+
\`\`\`
|
|
36
|
+
GET /resources/locations/v1.0
|
|
37
|
+
\`\`\`
|
|
38
|
+
Returns all locations with geographic coordinates and availability status.
|
|
39
|
+
|
|
40
|
+
**Get Charge Points:**
|
|
41
|
+
\`\`\`
|
|
42
|
+
GET /resources/charge-points/v1.0?status=active&accessType=public&networkStatus=available
|
|
43
|
+
\`\`\`
|
|
44
|
+
Filter for active, public, and available charge points.
|
|
45
|
+
|
|
46
|
+
**Get EVSEs (Recommended for charging type):**
|
|
47
|
+
\`\`\`
|
|
48
|
+
GET /resources/evses
|
|
49
|
+
\`\`\`
|
|
50
|
+
EVSEs contain the \`currentType\` field ("ac" or "dc") which tells you the charging type. Each EVSE belongs to a charge point and contains connectors.
|
|
51
|
+
|
|
52
|
+
## Step 2: Start a Charging Session
|
|
53
|
+
|
|
54
|
+
**Endpoint:**
|
|
55
|
+
\`\`\`
|
|
56
|
+
POST /actions/evse/v1.0/{evseId}/start
|
|
57
|
+
\`\`\`
|
|
58
|
+
|
|
59
|
+
**Required Parameters:**
|
|
60
|
+
- \`evseId\`: The EVSE network ID (from Step 1)
|
|
61
|
+
|
|
62
|
+
**Response:**
|
|
63
|
+
\`\`\`json
|
|
64
|
+
{
|
|
65
|
+
"success": true,
|
|
66
|
+
"sessionId": 12345,
|
|
67
|
+
"message": "Session starting..."
|
|
68
|
+
}
|
|
69
|
+
\`\`\`
|
|
70
|
+
|
|
71
|
+
**Important:** The response returns immediately with a session ID, but the session is not yet active.
|
|
72
|
+
|
|
73
|
+
## Step 3: Monitor Session Status
|
|
74
|
+
|
|
75
|
+
**Webhook Notifications:**
|
|
76
|
+
|
|
77
|
+
The AMPECO API is event-driven. After starting a session, you will receive:
|
|
78
|
+
|
|
79
|
+
1. **First Notification - SessionUpdateNotification:**
|
|
80
|
+
- Status: \`"pending"\`
|
|
81
|
+
- Indicates session is being prepared
|
|
82
|
+
|
|
83
|
+
2. **Second Notification - SessionUpdateNotification:**
|
|
84
|
+
- Status: \`"active"\`
|
|
85
|
+
- Charging has started
|
|
86
|
+
|
|
87
|
+
3. **Ongoing - SessionMeterValuesNotification:**
|
|
88
|
+
- Contains real-time energy consumption (in Wh)
|
|
89
|
+
- Provides meter readings during charging
|
|
90
|
+
|
|
91
|
+
**To get current session details:**
|
|
92
|
+
\`\`\`
|
|
93
|
+
GET /resources/sessions/v1.0/{sessionId}
|
|
94
|
+
\`\`\`
|
|
95
|
+
|
|
96
|
+
## Step 4: Stop Charging Session
|
|
97
|
+
|
|
98
|
+
**Endpoint:**
|
|
99
|
+
\`\`\`
|
|
100
|
+
POST /actions/charge-point/v1.0/{chargePointId}/stop/{sessionId}
|
|
101
|
+
\`\`\`
|
|
102
|
+
|
|
103
|
+
**Required Parameters:**
|
|
104
|
+
- \`chargePointId\`: The charge point ID
|
|
105
|
+
- \`sessionId\`: The session ID from Step 2
|
|
106
|
+
|
|
107
|
+
**Response:**
|
|
108
|
+
Returns confirmation that stop request was sent.
|
|
109
|
+
|
|
110
|
+
**Webhook Notification:**
|
|
111
|
+
You will receive a \`SessionUpdateNotification\` with status \`"finished"\` when the session has fully terminated.
|
|
112
|
+
|
|
113
|
+
## Step 5: Retrieve Final Session Details
|
|
114
|
+
|
|
115
|
+
**Endpoint:**
|
|
116
|
+
\`\`\`
|
|
117
|
+
GET /resources/sessions/v1.0/{sessionId}
|
|
118
|
+
\`\`\`
|
|
119
|
+
|
|
120
|
+
**Wait for:** The \`SessionUpdateNotification\` webhook with status \`"finished"\` before retrieving final details.
|
|
121
|
+
|
|
122
|
+
**Response includes:**
|
|
123
|
+
- Total energy consumed (kWh)
|
|
124
|
+
- State of charge percentage
|
|
125
|
+
- Total amount charged (billing)
|
|
126
|
+
- Payment status
|
|
127
|
+
- Charging periods breakdown
|
|
128
|
+
- Price breakdown by tariff components
|
|
129
|
+
- Complete tariff snapshot
|
|
130
|
+
|
|
131
|
+
## Best Practices
|
|
132
|
+
|
|
133
|
+
1. **Use webhooks for state changes** - Don't poll for status updates
|
|
134
|
+
2. **Wait for "finished" status** - Final metrics are only accurate after session completes
|
|
135
|
+
3. **Use top-level EVSE listing** - More efficient than nested queries
|
|
136
|
+
4. **Check currentType** - Verify AC vs DC compatibility before starting session
|
|
137
|
+
5. **Handle webhook delays** - Status changes may take 10-30 seconds
|
|
138
|
+
|
|
139
|
+
## Error Handling
|
|
140
|
+
|
|
141
|
+
- If start request fails, check EVSE availability and network status
|
|
142
|
+
- If session doesn't transition to "active" within 60 seconds, check charge point hardware status
|
|
143
|
+
- If stop request fails, the session may already be finished or the charge point may be offline`;
|
|
144
|
+
}
|
|
145
|
+
case 'authentication_workflow': {
|
|
146
|
+
return `# Authentication Workflow
|
|
147
|
+
|
|
148
|
+
This guide explains how authentication works with the AMPECO Public API and how to implement it in your application.
|
|
149
|
+
|
|
150
|
+
## Important: No Client-Level Authentication
|
|
151
|
+
|
|
152
|
+
**The AMPECO Public API does NOT provide client-level authentication or authorization for mobile apps or end users.**
|
|
153
|
+
|
|
154
|
+
This means:
|
|
155
|
+
- There is no \`/login\` endpoint for end users
|
|
156
|
+
- There is no user session management in the API
|
|
157
|
+
- You cannot directly authenticate mobile app users against the API
|
|
158
|
+
- You MUST implement your own authentication layer
|
|
159
|
+
|
|
160
|
+
## Authentication Architecture
|
|
161
|
+
|
|
162
|
+
\`\`\`
|
|
163
|
+
Mobile App → Custom Backend → AMPECO Public API
|
|
164
|
+
(Your Auth) (Bearer Token)
|
|
165
|
+
\`\`\`
|
|
166
|
+
|
|
167
|
+
### What You Build (Custom Backend)
|
|
168
|
+
1. User registration and login endpoints
|
|
169
|
+
2. Password hashing and validation
|
|
170
|
+
3. Session/JWT token management for your users
|
|
171
|
+
4. User credential storage in your database
|
|
172
|
+
5. Authorization logic (who can access what)
|
|
173
|
+
|
|
174
|
+
### What AMPECO Provides
|
|
175
|
+
- **Admin-level Bearer Token** for your backend to call the API
|
|
176
|
+
- User resource management via \`POST /resources/users\` (create users in AMPECO system)
|
|
177
|
+
- User-scoped data filtering on API endpoints
|
|
178
|
+
|
|
179
|
+
## Implementation Guide
|
|
180
|
+
|
|
181
|
+
### Step 1: User Registration
|
|
182
|
+
|
|
183
|
+
**Your Backend:**
|
|
184
|
+
1. Accept user registration (email, password, name) from mobile app
|
|
185
|
+
2. Hash password and store in your database
|
|
186
|
+
3. Call AMPECO API to create user resource:
|
|
187
|
+
|
|
188
|
+
\`\`\`
|
|
189
|
+
POST /resources/users
|
|
190
|
+
Authorization: Bearer YOUR_ADMIN_TOKEN
|
|
191
|
+
Content-Type: application/json
|
|
192
|
+
|
|
193
|
+
{
|
|
194
|
+
"email": "user@example.com",
|
|
195
|
+
"first_name": "John",
|
|
196
|
+
"last_name": "Doe"
|
|
197
|
+
}
|
|
198
|
+
\`\`\`
|
|
199
|
+
|
|
200
|
+
4. Store AMPECO user ID alongside your user record
|
|
201
|
+
5. Return success to mobile app
|
|
202
|
+
|
|
203
|
+
### Step 2: User Login
|
|
204
|
+
|
|
205
|
+
**Your Backend:**
|
|
206
|
+
1. Accept login credentials (email, password) from mobile app
|
|
207
|
+
2. Validate credentials against your database
|
|
208
|
+
3. Generate your own session token/JWT
|
|
209
|
+
4. Return token to mobile app
|
|
210
|
+
|
|
211
|
+
**Mobile App:**
|
|
212
|
+
- Store your session token
|
|
213
|
+
- Include it in all requests to your backend
|
|
214
|
+
- Your backend validates this token on each request
|
|
215
|
+
|
|
216
|
+
### Step 3: Making API Calls on Behalf of Users
|
|
217
|
+
|
|
218
|
+
**Your Backend:**
|
|
219
|
+
1. Validate user's session token
|
|
220
|
+
2. Retrieve user's AMPECO user ID from your database
|
|
221
|
+
3. Call AMPECO API with admin Bearer token
|
|
222
|
+
4. Use user filters to scope requests:
|
|
223
|
+
|
|
224
|
+
\`\`\`
|
|
225
|
+
GET /resources/sessions/v1.0?userId={ampecoUserId}
|
|
226
|
+
Authorization: Bearer YOUR_ADMIN_TOKEN
|
|
227
|
+
\`\`\`
|
|
228
|
+
|
|
229
|
+
This returns only sessions for that specific user.
|
|
230
|
+
|
|
231
|
+
### Step 4: Securing the Bearer Token
|
|
232
|
+
|
|
233
|
+
**Critical Security Practices:**
|
|
234
|
+
|
|
235
|
+
1. **NEVER expose admin Bearer token to mobile apps**
|
|
236
|
+
- Token stays on your backend only
|
|
237
|
+
- Mobile apps never see or use it
|
|
238
|
+
|
|
239
|
+
2. **Store token securely:**
|
|
240
|
+
- Environment variables (recommended)
|
|
241
|
+
- Secrets management service (AWS Secrets Manager, etc.)
|
|
242
|
+
- Never commit to git
|
|
243
|
+
|
|
244
|
+
3. **Use HTTPS:**
|
|
245
|
+
- All communication between mobile app and your backend
|
|
246
|
+
- All communication between your backend and AMPECO API
|
|
247
|
+
|
|
248
|
+
## User-Scoped API Requests
|
|
249
|
+
|
|
250
|
+
Many AMPECO endpoints support filtering by user:
|
|
251
|
+
|
|
252
|
+
**Sessions:**
|
|
253
|
+
\`\`\`
|
|
254
|
+
GET /resources/sessions/v1.0?userId={id}
|
|
255
|
+
\`\`\`
|
|
256
|
+
|
|
257
|
+
**Charge Points (user's favorites/home chargers):**
|
|
258
|
+
\`\`\`
|
|
259
|
+
GET /resources/charge-points/v1.0?userId={id}
|
|
260
|
+
\`\`\`
|
|
261
|
+
|
|
262
|
+
**Reservations:**
|
|
263
|
+
\`\`\`
|
|
264
|
+
GET /resources/reservations?userId={id}
|
|
265
|
+
\`\`\`
|
|
266
|
+
|
|
267
|
+
Always use these filters to ensure users only see their own data.
|
|
268
|
+
|
|
269
|
+
## Example Flow: Start Charging Session
|
|
270
|
+
|
|
271
|
+
\`\`\`
|
|
272
|
+
1. Mobile app → Your backend: "Start charging at EVSE 123"
|
|
273
|
+
Headers: Authorization: Bearer YOUR_USER_SESSION_TOKEN
|
|
274
|
+
|
|
275
|
+
2. Your backend validates user session token
|
|
276
|
+
|
|
277
|
+
3. Your backend → AMPECO API:
|
|
278
|
+
POST /actions/evse/v1.0/123/start
|
|
279
|
+
Headers: Authorization: Bearer YOUR_ADMIN_TOKEN
|
|
280
|
+
|
|
281
|
+
4. AMPECO API → Your backend: {"sessionId": 456}
|
|
282
|
+
|
|
283
|
+
5. Your backend → Mobile app: {"sessionId": 456}
|
|
284
|
+
\`\`\`
|
|
285
|
+
|
|
286
|
+
## Best Practices
|
|
287
|
+
|
|
288
|
+
1. **Implement rate limiting** - Protect your backend from abuse
|
|
289
|
+
2. **Log API calls** - Track which user triggered which AMPECO API call
|
|
290
|
+
3. **Handle token expiration** - Refresh admin token if needed
|
|
291
|
+
4. **Validate user ownership** - Ensure users can only stop their own sessions, etc.
|
|
292
|
+
5. **Use webhook authentication** - Verify webhooks are actually from AMPECO
|
|
293
|
+
|
|
294
|
+
## Summary
|
|
295
|
+
|
|
296
|
+
- **You build:** User authentication, session management, password security
|
|
297
|
+
- **AMPECO provides:** Admin-level API access, user resource storage, user-scoped filtering
|
|
298
|
+
- **Your backend** acts as a trusted intermediary between untrusted mobile apps and the AMPECO API`;
|
|
299
|
+
}
|
|
300
|
+
case 'reservation_workflow': {
|
|
301
|
+
const chargePointId = args.chargePointId;
|
|
302
|
+
const evseNetworkId = args.evseNetworkId;
|
|
303
|
+
const userId = args.userId;
|
|
304
|
+
const reservationType = args.reservationType || 'immediate';
|
|
305
|
+
let specificGuidance = '';
|
|
306
|
+
if (chargePointId || evseNetworkId || userId) {
|
|
307
|
+
specificGuidance += `\n## Specific Task: Create ${reservationType === 'future' ? 'Future' : 'Immediate'} Reservation\n\n`;
|
|
308
|
+
if (userId)
|
|
309
|
+
specificGuidance += `User ID: ${userId}\n`;
|
|
310
|
+
if (chargePointId)
|
|
311
|
+
specificGuidance += `Charge Point ID: ${chargePointId}\n`;
|
|
312
|
+
if (evseNetworkId)
|
|
313
|
+
specificGuidance += `EVSE Network ID: ${evseNetworkId}\n`;
|
|
314
|
+
specificGuidance += `\nUse these IDs when creating the reservation in the examples below.\n`;
|
|
315
|
+
}
|
|
316
|
+
return `# Reservation Workflow${specificGuidance}
|
|
317
|
+
|
|
318
|
+
This guide explains how to reserve charge points using the AMPECO API for both immediate and future use.
|
|
319
|
+
|
|
320
|
+
## Overview
|
|
321
|
+
|
|
322
|
+
Reservations allow users to guarantee access to a specific charge point or EVSE. AMPECO supports two types:
|
|
323
|
+
1. **Immediate Reservation** ("Reserve Now") - Reserve for use right now
|
|
324
|
+
2. **Future Reservation** - Reserve for a specific date/time in the future
|
|
325
|
+
|
|
326
|
+
## Reservation Endpoint
|
|
327
|
+
|
|
328
|
+
\`\`\`
|
|
329
|
+
POST /actions/charge-point/v1.0/{chargePointId}/reserve/{evseNetworkId}
|
|
330
|
+
\`\`\`
|
|
331
|
+
|
|
332
|
+
**Path Parameters:**
|
|
333
|
+
- \`chargePointId\`: The charge point ID (number)
|
|
334
|
+
- \`evseNetworkId\`: The EVSE network ID (string) - specific connector to reserve
|
|
335
|
+
|
|
336
|
+
**Request Body:**
|
|
337
|
+
\`\`\`json
|
|
338
|
+
{
|
|
339
|
+
"userId": 123,
|
|
340
|
+
"reason": "User requested reservation"
|
|
341
|
+
}
|
|
342
|
+
\`\`\`
|
|
343
|
+
|
|
344
|
+
## Immediate Reservation ("Reserve Now")
|
|
345
|
+
|
|
346
|
+
**Use Case:** User wants to reserve a charge point to use immediately.
|
|
347
|
+
|
|
348
|
+
**Steps:**
|
|
349
|
+
|
|
350
|
+
1. **Find available charge point:**
|
|
351
|
+
\`\`\`
|
|
352
|
+
GET /resources/charge-points/v1.0?networkStatus=available&hardwareStatus=available
|
|
353
|
+
\`\`\`
|
|
354
|
+
|
|
355
|
+
2. **Get EVSE details:**
|
|
356
|
+
\`\`\`
|
|
357
|
+
GET /resources/evses?chargePointId={chargePointId}
|
|
358
|
+
\`\`\`
|
|
359
|
+
Note the \`networkId\` field from the EVSE you want to reserve.
|
|
360
|
+
|
|
361
|
+
3. **Create immediate reservation:**
|
|
362
|
+
\`\`\`
|
|
363
|
+
POST /actions/charge-point/v1.0/{chargePointId}/reserve/{evseNetworkId}
|
|
364
|
+
Content-Type: application/json
|
|
365
|
+
Authorization: Bearer YOUR_TOKEN
|
|
366
|
+
|
|
367
|
+
{
|
|
368
|
+
"userId": 123,
|
|
369
|
+
"reason": "Immediate charging needed"
|
|
370
|
+
}
|
|
371
|
+
\`\`\`
|
|
372
|
+
|
|
373
|
+
**Response:**
|
|
374
|
+
\`\`\`json
|
|
375
|
+
{
|
|
376
|
+
"success": true,
|
|
377
|
+
"reservationId": 456,
|
|
378
|
+
"status": "accepted",
|
|
379
|
+
"message": "Reservation created successfully"
|
|
380
|
+
}
|
|
381
|
+
\`\`\`
|
|
382
|
+
|
|
383
|
+
4. **Start charging session** (user should plug in soon):
|
|
384
|
+
\`\`\`
|
|
385
|
+
POST /actions/evse/v1.0/{evseNetworkId}/start
|
|
386
|
+
\`\`\`
|
|
387
|
+
|
|
388
|
+
**Important:** Immediate reservations typically expire after 10-15 minutes if not used.
|
|
389
|
+
|
|
390
|
+
## Best Practices
|
|
391
|
+
|
|
392
|
+
1. **Check availability before reserving** - Use \`networkStatus\` and \`hardwareStatus\` filters
|
|
393
|
+
2. **Provide clear reason** - Helps with debugging and user support
|
|
394
|
+
3. **Set appropriate expiry** - Don't hold EVSEs longer than needed
|
|
395
|
+
4. **Notify users** - Send reminders before reservation time
|
|
396
|
+
5. **Handle expiry gracefully** - Let users know if their reservation expired
|
|
397
|
+
6. **Allow cancellation** - Users should be able to cancel if plans change`;
|
|
398
|
+
}
|
|
399
|
+
case 'smart_charging_setup': {
|
|
400
|
+
const chargePointId = args.chargePointId;
|
|
401
|
+
const mode = args.mode;
|
|
402
|
+
let specificGuidance = '';
|
|
403
|
+
if (chargePointId || mode) {
|
|
404
|
+
specificGuidance += `\n## Specific Task: Configure Smart Charging\n\n`;
|
|
405
|
+
if (chargePointId)
|
|
406
|
+
specificGuidance += `Charge Point ID: ${chargePointId}\n`;
|
|
407
|
+
if (mode) {
|
|
408
|
+
specificGuidance += `Target Mode: ${mode}\n\n`;
|
|
409
|
+
specificGuidance += `Focus on implementing the "${mode}" smart charging mode in the examples below.\n`;
|
|
410
|
+
}
|
|
411
|
+
else if (chargePointId) {
|
|
412
|
+
specificGuidance += `\nConfigure smart charging for this charge point using the appropriate mode from the options below.\n`;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
return `# Smart Charging Setup${specificGuidance}
|
|
416
|
+
|
|
417
|
+
This guide explains how to configure smart charging modes for home chargers using the AMPECO API.
|
|
418
|
+
|
|
419
|
+
## Overview
|
|
420
|
+
|
|
421
|
+
Smart charging optimizes when and how EVs charge based on various factors:
|
|
422
|
+
- **Scheduled** - Charge during specific time windows
|
|
423
|
+
- **Solar** - Charge using excess solar power
|
|
424
|
+
- **Dynamic Pricing** - Charge when electricity is cheapest
|
|
425
|
+
- **Grid Optimization** - Respond to grid demand
|
|
426
|
+
|
|
427
|
+
AMPECO supports multiple smart charging modes that can be configured per charge point.
|
|
428
|
+
|
|
429
|
+
## Available Smart Charging Modes
|
|
430
|
+
|
|
431
|
+
### 1. Scheduled (user_controlled_schedule)
|
|
432
|
+
Time-based charging within defined windows.
|
|
433
|
+
|
|
434
|
+
### 2. Solar (solar)
|
|
435
|
+
Charges using excess solar power from home panels.
|
|
436
|
+
|
|
437
|
+
### 3. Octopus Agile (octopus_agile)
|
|
438
|
+
Dynamic pricing based on Octopus Energy's Agile tariff (UK).
|
|
439
|
+
|
|
440
|
+
### 4. Octopus Go (octopus_go)
|
|
441
|
+
Fixed off-peak window for Octopus Energy's Go tariff (UK).
|
|
442
|
+
|
|
443
|
+
### 5. Energi Elspot (energi_elspot)
|
|
444
|
+
Nordic spot market electricity pricing.
|
|
445
|
+
|
|
446
|
+
### 6. Nordpool (nordpool)
|
|
447
|
+
Nordic power exchange pricing.
|
|
448
|
+
|
|
449
|
+
## Best Practices
|
|
450
|
+
|
|
451
|
+
1. **Check available modes first** - Not all modes enabled for all tenants
|
|
452
|
+
2. **Validate time windows** - Ensure start < end for scheduled modes
|
|
453
|
+
3. **Set reasonable thresholds** - Price thresholds should match local market
|
|
454
|
+
4. **Combine with reservations** - Reserve EVSE + smart charging = guaranteed optimized charging
|
|
455
|
+
5. **Monitor effectiveness** - Track sessions to see if smart charging is working
|
|
456
|
+
6. **Fallback strategy** - Set minimum charge to ensure users aren't stranded`;
|
|
457
|
+
}
|
|
458
|
+
default:
|
|
459
|
+
throw new Error(`Unknown prompt: ${promptName}`);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
//# sourceMappingURL=prompts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/server/prompts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,UAAU,gBAAgB,CAAC,UAAkB,EAAE,IAAyB;IAC5E,QAAQ,UAAU,EAAE,CAAC;QACnB,KAAK,2BAA2B,CAAC,CAAC,CAAC;YACjC,MAAM,MAAM,GAAG,IAAI,CAAC,MAA4B,CAAC;YACjD,MAAM,SAAS,GAAG,IAAI,CAAC,SAA+B,CAAC;YAEvD,IAAI,gBAAgB,GAAG,EAAE,CAAC;YAC1B,IAAI,MAAM,EAAE,CAAC;gBACX,gBAAgB,IAAI,sCAAsC,MAAM,4CAA4C,MAAM,6DAA6D,CAAC;YAClL,CAAC;YACD,IAAI,SAAS,EAAE,CAAC;gBACd,gBAAgB,IAAI,4CAA4C,SAAS,+CAA+C,SA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AAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2EAiFqB,CAAC;QACxE,CAAC;QAED,KAAK,sBAAsB,CAAC,CAAC,CAAC;YAC5B,MAAM,aAAa,GAAG,IAAI,CAAC,aAAmC,CAAC;YAC/D,MAAM,IAAI,GAAG,IAAI,CAAC,IAA0B,CAAC;YAE7C,IAAI,gBAAgB,GAAG,EAAE,CAAC;YAC1B,IAAI,aAAa,IAAI,IAAI,EAAE,CAAC;gBAC1B,gBAAgB,IAAI,kDAAkD,CAAC;gBACvE,IAAI,aAAa;oBAAE,gBAAgB,IAAI,oBAAoB,aAAa,IAAI,CAAC;gBAC7E,IAAI,IAAI,EAAE,CAAC;oBACT,gBAAgB,IAAI,gBAAgB,IAAI,MAAM,CAAC;oBAC/C,gBAAgB,IAAI,8BAA8B,IAAI,gDAAgD,CAAC;gBACzG,CAAC;qBAAM,IAAI,aAAa,EAAE,CAAC;oBACzB,gBAAgB,IAAI,uGAAuG,CAAC;gBAC9H,CAAC;YACH,CAAC;YAED,OAAO,yBAAyB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8EAyCwB,CAAC;QAC3E,CAAC;QAED;YACE,MAAM,IAAI,KAAK,CAAC,mBAAmB,UAAU,EAAE,CAAC,CAAC;IACrD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stdio MCP Server
|
|
3
|
+
* Runs MCP server with stdio transport for local integrations (Claude Desktop, NPX, etc.)
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Start MCP server in stdio mode
|
|
7
|
+
* Uses stdin/stdout for communication with MCP clients
|
|
8
|
+
*/
|
|
9
|
+
export declare function startStdioServer(bearerToken: string, hostname: string): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=stdio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../../src/server/stdio.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;GAGG;AACH,wBAAsB,gBAAgB,CACpC,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stdio MCP Server
|
|
3
|
+
* Runs MCP server with stdio transport for local integrations (Claude Desktop, NPX, etc.)
|
|
4
|
+
*/
|
|
5
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
6
|
+
import { createServer } from './factory.js';
|
|
7
|
+
import { loadEndpoints } from './loader.js';
|
|
8
|
+
/**
|
|
9
|
+
* Start MCP server in stdio mode
|
|
10
|
+
* Uses stdin/stdout for communication with MCP clients
|
|
11
|
+
*/
|
|
12
|
+
export async function startStdioServer(bearerToken, hostname) {
|
|
13
|
+
console.error('[Stdio Mode] Starting MCP server...');
|
|
14
|
+
const endpoints = loadEndpoints();
|
|
15
|
+
console.error(`[Stdio Mode] Loaded ${endpoints.endpoints.length} endpoints from ${endpoints.info.title} v${endpoints.info.version}`);
|
|
16
|
+
const server = createServer(endpoints, bearerToken, hostname);
|
|
17
|
+
const transport = new StdioServerTransport();
|
|
18
|
+
await server.connect(transport);
|
|
19
|
+
console.error('[Stdio Mode] Server connected and ready');
|
|
20
|
+
console.error(`[Stdio Mode] Target API: ${hostname}`);
|
|
21
|
+
console.error(`[Stdio Mode] Bearer token: ${bearerToken ? 'provided' : 'not provided'}`);
|
|
22
|
+
// Keep process alive
|
|
23
|
+
process.stdin.resume();
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=stdio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["../../src/server/stdio.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CACpC,WAAmB,EACnB,QAAgB;IAEhB,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;IAErD,MAAM,SAAS,GAAG,aAAa,EAAE,CAAC;IAClC,OAAO,CAAC,KAAK,CAAC,uBAAuB,SAAS,CAAC,SAAS,CAAC,MAAM,mBAAmB,SAAS,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAErI,MAAM,MAAM,GAAG,YAAY,CAAC,SAAS,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC9D,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAE7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC,CAAC;IACzD,OAAO,CAAC,KAAK,CAAC,4BAA4B,QAAQ,EAAE,CAAC,CAAC;IACtD,OAAO,CAAC,KAAK,CAAC,8BAA8B,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC;IAEzF,qBAAqB;IACrB,OAAO,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;AACzB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ampeco/public-api-mcp",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "MCP server that dynamically exposes the AMPECO.CHARGE Public API defined by an OpenAPI 3 specification",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/cli/index.js",
|
|
7
|
+
"types": "dist/cli/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"ampeco-api-mcp": "./dist/cli/index.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"dist/**/*",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsx src/build/index.ts \"$OPENAPI_SPEC_PATH\" && tsc && mkdir -p dist/generated && cp src/generated/*.json src/generated/*.ts dist/generated/",
|
|
18
|
+
"dev:stdio": "(tsx src/build/index.ts \"$OPENAPI_SPEC_PATH\" && echo '[Build] Complete' >&2) >&2 && tsx src/cli/index.ts --stdio --hostname http://demo.charge.alex2.dev.ampeco.tech --token \"$AMPECO_TOKEN\"",
|
|
19
|
+
"dev:http": "tsx src/build/index.ts \"$OPENAPI_SPEC_PATH\" && tsx src/cli/index.ts --http --port 3001",
|
|
20
|
+
"dev": "npm run dev:http",
|
|
21
|
+
"start": "node dist/cli/index.js",
|
|
22
|
+
"type-check": "tsc --noEmit",
|
|
23
|
+
"test": "vitest",
|
|
24
|
+
"prepublishOnly": "npm run build"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"mcp",
|
|
28
|
+
"openapi",
|
|
29
|
+
"api",
|
|
30
|
+
"model-context-protocol",
|
|
31
|
+
"ampeco",
|
|
32
|
+
"charge",
|
|
33
|
+
"ev-charging"
|
|
34
|
+
],
|
|
35
|
+
"author": "AMPECO",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"repository": {
|
|
38
|
+
"type": "git",
|
|
39
|
+
"url": "https://github.com/ampeco/public-api-mcp.git"
|
|
40
|
+
},
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public"
|
|
43
|
+
},
|
|
44
|
+
"dependencies": {
|
|
45
|
+
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
46
|
+
"zod": "^3.24.1",
|
|
47
|
+
"node-fetch": "^3.3.2",
|
|
48
|
+
"express": "^4.21.2",
|
|
49
|
+
"cors": "^2.8.5"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@readme/openapi-parser": "^2.6.0",
|
|
53
|
+
"@types/node": "^22.10.2",
|
|
54
|
+
"@types/express": "^5.0.0",
|
|
55
|
+
"@types/cors": "^2.8.17",
|
|
56
|
+
"tsx": "^4.19.2",
|
|
57
|
+
"typescript": "^5.7.2",
|
|
58
|
+
"vitest": "^2.1.8"
|
|
59
|
+
}
|
|
60
|
+
}
|