@servicialo/mcp-server 0.5.0 → 0.5.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 CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  MCP server for the [Servicialo](https://servicialo.com) protocol. Connects AI agents to professional services via any Servicialo-compatible platform.
4
4
 
5
+ **Protocol version:** 0.3 · **Package version:** 0.5.0
6
+
7
+ > **Status:** Early-stage protocol with a live reference implementation in healthcare (Chile). The protocol spec is stable. The MCP server implements discovery + scheduling + basic lifecycle. Advanced tools (delivery evidence, payments, documentation) are specified but not yet fully wired to backend endpoints. We're onboarding pilot implementations — [get in touch](https://servicialo.com) if you're building for professional services.
8
+
5
9
  23 tools organized by the 6 lifecycle phases of a service — not by database table.
6
10
 
7
11
  ## Two Modes of Operation
@@ -91,7 +95,7 @@ A well-designed agent follows this order. Each phase has its tools. The standard
91
95
  | Tool | Description |
92
96
  |---|---|
93
97
  | `lifecycle.get_state` | Get current lifecycle state, available transitions, and transition history |
94
- | `lifecycle.transition` | Execute a state transition with evidence. Valid: requested→scheduled, scheduled→confirmed, confirmed→in_progress, in_progress→delivered, delivered→verified, verified→documented, documented→charged, any→cancelled |
98
+ | `lifecycle.transition` | Execute a state transition with evidence. Valid: requested→scheduled, scheduled→confirmed, confirmed→in_progress, in_progress→delivered, delivered→documented, documented→charged, charged→verified, any→cancelled |
95
99
  | `scheduling.reschedule` | Exception flow: reschedule to new datetime. Contract rescheduling policy may apply |
96
100
  | `scheduling.cancel` | Exception flow: cancel with contract cancellation policy applied |
97
101
 
@@ -150,17 +154,21 @@ delivery.checkout({ session_id: "ses_001", actor: { type: "provider", id: "prov_
150
154
  delivery.record_evidence({ session_id: "ses_001", evidence_type: "document", data: { type: "clinical_record", signed_by: ["prov_111", "cli_789"] }, actor: { type: "provider", id: "prov_111" } })
151
155
  → evidence recorded
152
156
 
153
- lifecycle.transition({ session_id: "ses_001", to_state: "verified", actor: { type: "client", id: "cli_789" } })
154
- → state: "verified"
155
-
156
157
  documentation.create({ session_id: "ses_001", content: "Sesion de rehabilitacion...", actor: { type: "provider", id: "prov_111" } })
157
158
  → state: "documented"
158
159
 
159
160
  payments.create_sale({ client_id: "cli_789", service_id: "srv_123", provider_id: "prov_111", unit_price: 35000 })
160
161
  → sale_id: "sale_001", state: "charged"
162
+
163
+ lifecycle.transition({ session_id: "ses_001", to_state: "verified", actor: { type: "client", id: "cli_789" } })
164
+ → state: "verified"
161
165
  ```
162
166
 
163
- ## Migration from v0.3
167
+ ## Changelog
168
+
169
+ ### Package 0.5.0 (current)
170
+
171
+ Consolidated from 38 tools to 23. Tools are now organized by lifecycle phase instead of database entity.
164
172
 
165
173
  | Removed Tool | Replacement |
166
174
  |---|---|
@@ -178,16 +186,18 @@ payments.create_sale({ client_id: "cli_789", service_id: "srv_123", provider_id:
178
186
  | `providers.get_commission` | Removed (not part of service lifecycle) |
179
187
  | `payroll.*` (5 tools) | Removed (not part of service lifecycle) |
180
188
 
181
- ### Lifecycle state changes in v0.2
189
+ ### Protocol 0.3 (current)
190
+
191
+ Lifecycle state order changed. Verified moved from position 6 to position 8 (final). Verification is the closure of the cycle — the client needs the full picture (documentation + charge) before confirming.
182
192
 
183
- | v0.1 State | v0.2 State | Notes |
193
+ | Previous State | Current State | Notes |
184
194
  |---|---|---|
185
195
  | Completed | Delivered | Renamed — provider marks delivery, not completion |
186
- | Documented | Documented | Unchanged — but now comes after Verified |
196
+ | Documented | Documented | Unchanged — comes after Delivered |
187
197
  | Invoiced | — | Removed from lifecycle — tracked in billing.status |
188
198
  | Collected | — | Removed from lifecycle — tracked in billing.status |
189
- | Verified | Verified | Moved from last to 6th verification unlocks documentation and charging |
190
- | | Charged | Newcharge applied 1:1 with verified session |
199
+ | | Charged | New charge applied 1:1 with delivered + documented session |
200
+ | Verified (pos 6) | Verified (pos 8) | Moved to final client confirms or auto-verified after silence window |
191
201
 
192
202
  ## Development
193
203
 
@@ -19,7 +19,7 @@ export declare const lifecycleTools: {
19
19
  description: string;
20
20
  schema: z.ZodObject<{
21
21
  session_id: z.ZodString;
22
- to_state: z.ZodEnum<["scheduled", "confirmed", "in_progress", "delivered", "verified", "documented", "charged", "cancelled"]>;
22
+ to_state: z.ZodEnum<["scheduled", "confirmed", "in_progress", "delivered", "documented", "charged", "verified", "cancelled"]>;
23
23
  actor: z.ZodObject<{
24
24
  type: z.ZodEnum<["client", "provider", "organization", "agent"]>;
25
25
  id: z.ZodString;
@@ -60,7 +60,7 @@ export declare const lifecycleTools: {
60
60
  } | undefined;
61
61
  };
62
62
  session_id: string;
63
- to_state: "scheduled" | "confirmed" | "in_progress" | "delivered" | "verified" | "documented" | "charged" | "cancelled";
63
+ to_state: "scheduled" | "confirmed" | "in_progress" | "delivered" | "documented" | "charged" | "verified" | "cancelled";
64
64
  reason?: string | undefined;
65
65
  evidence?: Record<string, unknown> | undefined;
66
66
  }, {
@@ -73,7 +73,7 @@ export declare const lifecycleTools: {
73
73
  } | undefined;
74
74
  };
75
75
  session_id: string;
76
- to_state: "scheduled" | "confirmed" | "in_progress" | "delivered" | "verified" | "documented" | "charged" | "cancelled";
76
+ to_state: "scheduled" | "confirmed" | "in_progress" | "delivered" | "documented" | "charged" | "verified" | "cancelled";
77
77
  reason?: string | undefined;
78
78
  evidence?: Record<string, unknown> | undefined;
79
79
  }>;
@@ -11,12 +11,12 @@ export const lifecycleTools = {
11
11
  },
12
12
  },
13
13
  'lifecycle.transition': {
14
- description: '[Fase 4 — Ciclo de vida] Ejecuta una transición de estado en el ciclo de vida de una sesión. Transiciones válidas: requested→scheduled, scheduled→confirmed, confirmed→in_progress, in_progress→delivered, delivered→verified, verified→documented, documented→charged, any→cancelled. Cada transición puede requerir evidencia según el contrato del servicio.',
14
+ description: '[Fase 4 — Ciclo de vida] Ejecuta una transición de estado en el ciclo de vida de una sesión. Transiciones válidas: requested→scheduled, scheduled→confirmed, confirmed→in_progress, in_progress→delivered, delivered→documented, documented→charged, charged→verified, any→cancelled. Cada transición puede requerir evidencia según el contrato del servicio.',
15
15
  schema: z.object({
16
16
  session_id: z.string().describe('ID de la sesión'),
17
17
  to_state: z.enum([
18
18
  'scheduled', 'confirmed', 'in_progress',
19
- 'delivered', 'verified', 'documented', 'charged', 'cancelled',
19
+ 'delivered', 'documented', 'charged', 'verified', 'cancelled',
20
20
  ]).describe('Estado destino de la transición'),
21
21
  actor: ActorSchema.describe('Quién ejecuta la transición'),
22
22
  reason: z.string().optional().describe('Motivo de la transición (requerido para cancelled)'),
@@ -1 +1 @@
1
- {"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../../src/tools/authenticated/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,qBAAqB,EAAE;QACrB,WAAW,EACT,wMAAwM;QAC1M,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;SACnD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAA4B,EAAE,EAAE;YACxE,OAAO,MAAM,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,UAAU,YAAY,CAAC,CAAC;QACzE,CAAC;KACF;IAED,sBAAsB,EAAE;QACtB,WAAW,EACT,iWAAiW;QACnW,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAClD,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC;gBACf,WAAW,EAAE,WAAW,EAAE,aAAa;gBACvC,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW;aAC9D,CAAC,CAAC,QAAQ,CAAC,iCAAiC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wBAAwB,IAAI,CAAC,UAAU,EAAE,EAAE;gBAC3D,SAAS,EAAE,IAAI,CAAC,YAAY;gBAC5B,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC;KACF;IAED,mBAAmB,EAAE;QACnB,WAAW,EACT,iQAAiQ;QACnQ,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4BAA4B,CAAC;YAC7D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;YAClE,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,yBAAyB,CAAC;SACvD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAAiF,EAAE,EAAE;YAC7H,OAAO,MAAM,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,UAAU,SAAS,EAAE;gBACnE,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC"}
package/package.json CHANGED
@@ -1,8 +1,13 @@
1
1
  {
2
2
  "name": "@servicialo/mcp-server",
3
- "version": "0.5.0",
4
- "description": "Servidor MCP del protocolo Servicialoconecta agentes de IA con servicios profesionales vía la API de Coordinalo",
3
+ "version": "0.5.1",
4
+ "description": "Open protocol for professional service delivery connects AI agents with scheduling, verification and settlement of professional services",
5
5
  "license": "MIT",
6
+ "homepage": "https://servicialo.ai",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/servicialo/mcp-server.git"
10
+ },
6
11
  "type": "module",
7
12
  "bin": {
8
13
  "servicialo-mcp": "./dist/index.js"
@@ -29,10 +34,11 @@
29
34
  },
30
35
  "keywords": [
31
36
  "mcp",
37
+ "model-context-protocol",
32
38
  "servicialo",
33
- "coordinalo",
34
- "ai-agents",
35
39
  "professional-services",
36
- "model-context-protocol"
40
+ "scheduling",
41
+ "healthcare",
42
+ "ai-agents"
37
43
  ]
38
44
  }