genudo-mcp-client 1.0.1 → 1.0.2

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 +26 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -17,6 +17,30 @@ const ALLOW_INSECURE_SSL = process.env.GENUDO_ALLOW_INSECURE_SSL === 'true';
17
17
  const REQUEST_TIMEOUT = parseInt(process.env.GENUDO_REQUEST_TIMEOUT || '8000', 10);
18
18
  const REQUEST_RETRIES = parseInt(process.env.GENUDO_REQUEST_RETRIES || '4', 10);
19
19
 
20
+ // Server-level guidance returned in the `initialize` handshake. MCP clients
21
+ // (Claude Code, Codex, Cursor, ...) inject this into the model's context, so it
22
+ // teaches any client how to get value fast and avoid the common failure modes —
23
+ // without the user having to write prompts. Keep it concise and high-signal.
24
+ const SERVER_INSTRUCTIONS = [
25
+ 'Genudo MCP: control + analytics for AI sales/support pipelines (pipelines, stages, actions/webhooks, variables, contacts, opportunities, messages, analytics). 21 tools, read + write.',
26
+ '',
27
+ 'PICK A PATTERN:',
28
+ '- Audit a pipeline: list_pipelines -> list_pipeline_stages -> list_variables -> list_opportunities -> list_contacts -> list_messages',
29
+ '- Build from scratch: start_pipeline_journey (ALWAYS first) -> get_pipeline_options (valid IDs) -> create_pipeline -> create_stage (xN) -> create_variable -> create_action',
30
+ '- Add an integration: list_pipelines -> list_pipeline_stages -> list_variables -> create_variable -> create_action',
31
+ '- Report activity: get_account_summary -> get_ai_performance -> list_opportunities -> get_messaging_stats',
32
+ '',
33
+ 'RULES THAT PREVENT FAILURES:',
34
+ '1. Discover IDs before writing: get_pipeline_options (agent_type_id, ai_model_id, language_id, channel_id); list_pipelines (pipeline_id); list_pipeline_stages (stage_id); list_variables (variable_id).',
35
+ '2. Actions CANNOT use raw system placeholders. Never put {{opportunity.contact_email}} in an action url/headers/payload. Instead create_variable {type:"from_system", value:"opportunity.contact_email"} and reference {{its_name}}. Variable types: fixed | from_system | from_action | from_ai.',
36
+ '3. create_pipeline: if is_model_routing_enabled=true, model_pool is required with exactly 4 tiers (router, simple, moderate, complex). persona + instructions drive quality — ask the user for a 1-2 sentence business description, then offer to write them.',
37
+ '4. create_stage nature in {neutral, won, lost}. create_action fixed_trigger in {stage_started, on_any_message, on_user_message, custom}; omit stage_id for a pipeline-wide action.',
38
+ '5. Immutable after create: pipeline agent_type; action fixed_trigger can only change to on_user_message/custom on update; update_opportunities stage moves must stay within the same pipeline.',
39
+ '6. Not exposed (do not attempt): listing actions, deleting actions/stages/pipelines, KB management, sending manual messages, reading plan limits.',
40
+ '',
41
+ 'Confirm before bulk writes (update_opportunities is bulk). The backend can be slow on the first call — retries are automatic.'
42
+ ].join('\n');
43
+
20
44
  // HTTPS agent configuration
21
45
  // For local development with self-signed certificates, set GENUDO_ALLOW_INSECURE_SSL=true
22
46
  const httpsAgent = new https.Agent({
@@ -147,7 +171,8 @@ async function processInput(line) {
147
171
  result: {
148
172
  protocolVersion: (request.params && request.params.protocolVersion) || '2024-11-05',
149
173
  capabilities: { tools: {} },
150
- serverInfo: { name: 'Genudo', version: '1.0.0' }
174
+ serverInfo: { name: 'Genudo', version: '1.0.2' },
175
+ instructions: SERVER_INSTRUCTIONS
151
176
  }
152
177
  }));
153
178
  forwardRequest({ jsonrpc: '2.0', id: 'warmup', method: 'tools/list', params: {} })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genudo-mcp-client",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "A lightweight bridge connecting Claude Code to Genudo's Model Context Protocol (MCP) server for AI-powered workflow automation",
5
5
  "mcpName": "io.github.genudo-ai/genudo_mcp",
6
6
  "main": "index.js",