@servicialo/mcp-server 0.4.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 +36 -15
- package/dist/index.js +1 -1
- package/dist/tools/authenticated/cerrar.js +2 -2
- package/dist/tools/authenticated/cerrar.js.map +1 -1
- package/dist/tools/authenticated/delivery.js +1 -1
- package/dist/tools/authenticated/delivery.js.map +1 -1
- package/dist/tools/authenticated/entender.js +1 -1
- package/dist/tools/authenticated/entender.js.map +1 -1
- package/dist/tools/authenticated/lifecycle.d.ts +3 -3
- package/dist/tools/authenticated/lifecycle.js +3 -3
- package/dist/tools/authenticated/lifecycle.js.map +1 -1
- package/package.json +11 -5
package/README.md
CHANGED
|
@@ -2,7 +2,11 @@
|
|
|
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
|
-
|
|
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
|
+
|
|
9
|
+
23 tools organized by the 6 lifecycle phases of a service — not by database table.
|
|
6
10
|
|
|
7
11
|
## Two Modes of Operation
|
|
8
12
|
|
|
@@ -20,7 +24,7 @@ No credentials needed. 4 public tools for discovering organizations, services, a
|
|
|
20
24
|
SERVICIALO_API_KEY=your_key SERVICIALO_ORG_ID=your_org npx -y @servicialo/mcp-server
|
|
21
25
|
```
|
|
22
26
|
|
|
23
|
-
Requires `SERVICIALO_API_KEY` and `SERVICIALO_ORG_ID`. Enables all
|
|
27
|
+
Requires `SERVICIALO_API_KEY` and `SERVICIALO_ORG_ID`. Enables all 23 tools across the full service lifecycle.
|
|
24
28
|
|
|
25
29
|
### Claude Desktop Configuration
|
|
26
30
|
|
|
@@ -75,7 +79,7 @@ A well-designed agent follows this order. Each phase has its tools. The standard
|
|
|
75
79
|
|
|
76
80
|
| Tool | Description |
|
|
77
81
|
|---|---|
|
|
78
|
-
| `service.get` | Get the
|
|
82
|
+
| `service.get` | Get the 8 dimensions of a service: what, who delivers, who receives (with separate payer), when, where, lifecycle, evidence, billing |
|
|
79
83
|
| `contract.get` | Get the pre-agreed service contract: required evidence, cancellation policy, no-show policy, dispute terms |
|
|
80
84
|
|
|
81
85
|
## Phase 3 — Comprometer (3 tools)
|
|
@@ -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→
|
|
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
|
|
|
@@ -100,7 +104,7 @@ A well-designed agent follows this order. Each phase has its tools. The standard
|
|
|
100
104
|
| Tool | Description |
|
|
101
105
|
|---|---|
|
|
102
106
|
| `delivery.checkin` | Provider/client check-in with GPS + timestamp → state "En Curso" |
|
|
103
|
-
| `delivery.checkout` | Check-out with GPS + timestamp → state "
|
|
107
|
+
| `delivery.checkout` | Check-out with GPS + timestamp → state "Entregado". Duration auto-calculated |
|
|
104
108
|
| `delivery.record_evidence` | Record delivery evidence per vertical: GPS, signature, photo, document, duration, notes |
|
|
105
109
|
|
|
106
110
|
## Phase 6 — Cerrar (4 tools)
|
|
@@ -108,8 +112,8 @@ A well-designed agent follows this order. Each phase has its tools. The standard
|
|
|
108
112
|
| Tool | Description |
|
|
109
113
|
|---|---|
|
|
110
114
|
| `documentation.create` | Generate service record (clinical note, inspection report, class minutes, etc.) → state "Documentado" |
|
|
111
|
-
| `payments.create_sale` | Create a sale/charge for the documented service → state "
|
|
112
|
-
| `payments.record_payment` | Record payment received.
|
|
115
|
+
| `payments.create_sale` | Create a sale/charge for the documented service → state "Cobrado" |
|
|
116
|
+
| `payments.record_payment` | Record payment received. Payment is independent from lifecycle — billing.status transitions from charged → invoiced → paid |
|
|
113
117
|
| `payments.get_status` | Get payment status for a sale or client account balance |
|
|
114
118
|
|
|
115
119
|
## End-to-End Example
|
|
@@ -125,14 +129,14 @@ scheduling.check_availability({ org_slug: "clinica-kinesia", date_from: "2026-03
|
|
|
125
129
|
→ available slots
|
|
126
130
|
|
|
127
131
|
service.get({ service_id: "srv_123" })
|
|
128
|
-
→
|
|
132
|
+
→ 8 dimensions: duration 45min, location presencial, billing, etc.
|
|
129
133
|
|
|
130
134
|
contract.get({ service_id: "srv_123", org_id: "org_456" })
|
|
131
135
|
→ evidence: check_in + check_out + clinical_record
|
|
132
136
|
→ cancellation: 0% if >24h, 50% if 2-24h, 100% if <2h
|
|
133
137
|
→ dispute window: 48 hours
|
|
134
138
|
|
|
135
|
-
clients.get_or_create({ email: "paciente@mail.com", name: "
|
|
139
|
+
clients.get_or_create({ email: "paciente@mail.com", name: "Maria", last_name: "Lopez", actor: { type: "agent", id: "agent_1" } })
|
|
136
140
|
→ client_id: "cli_789"
|
|
137
141
|
|
|
138
142
|
scheduling.book({ service_id: "srv_123", provider_id: "prov_111", client_id: "cli_789", starts_at: "2026-03-03T10:00:00", actor: { type: "agent", id: "agent_1" } })
|
|
@@ -145,22 +149,26 @@ delivery.checkin({ session_id: "ses_001", actor: { type: "provider", id: "prov_1
|
|
|
145
149
|
→ state: "in_progress"
|
|
146
150
|
|
|
147
151
|
delivery.checkout({ session_id: "ses_001", actor: { type: "provider", id: "prov_111" }, location: { lat: -33.45, lng: -70.66 } })
|
|
148
|
-
→ state: "
|
|
152
|
+
→ state: "delivered", duration: 42min
|
|
149
153
|
|
|
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
|
-
documentation.create({ session_id: "ses_001", content: "
|
|
157
|
+
documentation.create({ session_id: "ses_001", content: "Sesion de rehabilitacion...", actor: { type: "provider", id: "prov_111" } })
|
|
154
158
|
→ state: "documented"
|
|
155
159
|
|
|
156
160
|
payments.create_sale({ client_id: "cli_789", service_id: "srv_123", provider_id: "prov_111", unit_price: 35000 })
|
|
157
|
-
→ sale_id: "sale_001", state: "
|
|
161
|
+
→ sale_id: "sale_001", state: "charged"
|
|
158
162
|
|
|
159
|
-
|
|
160
|
-
→ state: "
|
|
163
|
+
lifecycle.transition({ session_id: "ses_001", to_state: "verified", actor: { type: "client", id: "cli_789" } })
|
|
164
|
+
→ state: "verified"
|
|
161
165
|
```
|
|
162
166
|
|
|
163
|
-
##
|
|
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,6 +186,19 @@ payments.record_payment({ venta_id: "sale_001", amount: 35000, method: "transfer
|
|
|
178
186
|
| `providers.get_commission` | Removed (not part of service lifecycle) |
|
|
179
187
|
| `payroll.*` (5 tools) | Removed (not part of service lifecycle) |
|
|
180
188
|
|
|
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.
|
|
192
|
+
|
|
193
|
+
| Previous State | Current State | Notes |
|
|
194
|
+
|---|---|---|
|
|
195
|
+
| Completed | Delivered | Renamed — provider marks delivery, not completion |
|
|
196
|
+
| Documented | Documented | Unchanged — comes after Delivered |
|
|
197
|
+
| Invoiced | — | Removed from lifecycle — tracked in billing.status |
|
|
198
|
+
| Collected | — | Removed from lifecycle — tracked in billing.status |
|
|
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 |
|
|
201
|
+
|
|
181
202
|
## Development
|
|
182
203
|
|
|
183
204
|
```bash
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export const cerrarTools = {
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
'payments.create_sale': {
|
|
21
|
-
description: '[Fase 6 — Cerrar] Crea una venta (cargo) asociada a un servicio documentado. Mueve la sesión a "
|
|
21
|
+
description: '[Fase 6 — Cerrar] Crea una venta (cargo) asociada a un servicio documentado. Mueve la sesión a "Cobrado". Debe llamarse después de documentation.create.',
|
|
22
22
|
schema: z.object({
|
|
23
23
|
client_id: z.string().describe('ID del cliente'),
|
|
24
24
|
service_id: z.string().describe('ID del servicio'),
|
|
@@ -37,7 +37,7 @@ export const cerrarTools = {
|
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
39
|
'payments.record_payment': {
|
|
40
|
-
description: '[Fase 6 — Cerrar] Registra un
|
|
40
|
+
description: '[Fase 6 — Cerrar] Registra un pago recibido contra una venta existente. El pago es independiente del ciclo de vida — billing.status transiciona de charged → invoiced → paid.',
|
|
41
41
|
schema: z.object({
|
|
42
42
|
venta_id: z.string().describe('ID de la venta'),
|
|
43
43
|
amount: z.number().describe('Monto cobrado'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cerrar.js","sourceRoot":"","sources":["../../../src/tools/authenticated/cerrar.ts"],"names":[],"mappings":"AAAA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SAC9F,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAA8C,EAAE,EAAE;YAC1F,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;gBACjB,OAAO,MAAM,CAAC,GAAG,CAAC,sBAAsB,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;YAC1D,CAAC;YACD,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACnB,OAAO,MAAM,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,SAAS,kBAAkB,CAAC,CAAC;YAC9E,CAAC;YACD,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;QACtD,CAAC;KACF;CACF,CAAC"}
|
|
@@ -18,7 +18,7 @@ export const deliveryTools = {
|
|
|
18
18
|
},
|
|
19
19
|
},
|
|
20
20
|
'delivery.checkout': {
|
|
21
|
-
description: '[Fase 5 — Verificar entrega] Registra el check-out al finalizar el servicio, moviendo la sesión a "
|
|
21
|
+
description: '[Fase 5 — Verificar entrega] Registra el check-out al finalizar el servicio, moviendo la sesión a "Entregado". Captura timestamp y ubicación GPS. La duración real se calcula automáticamente.',
|
|
22
22
|
schema: z.object({
|
|
23
23
|
session_id: z.string().describe('ID de la sesión'),
|
|
24
24
|
actor: ActorSchema.describe('Quién hace check-out (provider o client)'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"delivery.js","sourceRoot":"","sources":["../../../src/tools/authenticated/delivery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,kBAAkB,EAAE;QAClB,WAAW,EACT,qLAAqL;QACvL,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YACl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AC,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YACnH,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,qDAAqD,CAAC;YAC3F,KAAK,EAAE,WAAW,CAAC,QAAQ,CAAC,6BAA6B,CAAC;SAC3D,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAAsH,EAAE,EAAE;YAClK,OAAO,MAAM,CAAC,IAAI,CAAC,wBAAwB,IAAI,CAAC,UAAU,WAAW,EAAE;gBACrE,YAAY,EAAE,IAAI,CAAC,aAAa;gBAChC,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export const entenderTools = {
|
|
3
3
|
'service.get': {
|
|
4
|
-
description: '[Fase 2 — Entender] Obtiene las
|
|
4
|
+
description: '[Fase 2 — Entender] Obtiene las 8 dimensiones de un servicio: qué se entrega, quién lo entrega, quién lo recibe (con pagador separado), cuándo, dónde, ciclo de vida, evidencia requerida y cobro. Llama esto para entender completamente un servicio antes de comprometerse.',
|
|
5
5
|
schema: z.object({
|
|
6
6
|
service_id: z.string().describe('ID del servicio'),
|
|
7
7
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entender.js","sourceRoot":"","sources":["../../../src/tools/authenticated/entender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,aAAa,EAAE;QACb,WAAW,EACT
|
|
1
|
+
{"version":3,"file":"entender.js","sourceRoot":"","sources":["../../../src/tools/authenticated/entender.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,aAAa,EAAE;QACb,WAAW,EACT,+QAA+Q;QACjR,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,EAAE,CAAC,CAAC;QAC/D,CAAC;KACF;IAED,cAAc,EAAE;QACd,WAAW,EACT,kPAAkP;QACpP,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;YAClD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uBAAuB,CAAC;SACrD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,MAAwB,EAAE,IAA4C,EAAE,EAAE;YACxF,OAAO,MAAM,CAAC,GAAG,CAAC,wBAAwB,IAAI,CAAC,UAAU,WAAW,EAAE;gBACpE,KAAK,EAAE,IAAI,CAAC,MAAM;aACnB,CAAC,CAAC;QACL,CAAC;KACF;CACF,CAAC"}
|
|
@@ -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<["
|
|
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: "
|
|
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: "
|
|
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→
|
|
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
|
-
'
|
|
19
|
-
'
|
|
18
|
+
'scheduled', 'confirmed', 'in_progress',
|
|
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,
|
|
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,gWAAgW;QAClW,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;YACf,UAAU,EAAE,CAAC,CAAC,MAAM,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M,CAAC,GAAG,CAAC,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.
|
|
4
|
-
"description": "
|
|
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
|
-
"
|
|
40
|
+
"scheduling",
|
|
41
|
+
"healthcare",
|
|
42
|
+
"ai-agents"
|
|
37
43
|
]
|
|
38
44
|
}
|