coregrid-crm-mcp 0.1.0 → 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.
Files changed (2) hide show
  1. package/index.js +19 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -61,7 +61,7 @@ const fail = (e) => ({
61
61
 
62
62
  const server = new McpServer({
63
63
  name: "coregrid-crm",
64
- version: "0.1.0",
64
+ version: "0.2.0",
65
65
  });
66
66
 
67
67
  server.tool(
@@ -173,6 +173,24 @@ server.tool(
173
173
  }
174
174
  );
175
175
 
176
+ server.tool(
177
+ "create_share_link",
178
+ "Genera un link público de SOLO LECTURA (con token) para abrir el pipeline completo o una oportunidad específica. Úsalo para mandarle a alguien una vista del tablero o de un lead sin que tenga que iniciar sesión. Devuelve la URL.",
179
+ {
180
+ kind: z.enum(["pipeline", "deal"]).describe("'pipeline' = tablero completo; 'deal' = una oportunidad"),
181
+ dealId: z.string().optional().describe("ID del deal (requerido si kind='deal')"),
182
+ expiresHours: z.number().optional().describe("Horas hasta que expire el link (omitir = sin expiración)"),
183
+ },
184
+ async ({ kind, dealId, expiresHours }) => {
185
+ try {
186
+ const r = await postCrm({ intent: "create_share_link", kind, dealId, expiresHours });
187
+ return ok({ url: r.url });
188
+ } catch (e) {
189
+ return fail(e);
190
+ }
191
+ }
192
+ );
193
+
176
194
  const transport = new StdioServerTransport();
177
195
  await server.connect(transport);
178
196
  console.error(`[coregrid-crm-mcp] conectado a ${API_URL}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coregrid-crm-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "MCP server para el CRM CoreGrid — tools de pipeline/deals para agentes",
5
5
  "type": "module",
6
6
  "bin": {