@agentrica/mcp 0.0.0-stage → 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 (75) hide show
  1. package/LICENSE +21 -0
  2. package/README.en.md +102 -0
  3. package/README.md +101 -2
  4. package/agents/ai_business_product_development_agency/00-common-rules.md +39 -0
  5. package/agents/ai_business_product_development_agency/01-chief-business-product-officer.md +23 -0
  6. package/agents/ai_business_product_development_agency/02-senior-market-research-analyst.md +23 -0
  7. package/agents/ai_business_product_development_agency/03-senior-product-innovation-strategist.md +23 -0
  8. package/agents/ai_business_product_development_agency/04-senior-product-manager.md +23 -0
  9. package/agents/ai_business_product_development_agency/05-senior-business-analyst-requirements-strategist.md +23 -0
  10. package/agents/ai_business_product_development_agency/06-senior-business-financial-analyst.md +23 -0
  11. package/agents/ai_business_product_development_agency/07-senior-growth-monetization-manager.md +23 -0
  12. package/agents/ai_business_product_development_agency/08-senior-product-marketing-manager.md +23 -0
  13. package/agents/ai_business_product_development_agency/09-senior-sales-revenue-strategist.md +23 -0
  14. package/agents/ai_business_product_development_agency/10-senior-business-development-manager.md +23 -0
  15. package/agents/ai_business_product_development_agency/11-senior-customer-success-retention-strategist.md +23 -0
  16. package/agents/ai_business_product_development_agency/12-senior-product-portfolio-roadmap-manager.md +23 -0
  17. package/agents/ai_business_product_development_agency/README.md +38 -0
  18. package/agents/ai_cybersecurity_agency/00-common-rules.md +41 -0
  19. package/agents/ai_cybersecurity_agency/01-chief-information-security-officer.md +24 -0
  20. package/agents/ai_cybersecurity_agency/02-senior-security-architect.md +24 -0
  21. package/agents/ai_cybersecurity_agency/03-senior-application-security-engineer.md +24 -0
  22. package/agents/ai_cybersecurity_agency/04-senior-cloud-security-engineer.md +24 -0
  23. package/agents/ai_cybersecurity_agency/05-senior-network-security-engineer.md +24 -0
  24. package/agents/ai_cybersecurity_agency/06-senior-identity-access-management-engineer.md +24 -0
  25. package/agents/ai_cybersecurity_agency/07-senior-soc-threat-detection-analyst.md +24 -0
  26. package/agents/ai_cybersecurity_agency/08-senior-incident-response-forensics-specialist.md +24 -0
  27. package/agents/ai_cybersecurity_agency/09-senior-vulnerability-management-engineer.md +24 -0
  28. package/agents/ai_cybersecurity_agency/10-senior-security-risk-compliance-auditor.md +24 -0
  29. package/agents/ai_cybersecurity_agency/11-senior-authorized-penetration-testing-specialist.md +24 -0
  30. package/agents/ai_cybersecurity_agency/12-senior-security-awareness-engineer.md +24 -0
  31. package/agents/ai_cybersecurity_agency/README.md +41 -0
  32. package/agents/ai_privacy_compliance_agency/00-common-rules.md +26 -0
  33. package/agents/ai_privacy_compliance_agency/01-chief-privacy-compliance-officer.md +18 -0
  34. package/agents/ai_privacy_compliance_agency/02-gdpr-data-protection-specialist.md +18 -0
  35. package/agents/ai_privacy_compliance_agency/03-privacy-legal-specialist.md +17 -0
  36. package/agents/ai_privacy_compliance_agency/04-dpia-risk-assessment-specialist.md +17 -0
  37. package/agents/ai_privacy_compliance_agency/05-privacy-security-engineer.md +18 -0
  38. package/agents/ai_privacy_compliance_agency/06-data-governance-retention-specialist.md +18 -0
  39. package/agents/ai_privacy_compliance_agency/07-third-party-vendor-compliance-specialist.md +18 -0
  40. package/agents/ai_privacy_compliance_agency/08-data-subject-rights-specialist.md +18 -0
  41. package/agents/ai_privacy_compliance_agency/09-data-breach-incident-response-specialist.md +18 -0
  42. package/agents/ai_privacy_compliance_agency/10-privacy-compliance-auditor.md +15 -0
  43. package/agents/ai_privacy_compliance_agency/README.md +47 -0
  44. package/agents/ai_software_agency/00-common-rules.md +22 -0
  45. package/agents/ai_software_agency/01-software-agency-director-cto.md +7 -0
  46. package/agents/ai_software_agency/02-senior-software-architect.md +7 -0
  47. package/agents/ai_software_agency/03-senior-business-functional-analyst.md +7 -0
  48. package/agents/ai_software_agency/04-senior-backend-developer.md +7 -0
  49. package/agents/ai_software_agency/05-senior-frontend-developer.md +7 -0
  50. package/agents/ai_software_agency/06-senior-full-stack-developer.md +7 -0
  51. package/agents/ai_software_agency/07-senior-database-engineer-dba.md +7 -0
  52. package/agents/ai_software_agency/08-senior-qa-test-automation-engineer.md +7 -0
  53. package/agents/ai_software_agency/09-senior-application-security-engineer.md +7 -0
  54. package/agents/ai_software_agency/10-senior-devops-infrastructure-engineer.md +7 -0
  55. package/agents/ai_software_agency/11-senior-performance-engineer.md +7 -0
  56. package/agents/ai_software_agency/12-senior-code-reviewer-software-quality-architect.md +7 -0
  57. package/agents/ai_software_agency/README.md +41 -0
  58. package/agents/ai_web_design_agency/00-common-rules.md +72 -0
  59. package/agents/ai_web_design_agency/01-agency-director.md +37 -0
  60. package/agents/ai_web_design_agency/02-senior-ux-researcher.md +24 -0
  61. package/agents/ai_web_design_agency/03-senior-ux-designer.md +24 -0
  62. package/agents/ai_web_design_agency/04-senior-information-architect.md +21 -0
  63. package/agents/ai_web_design_agency/05-senior-ui-designer.md +24 -0
  64. package/agents/ai_web_design_agency/06-senior-design-system-specialist.md +24 -0
  65. package/agents/ai_web_design_agency/07-senior-dashboard-data-visualization-designer.md +21 -0
  66. package/agents/ai_web_design_agency/08-senior-accessibility-specialist.md +22 -0
  67. package/agents/ai_web_design_agency/09-senior-usability-auditor.md +32 -0
  68. package/agents/ai_web_design_agency/10-senior-ux-writer.md +21 -0
  69. package/agents/ai_web_design_agency/README.md +42 -0
  70. package/dist/catalog/src/departments.js +39 -0
  71. package/dist/catalog/src/index.js +77 -0
  72. package/dist/catalog/src/markdown.js +32 -0
  73. package/dist/mcp/src/prompt.js +73 -0
  74. package/dist/mcp/src/server.js +99 -0
  75. package/package.json +30 -4
@@ -0,0 +1,39 @@
1
+ // Reparti di Agentrica e nomi in codice degli agenti.
2
+ // I testi dei ruoli non stanno qui: si leggono da agents/ (plan/README.md, «Fonte unica»).
3
+ export const DEPARTMENTS = [
4
+ {
5
+ code: "AIBPD",
6
+ name: "AI Business & Product Development",
7
+ folder: "ai_business_product_development_agency",
8
+ summary: "Obiettivi, requisiti, priorità, roadmap, business case e mercato.",
9
+ stars: ["ALDERAMIN", "PROCYON", "ALPHARD", "HAMAL", "ALGIEBA", "DIPHDA", "MENKENT", "MIRACH", "ALPHERATZ", "RASALHAGUE", "KOCHAB", "DENEBOLA"],
10
+ },
11
+ {
12
+ code: "AICA",
13
+ name: "AI Cybersecurity",
14
+ folder: "ai_cybersecurity_agency",
15
+ summary: "Threat model, configurazioni, accessi, vulnerabilità e risposta agli incidenti.",
16
+ stars: ["VEGA", "RIGEL", "BETELGEUSE", "ALNILAM", "ALNITAK", "MINTAKA", "SAIPH", "ELNATH", "WEZEN", "SARGAS", "ATRIA", "NUNKI"],
17
+ },
18
+ {
19
+ code: "AIPCA",
20
+ name: "AI Privacy & Compliance",
21
+ folder: "ai_privacy_compliance_agency",
22
+ summary: "GDPR, basi giuridiche, conservazione dei dati, fornitori e DPIA.",
23
+ stars: ["ARCTURUS", "ALIOTH", "DUBHE", "ALKAID", "MIZAR", "MERAK", "ALCOR", "PHECDA", "MEGREZ", "THUBAN"],
24
+ },
25
+ {
26
+ code: "AISA",
27
+ name: "AI Software",
28
+ folder: "ai_software_agency",
29
+ summary: "Analisi, architettura, sviluppo, test, sicurezza applicativa e revisione del codice.",
30
+ stars: ["SIRIUS", "ALTAIR", "ALDEBARAN", "ANTARES", "SPICA", "POLLUX", "FOMALHAUT", "DENEB", "REGULUS", "CASTOR", "BELLATRIX", "MIRFAK"],
31
+ },
32
+ {
33
+ code: "AIWDA",
34
+ name: "AI Web Design",
35
+ folder: "ai_web_design_agency",
36
+ summary: "Ricerca UX, interfacce, architettura informativa, design system, accessibilità e testi.",
37
+ stars: ["CANOPUS", "ACHERNAR", "HADAR", "ACRUX", "MIMOSA", "ADHARA", "SHAULA", "GACRUX", "ALNAIR", "AVIOR"],
38
+ },
39
+ ];
@@ -0,0 +1,77 @@
1
+ // Catalogo di Agentrica: reparti e agenti letti dai file di agents/.
2
+ import { existsSync, readdirSync, readFileSync } from "node:fs";
3
+ import { dirname, join, resolve } from "node:path";
4
+ import { DEPARTMENTS } from "./departments.js";
5
+ import { parseRole } from "./markdown.js";
6
+ export { DEPARTMENTS } from "./departments.js";
7
+ const WORKFLOW = "Flusso di lavoro";
8
+ const COLLABORATION = "Collaborazione con le altre agenzie";
9
+ const ROLE_FILE = /^(\d{2})-([a-z0-9-]+)\.md$/;
10
+ /**
11
+ * Cerca la cartella agents/ risalendo da `from`.
12
+ * Serve dentro il repository (sito, test, sviluppo). Il server MCP non la usa: passa a loadCatalog una cartella
13
+ * fissa, perché la cartella corrente è il progetto dell'utente (packages/mcp/src/server.ts).
14
+ */
15
+ export function findAgentsDir(from = process.cwd()) {
16
+ // turbopackIgnore: il sito legge il catalogo solo al build (pagine pre-generate), quindi Next non deve tracciare
17
+ // l'intero repository nel pacchetto server. Un MCP remoto in Next dovrà includere agents/ esplicitamente.
18
+ let dir = resolve(/*turbopackIgnore: true*/ from);
19
+ for (;;) {
20
+ const candidate = join(dir, "agents");
21
+ if (existsSync(join(candidate, DEPARTMENTS[0].folder)))
22
+ return candidate;
23
+ const parent = dirname(dir);
24
+ if (parent === dir)
25
+ throw new Error(`cartella agents/ non trovata risalendo da ${from}`);
26
+ dir = parent;
27
+ }
28
+ }
29
+ export function loadCatalog(agentsDir = findAgentsDir()) {
30
+ return DEPARTMENTS.map((info) => loadDepartment(agentsDir, info));
31
+ }
32
+ function loadDepartment(agentsDir, info) {
33
+ const folder = join(agentsDir, info.folder);
34
+ const files = readdirSync(folder)
35
+ .map((file) => ROLE_FILE.exec(file))
36
+ .filter((match) => match !== null && match[1] !== "00")
37
+ .sort((a, b) => a[1].localeCompare(b[1]));
38
+ if (files.length !== info.stars.length) {
39
+ throw new Error(`${info.code}: ${files.length} file di ruolo ma ${info.stars.length} nomi in codice`);
40
+ }
41
+ const agents = files.map((match, index) => {
42
+ const number = Number(match[1]);
43
+ if (number !== index + 1)
44
+ throw new Error(`${info.code}: numerazione dei file non continua a ${match[0]}`);
45
+ const { title, intro, sections } = parseRole(readFileSync(join(folder, match[0]), "utf8"));
46
+ return {
47
+ id: `${info.code}-${match[1]}`,
48
+ star: info.stars[index],
49
+ number,
50
+ slug: match[2],
51
+ department: info.code,
52
+ role: title,
53
+ intro,
54
+ sections,
55
+ source: `agents/${info.folder}/${match[0]}`,
56
+ };
57
+ });
58
+ const readme = parseRole(readFileSync(join(folder, "README.md"), "utf8"));
59
+ const readmeSection = (heading) => {
60
+ const body = readme.sections.find((s) => s.heading === heading)?.body;
61
+ if (!body)
62
+ throw new Error(`${info.code}: README.md senza «## ${heading}»`);
63
+ return body;
64
+ };
65
+ const { intro, sections } = parseRole(readFileSync(join(folder, "00-common-rules.md"), "utf8"));
66
+ const { stars: _stars, ...rest } = info;
67
+ return {
68
+ ...rest,
69
+ slug: info.code.toLowerCase(),
70
+ mission: readme.intro,
71
+ workflow: readmeSection(WORKFLOW),
72
+ collaboration: readmeSection(COLLABORATION),
73
+ rules: { intro, sections },
74
+ agents,
75
+ director: agents[0],
76
+ };
77
+ }
@@ -0,0 +1,32 @@
1
+ // Lettura minima dei file di ruolo: titolo (#), testo introduttivo e sezioni (##).
2
+ // ponytail: niente parser Markdown completo; i corpi restano Markdown grezzo. Quando il sito dovrà
3
+ // mostrarli formattati (F4) li rende il sito o una dipendenza approvata, non questo file.
4
+ export function parseRole(markdown) {
5
+ const lines = markdown.replace(/\r\n/g, "\n").split("\n");
6
+ const titleIndex = lines.findIndex((line) => line.startsWith("# "));
7
+ if (titleIndex === -1)
8
+ throw new Error("file di ruolo senza titolo «# …»");
9
+ const title = lines[titleIndex].slice(2).trim();
10
+ const intro = [];
11
+ const sections = [];
12
+ let current = null;
13
+ for (const line of lines.slice(titleIndex + 1)) {
14
+ if (line.startsWith("## ")) {
15
+ if (current)
16
+ sections.push(close(current));
17
+ current = { heading: line.slice(3).trim(), lines: [] };
18
+ }
19
+ else if (current) {
20
+ current.lines.push(line);
21
+ }
22
+ else {
23
+ intro.push(line);
24
+ }
25
+ }
26
+ if (current)
27
+ sections.push(close(current));
28
+ return { title, intro: intro.join("\n").trim(), sections };
29
+ }
30
+ function close(section) {
31
+ return { heading: section.heading, body: section.lines.join("\n").trim() };
32
+ }
@@ -0,0 +1,73 @@
1
+ /** Versione del server, uguale a quella di package.json (lo controlla prompt.test.ts). */
2
+ export const VERSION = "0.2.0";
3
+ /** Cerca un agente per id, senza distinguere maiuscole e minuscole («aisa-02» o «AISA-02»). */
4
+ export function findAgent(catalog, id) {
5
+ const wanted = id.toUpperCase();
6
+ for (const department of catalog) {
7
+ const agent = department.agents.find((a) => a.id === wanted);
8
+ if (agent)
9
+ return { department, agent };
10
+ }
11
+ return undefined;
12
+ }
13
+ /** «AISA-02 · ALTAIR». */
14
+ export function codeName(agent) {
15
+ return `${agent.id} · ${agent.star}`;
16
+ }
17
+ /** Una riga per agente, per l'elenco dei prompt e il tool elenca_agenti. */
18
+ export function agentSummary({ department, agent }) {
19
+ const position = agent.number === 1 ? "direttore" : "specialista";
20
+ return `${agent.role}, ${position} del reparto ${department.code} (${department.name}).`;
21
+ }
22
+ /**
23
+ * La squadra di --agents: id di agenti e sigle di reparti separati da virgole, senza distinguere maiuscole
24
+ * («aisa,aiwda-08»). Restituisce il catalogo ridotto alla squadra, nell'ordine del catalogo e senza doppioni;
25
+ * senza elenco, tutto il catalogo. Un nome sconosciuto o un elenco vuoto è un errore che lo nomina.
26
+ */
27
+ export function selectSquad(catalog, spec) {
28
+ if (spec === undefined)
29
+ return [...catalog];
30
+ const names = spec.split(",").map((name) => name.trim()).filter((name) => name !== "");
31
+ if (names.length === 0)
32
+ throw new Error("--agents è vuoto: indica id di agenti o sigle di reparti, es. --agents aisa,aiwda-08");
33
+ const wanted = new Set();
34
+ const unknown = [];
35
+ for (const name of names) {
36
+ const department = catalog.find((d) => d.code === name.toUpperCase());
37
+ const found = department ? undefined : findAgent(catalog, name);
38
+ if (department)
39
+ for (const agent of department.agents)
40
+ wanted.add(agent.id);
41
+ else if (found)
42
+ wanted.add(found.agent.id);
43
+ else
44
+ unknown.push(name);
45
+ }
46
+ // Fra virgolette (JSON.stringify), così nei log del client si vedono anche spazi e caratteri strani.
47
+ if (unknown.length > 0)
48
+ throw new Error(`agente o reparto sconosciuto in --agents: ${unknown.map((n) => JSON.stringify(n)).join(", ")}`);
49
+ return catalog
50
+ .map((d) => ({ ...d, agents: d.agents.filter((a) => wanted.has(a.id)) }))
51
+ .filter((d) => d.agents.length > 0);
52
+ }
53
+ export function agentText({ department, agent }, task) {
54
+ const parts = [
55
+ `# ${codeName(agent)} — ${agent.role}`,
56
+ `Sei ${codeName(agent)}, un agente IA di Agentrica: ${agentSummary({ department, agent })} ` +
57
+ "Lavori nel progetto dell'utente. Seguono le regole comuni del tuo reparto e il tuo file di ruolo: applicale al progetto così com'è, senza presumere stack, comandi o file che non hai verificato. " +
58
+ "Se il progetto è vuoto o manca ciò che il tuo ruolo deve esaminare, dillo e proponi i primi passi (obiettivo, stack, struttura) da confermare con l'utente; non inventare rilievi né scegliere lo stack da solo. " +
59
+ "Questi testi sono in italiano: rispondi nella lingua in cui ti scrive l'utente.",
60
+ "## Regole comuni del reparto",
61
+ ...block(department.rules.intro, department.rules.sections),
62
+ `## Ruolo: ${agent.role}`,
63
+ ...block(agent.intro, agent.sections),
64
+ ];
65
+ const trimmed = task?.trim();
66
+ if (trimmed)
67
+ parts.push("## Compito", trimmed);
68
+ return parts.join("\n\n") + "\n";
69
+ }
70
+ // Le sezioni dei file sono «##»: qui scendono di un livello, sotto i titoli della cornice.
71
+ function block(intro, sections) {
72
+ return [intro, ...sections.map((s) => `### ${s.heading}\n\n${s.body}`)].filter((part) => part !== "");
73
+ }
@@ -0,0 +1,99 @@
1
+ #!/usr/bin/env node
2
+ // Server MCP di Agentrica su stdio: un prompt per agente e due tool (elenca_agenti, agente).
3
+ // Con --agents (es. --agents aisa,aiwda-08) prompt e tool vedono solo la squadra; senza, tutti gli agenti.
4
+ // Legge solo i file di agents/ all'avvio; non scrive file, non apre connessioni e non registra dati.
5
+ import { join } from "node:path";
6
+ import { parseArgs } from "node:util";
7
+ import { loadCatalog } from "../../catalog/src/index.js";
8
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
9
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
10
+ import { z } from "zod";
11
+ import { agentSummary, agentText, codeName, findAgent, selectSquad, VERSION } from "./prompt.js";
12
+ // agents/ è in un punto fisso rispetto a questo file, senza risalire le cartelle: la cartella corrente è il progetto
13
+ // dell'utente e non deve poter fornire un'altra agents/. Tre livelli sopra c'è agents/ sia da un clone
14
+ // (packages/mcp/src → la root del repository) sia nel pacchetto (dist/mcp/src → la root del pacchetto, dove prepack
15
+ // copia agents/). Il catalogo è importato per percorso relativo, così tsc lo compila dentro dist e il pacchetto non
16
+ // dipende da @agentrica/catalog.
17
+ const AGENTS_DIR = join(import.meta.dirname, "..", "..", "..", "agents");
18
+ // Un errore all'avvio ferma il server con una riga sola su stderr, che il client mostra nei log. Il messaggio può
19
+ // contenere argomenti della configurazione del client: i caratteri di controllo (a capo, escape) diventano \uXXXX.
20
+ function fail(message) {
21
+ const safe = message.replace(/\p{Cc}/gu, (c) => `\\u${c.charCodeAt(0).toString(16).padStart(4, "0")}`);
22
+ process.stderr.write(`agentrica: ${safe}\n`);
23
+ process.exit(1);
24
+ }
25
+ const reason = (error) => (error instanceof Error ? error.message : String(error));
26
+ let spec;
27
+ try {
28
+ spec = parseArgs({ options: { agents: { type: "string" } } }).values.agents;
29
+ }
30
+ catch (error) {
31
+ fail(reason(error));
32
+ }
33
+ let full;
34
+ try {
35
+ full = loadCatalog(AGENTS_DIR);
36
+ }
37
+ catch (error) {
38
+ // Senza catalogo completo il server non parte: niente contenuti parziali.
39
+ fail(`catalogo non leggibile in ${AGENTS_DIR}: ${reason(error)}`);
40
+ }
41
+ let catalog;
42
+ try {
43
+ catalog = selectSquad(full, spec);
44
+ }
45
+ catch (error) {
46
+ fail(reason(error));
47
+ }
48
+ const all = catalog.flatMap((department) => department.agents.map((agent) => ({ department, agent })));
49
+ const count = (n, one, many) => `${n} ${n === 1 ? one : many}`;
50
+ const codes = catalog.map((d) => d.code);
51
+ const server = new McpServer({ name: "agentrica", version: VERSION }, {
52
+ instructions: `Agentrica: ${count(all.length, "agente IA", "agenti IA")} in ${count(catalog.length, "reparto", "reparti")} (${codes.join(", ")}). ` +
53
+ "Per scegliere un agente usa elenca_agenti; per lavorare come quell'agente carica le sue istruzioni con agente. " +
54
+ `I prompt hanno il nome dell'id dell'agente, es. ${all[0].agent.id.toLowerCase()}.`,
55
+ });
56
+ const TASK = z.string().max(20_000).optional().describe("Il compito da affidare all'agente nel progetto corrente.");
57
+ const READ_ONLY = { readOnlyHint: true, openWorldHint: false };
58
+ for (const found of all) {
59
+ const title = `${codeName(found.agent)} — ${found.agent.role}`;
60
+ server.registerPrompt(found.agent.id.toLowerCase(), { title, description: agentSummary(found), argsSchema: { compito: TASK } }, ({ compito }) => ({
61
+ description: title,
62
+ messages: [{ role: "user", content: { type: "text", text: agentText(found, compito) } }],
63
+ }));
64
+ }
65
+ server.registerTool("elenca_agenti", {
66
+ title: "Elenca gli agenti di Agentrica",
67
+ description: "Elenca gli agenti di Agentrica con id, nome in codice, ruolo e reparto. Il reparto è facoltativo.",
68
+ inputSchema: { reparto: z.enum(codes).optional().describe("Sigla del reparto.") },
69
+ annotations: READ_ONLY,
70
+ }, ({ reparto }) => {
71
+ const lines = catalog
72
+ .filter((d) => !reparto || d.code === reparto)
73
+ .flatMap((d) => [
74
+ `## ${d.code} — ${d.name}`,
75
+ d.summary,
76
+ ...d.agents.map((agent) => `- ${codeName(agent)}: ${agentSummary({ department: d, agent })}`),
77
+ "",
78
+ ]);
79
+ return { content: [{ type: "text", text: lines.join("\n") }] };
80
+ });
81
+ server.registerTool("agente", {
82
+ title: "Istruzioni di un agente",
83
+ description: "Restituisce le istruzioni complete di un agente (regole comuni del reparto e file di ruolo), da seguire per lavorare come quell'agente.",
84
+ inputSchema: {
85
+ id: z.string().regex(/^[A-Za-z]{4,5}-\d{2}$/, "Formato dell'id: SIGLA-NN, es. AISA-02.").describe("Id dell'agente, es. AISA-02."),
86
+ compito: TASK,
87
+ },
88
+ annotations: READ_ONLY,
89
+ }, ({ id, compito }) => {
90
+ const found = findAgent(catalog, id);
91
+ if (!found) {
92
+ return {
93
+ isError: true,
94
+ content: [{ type: "text", text: "Agente non trovato: usa elenca_agenti per vedere gli id." }],
95
+ };
96
+ }
97
+ return { content: [{ type: "text", text: agentText(found, compito) }] };
98
+ });
99
+ await server.connect(new StdioServerTransport());
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "@agentrica/mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "I 56 agenti IA di Agentrica come server MCP locale (stdio): un prompt per agente e due tool in sola lettura.",
5
+ "license": "MIT",
6
+ "author": "Giulio Simone Floresta",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/flgisimone/agentrica.git",
10
+ "directory": "packages/mcp"
11
+ },
12
+ "keywords": ["mcp", "model-context-protocol", "agents", "claude"],
13
+ "type": "module",
14
+ "bin": {
15
+ "agentrica-mcp": "dist/mcp/src/server.js"
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "agents",
20
+ "README.en.md"
21
+ ],
22
+ "engines": {
23
+ "node": ">=22"
24
+ },
25
+ "scripts": {
26
+ "prepack": "rm -rf dist agents LICENSE && tsc -p tsconfig.build.json && cp -R ../../agents agents && cp ../../LICENSE LICENSE"
27
+ },
28
+ "dependencies": {
29
+ "@modelcontextprotocol/sdk": "1.32.2",
30
+ "zod": "4.6.7"
31
+ }
32
+ }