autocatalog-agents-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.
- package/LICENSE +21 -0
- package/README.md +7 -2
- package/dist/chunk-UJNEDUVP.js +278 -0
- package/dist/chunk-UJNEDUVP.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.js +7 -0
- package/dist/server.js.map +1 -0
- package/package.json +43 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jag Reehal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# autocatalog-agents-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An MCP server over stdio that answers questions about an agent catalog. Start
|
|
4
|
+
it with `ac agents mcp --root .` from `autocatalog-agents-cli`.
|
|
5
|
+
|
|
6
|
+
Documented at **[jagreehal.github.io/autocatalog](https://jagreehal.github.io/autocatalog)**.
|
|
7
|
+
|
|
8
|
+
MIT. No licence key, no telemetry.
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
// src/server.ts
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { EntityKindSchema as EntityKindSchema2 } from "autocatalog-agents-core";
|
|
5
|
+
|
|
6
|
+
// src/tools.ts
|
|
7
|
+
import {
|
|
8
|
+
auditCatalog,
|
|
9
|
+
computeImpact,
|
|
10
|
+
ENTITY_KINDS,
|
|
11
|
+
EntityKindSchema,
|
|
12
|
+
estimateAgentCost,
|
|
13
|
+
filterForAudience,
|
|
14
|
+
groupFindings,
|
|
15
|
+
refKey,
|
|
16
|
+
rollupCost,
|
|
17
|
+
totalMonthlyCost
|
|
18
|
+
} from "autocatalog-agents-core";
|
|
19
|
+
import { computeDrift, loadObservations } from "autocatalog-agents-adapter-autotel";
|
|
20
|
+
var parseRef = (s) => {
|
|
21
|
+
const idx = s.indexOf("/");
|
|
22
|
+
if (idx <= 0 || idx === s.length - 1) {
|
|
23
|
+
throw new Error(`invalid ref "${s}" \u2014 expected <kind>/<id>`);
|
|
24
|
+
}
|
|
25
|
+
const rawKind = s.slice(0, idx);
|
|
26
|
+
const kind = EntityKindSchema.safeParse(rawKind);
|
|
27
|
+
if (!kind.success) {
|
|
28
|
+
throw new Error(`unknown kind "${rawKind}" \u2014 must be one of ${ENTITY_KINDS.join(", ")}`);
|
|
29
|
+
}
|
|
30
|
+
return { kind: kind.data, id: s.slice(idx + 1) };
|
|
31
|
+
};
|
|
32
|
+
var summarise = (kind, e) => {
|
|
33
|
+
const summary = {
|
|
34
|
+
ref: `${kind}/${e.id}`,
|
|
35
|
+
id: e.id,
|
|
36
|
+
name: e.name,
|
|
37
|
+
status: e.status,
|
|
38
|
+
owner: e.owner
|
|
39
|
+
};
|
|
40
|
+
if (e.description) summary.description = e.description;
|
|
41
|
+
return summary;
|
|
42
|
+
};
|
|
43
|
+
var listEntities = (cat, kind) => {
|
|
44
|
+
const bucket = cat.entities.get(kind);
|
|
45
|
+
if (!bucket) return [];
|
|
46
|
+
return [...bucket.values()].map((e) => summarise(kind, e));
|
|
47
|
+
};
|
|
48
|
+
var describeEntity = (cat, refStr) => {
|
|
49
|
+
const ref = parseRef(refStr);
|
|
50
|
+
const entity = cat.entities.get(ref.kind)?.get(ref.id);
|
|
51
|
+
if (!entity) throw new Error(`not found: ${refStr}`);
|
|
52
|
+
const meta = cat.meta.get(refKey(ref.kind, ref.id));
|
|
53
|
+
const body = meta?.body ? filterForAudience(meta.body, "agent").trim() : "";
|
|
54
|
+
return body ? { ref: refStr, ...entity, body } : { ref: refStr, ...entity };
|
|
55
|
+
};
|
|
56
|
+
var impactEntity = (cat, refStr) => {
|
|
57
|
+
const ref = parseRef(refStr);
|
|
58
|
+
if (!cat.entities.get(ref.kind)?.has(ref.id)) {
|
|
59
|
+
throw new Error(`not found: ${refStr}`);
|
|
60
|
+
}
|
|
61
|
+
const report = computeImpact(cat, ref);
|
|
62
|
+
const result = {
|
|
63
|
+
subject: `${report.subject.kind}/${report.subject.id}`,
|
|
64
|
+
dependsOn: report.dependencies.map((d) => `${d.kind}/${d.id}`),
|
|
65
|
+
dependedOnBy: report.dependents.map((d) => `${d.kind}/${d.id}`)
|
|
66
|
+
};
|
|
67
|
+
if (report.events) result.events = report.events;
|
|
68
|
+
return result;
|
|
69
|
+
};
|
|
70
|
+
var matchesQuery = (query, e) => {
|
|
71
|
+
const q = query.toLowerCase();
|
|
72
|
+
const haystack = [e.id, e.name, e.description ?? "", e.owner].join(" ").toLowerCase();
|
|
73
|
+
return haystack.includes(q);
|
|
74
|
+
};
|
|
75
|
+
var searchEntities = (cat, query) => {
|
|
76
|
+
const results = [];
|
|
77
|
+
for (const kind of ENTITY_KINDS) {
|
|
78
|
+
for (const e of cat.entities.get(kind)?.values() ?? []) {
|
|
79
|
+
if (matchesQuery(query, e)) results.push(summarise(kind, e));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return results;
|
|
83
|
+
};
|
|
84
|
+
var attrMatches = (entity, attribute, value) => {
|
|
85
|
+
const raw = Object.entries(entity).find(([key]) => key === attribute)?.[1];
|
|
86
|
+
if (raw === void 0 || raw === null) return false;
|
|
87
|
+
if (Array.isArray(raw)) return raw.some((v) => String(v) === value);
|
|
88
|
+
return String(raw) === value;
|
|
89
|
+
};
|
|
90
|
+
var findBy = (cat, attribute, value) => {
|
|
91
|
+
const results = [];
|
|
92
|
+
for (const kind of ENTITY_KINDS) {
|
|
93
|
+
for (const e of cat.entities.get(kind)?.values() ?? []) {
|
|
94
|
+
if (attrMatches(e, attribute, value)) results.push(summarise(kind, e));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
return results;
|
|
98
|
+
};
|
|
99
|
+
var cost = (cat, args) => {
|
|
100
|
+
if (args.by) {
|
|
101
|
+
return {
|
|
102
|
+
rollup: rollupCost(cat, args.by),
|
|
103
|
+
total: totalMonthlyCost(cat)
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
if (args.agent) {
|
|
107
|
+
const id = args.agent.startsWith("agent/") ? args.agent.slice("agent/".length) : args.agent;
|
|
108
|
+
if (!cat.entities.get("agent")?.has(id)) {
|
|
109
|
+
throw new Error(`unknown agent: ${id}`);
|
|
110
|
+
}
|
|
111
|
+
return estimateAgentCost(cat, id);
|
|
112
|
+
}
|
|
113
|
+
return { total: totalMonthlyCost(cat) };
|
|
114
|
+
};
|
|
115
|
+
var audit = (cat, args = {}) => {
|
|
116
|
+
const findings = auditCatalog(cat);
|
|
117
|
+
const filtered = args.minSeverity ? findings.filter((f) => {
|
|
118
|
+
const order = { P0: 0, P1: 1, P2: 2 };
|
|
119
|
+
return order[f.severity] <= order[args.minSeverity];
|
|
120
|
+
}) : findings;
|
|
121
|
+
const grouped = groupFindings(filtered);
|
|
122
|
+
return {
|
|
123
|
+
counts: { P0: grouped.P0.length, P1: grouped.P1.length, P2: grouped.P2.length },
|
|
124
|
+
findings: filtered
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
var drift = async (cat, args) => {
|
|
128
|
+
const obs = await loadObservations(args.file);
|
|
129
|
+
return computeDrift(cat, obs);
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// src/server.ts
|
|
133
|
+
var RefSchema = z.string().min(3).regex(/^[a-z]+\/[a-zA-Z0-9_-]+$/, "expected <kind>/<id>");
|
|
134
|
+
var asText = (data) => ({
|
|
135
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }]
|
|
136
|
+
});
|
|
137
|
+
var asError = (cause) => ({
|
|
138
|
+
isError: true,
|
|
139
|
+
content: [
|
|
140
|
+
{ type: "text", text: cause instanceof Error ? cause.message : String(cause) }
|
|
141
|
+
]
|
|
142
|
+
});
|
|
143
|
+
var createServer = (catalog) => {
|
|
144
|
+
const server = new McpServer({ name: "autocatalog-agents", version: "0.0.0" });
|
|
145
|
+
server.registerTool(
|
|
146
|
+
"list",
|
|
147
|
+
{
|
|
148
|
+
title: "List entities of a kind",
|
|
149
|
+
description: "Enumerate every entity of a given kind (agent, tool, model, workflow, domain, eval, policy).",
|
|
150
|
+
inputSchema: { kind: EntityKindSchema2 }
|
|
151
|
+
},
|
|
152
|
+
async ({ kind }) => {
|
|
153
|
+
try {
|
|
154
|
+
return asText(listEntities(catalog, kind));
|
|
155
|
+
} catch (e) {
|
|
156
|
+
return asError(e);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
);
|
|
160
|
+
server.registerTool(
|
|
161
|
+
"describe",
|
|
162
|
+
{
|
|
163
|
+
title: "Describe one entity",
|
|
164
|
+
description: 'Return the full record (frontmatter + edges) for a single entity by "<kind>/<id>" ref.',
|
|
165
|
+
inputSchema: { ref: RefSchema }
|
|
166
|
+
},
|
|
167
|
+
async ({ ref }) => {
|
|
168
|
+
try {
|
|
169
|
+
return asText(describeEntity(catalog, ref));
|
|
170
|
+
} catch (e) {
|
|
171
|
+
return asError(e);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
);
|
|
175
|
+
server.registerTool(
|
|
176
|
+
"impact",
|
|
177
|
+
{
|
|
178
|
+
title: "Impact analysis",
|
|
179
|
+
description: "Show what an entity depends on and what depends on it, and for an agent or tool the events it produces and consumes. Use this before changing a prompt, tool, model, or policy. For who consumes an event, ask the event catalog MCP server (assess_impact): it includes agents.",
|
|
180
|
+
inputSchema: { ref: RefSchema }
|
|
181
|
+
},
|
|
182
|
+
async ({ ref }) => {
|
|
183
|
+
try {
|
|
184
|
+
return asText(impactEntity(catalog, ref));
|
|
185
|
+
} catch (e) {
|
|
186
|
+
return asError(e);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
server.registerTool(
|
|
191
|
+
"search",
|
|
192
|
+
{
|
|
193
|
+
title: "Full-text search",
|
|
194
|
+
description: "Substring match across every entity's id, name, description, and owner. Returns summarised hits.",
|
|
195
|
+
inputSchema: { query: z.string().min(1) }
|
|
196
|
+
},
|
|
197
|
+
async ({ query }) => {
|
|
198
|
+
try {
|
|
199
|
+
return asText(searchEntities(catalog, query));
|
|
200
|
+
} catch (e) {
|
|
201
|
+
return asError(e);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
server.registerTool(
|
|
206
|
+
"find_by",
|
|
207
|
+
{
|
|
208
|
+
title: "Find entities by attribute",
|
|
209
|
+
description: "Return entities where a top-level attribute equals (or array-includes) the given value. Examples: attribute=owner value=support-platform; attribute=tools value=issue-refund; attribute=risk value=high.",
|
|
210
|
+
inputSchema: { attribute: z.string().min(1), value: z.string().min(1) }
|
|
211
|
+
},
|
|
212
|
+
async ({ attribute, value }) => {
|
|
213
|
+
try {
|
|
214
|
+
return asText(findBy(catalog, attribute, value));
|
|
215
|
+
} catch (e) {
|
|
216
|
+
return asError(e);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
server.registerTool(
|
|
221
|
+
"cost",
|
|
222
|
+
{
|
|
223
|
+
title: "Cost estimate / rollup",
|
|
224
|
+
description: "Estimated monthly cost for one Agent (pass `agent`), or a rollup across the catalog by domain/owner/model (pass `by`). With neither, returns just the catalog total. Uses each Agent's declared `expected_traffic` and the referenced Model's `cost_per_million_*` rates.",
|
|
225
|
+
inputSchema: {
|
|
226
|
+
agent: z.string().optional(),
|
|
227
|
+
by: z.enum(["domain", "owner", "model"]).optional()
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
async ({ agent, by }) => {
|
|
231
|
+
try {
|
|
232
|
+
return asText(cost(catalog, { agent, by }));
|
|
233
|
+
} catch (e) {
|
|
234
|
+
return asError(e);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
server.registerTool(
|
|
239
|
+
"audit",
|
|
240
|
+
{
|
|
241
|
+
title: "Run the catalog audit",
|
|
242
|
+
description: "Run the built-in audit ruleset (high-risk agents without evals, agents using destructive tools without policies, cost-unestimated agents, orphan tools/models/policies, missing prompts, missing domains). Optionally filter to findings at or above a minimum severity (P0 strictest). Returns counts and a sorted finding list.",
|
|
243
|
+
inputSchema: {
|
|
244
|
+
minSeverity: z.enum(["P0", "P1", "P2"]).optional()
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
async ({ minSeverity }) => {
|
|
248
|
+
try {
|
|
249
|
+
return asText(audit(catalog, { minSeverity }));
|
|
250
|
+
} catch (e) {
|
|
251
|
+
return asError(e);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
);
|
|
255
|
+
server.registerTool(
|
|
256
|
+
"drift",
|
|
257
|
+
{
|
|
258
|
+
title: "Detect drift between observed traces and the declared catalog",
|
|
259
|
+
description: "Load an OTLP JSON file (from autotel, OpenLLMetry, or any OTel emitter), extract observed agent \u2192 tool / agent \u2192 model edges, and diff against the declared catalog. Returns drifts: undeclared tools called in production, model mismatches, agents that emit traces but are not in the catalog, declared tools never observed.",
|
|
260
|
+
inputSchema: {
|
|
261
|
+
file: z.string().min(1)
|
|
262
|
+
}
|
|
263
|
+
},
|
|
264
|
+
async ({ file }) => {
|
|
265
|
+
try {
|
|
266
|
+
return asText(await drift(catalog, { file }));
|
|
267
|
+
} catch (e) {
|
|
268
|
+
return asError(e);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
);
|
|
272
|
+
return server;
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
export {
|
|
276
|
+
createServer
|
|
277
|
+
};
|
|
278
|
+
//# sourceMappingURL=chunk-UJNEDUVP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/server.ts","../src/tools.ts"],"sourcesContent":["import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { z } from 'zod';\nimport { EntityKindSchema, type Catalog } from 'autocatalog-agents-core';\nimport {\n audit,\n cost,\n describeEntity,\n drift,\n findBy,\n impactEntity,\n listEntities,\n searchEntities,\n} from './tools.js';\n\nconst RefSchema = z\n .string()\n .min(3)\n .regex(/^[a-z]+\\/[a-zA-Z0-9_-]+$/, 'expected <kind>/<id>');\n\nconst asText = <T>(data: T) => ({\n content: [{ type: 'text' as const, text: JSON.stringify(data, null, 2) }],\n});\n\nconst asError = (cause: unknown) => ({\n isError: true,\n content: [\n { type: 'text' as const, text: cause instanceof Error ? cause.message : String(cause) },\n ],\n});\n\nexport const createServer = (catalog: Catalog): McpServer => {\n const server = new McpServer({ name: 'autocatalog-agents', version: '0.0.0' });\n\n server.registerTool(\n 'list',\n {\n title: 'List entities of a kind',\n description:\n 'Enumerate every entity of a given kind (agent, tool, model, workflow, domain, eval, policy).',\n inputSchema: { kind: EntityKindSchema },\n },\n async ({ kind }) => {\n try {\n return asText(listEntities(catalog, kind));\n } catch (e) {\n return asError(e);\n }\n },\n );\n\n server.registerTool(\n 'describe',\n {\n title: 'Describe one entity',\n description:\n 'Return the full record (frontmatter + edges) for a single entity by \"<kind>/<id>\" ref.',\n inputSchema: { ref: RefSchema },\n },\n async ({ ref }) => {\n try {\n return asText(describeEntity(catalog, ref));\n } catch (e) {\n return asError(e);\n }\n },\n );\n\n server.registerTool(\n 'impact',\n {\n title: 'Impact analysis',\n description:\n 'Show what an entity depends on and what depends on it, and for an agent or tool the events it produces and consumes. Use this before changing a prompt, tool, model, or policy. For who consumes an event, ask the event catalog MCP server (assess_impact): it includes agents.',\n inputSchema: { ref: RefSchema },\n },\n async ({ ref }) => {\n try {\n return asText(impactEntity(catalog, ref));\n } catch (e) {\n return asError(e);\n }\n },\n );\n\n server.registerTool(\n 'search',\n {\n title: 'Full-text search',\n description:\n \"Substring match across every entity's id, name, description, and owner. Returns summarised hits.\",\n inputSchema: { query: z.string().min(1) },\n },\n async ({ query }) => {\n try {\n return asText(searchEntities(catalog, query));\n } catch (e) {\n return asError(e);\n }\n },\n );\n\n server.registerTool(\n 'find_by',\n {\n title: 'Find entities by attribute',\n description:\n 'Return entities where a top-level attribute equals (or array-includes) the given value. Examples: attribute=owner value=support-platform; attribute=tools value=issue-refund; attribute=risk value=high.',\n inputSchema: { attribute: z.string().min(1), value: z.string().min(1) },\n },\n async ({ attribute, value }) => {\n try {\n return asText(findBy(catalog, attribute, value));\n } catch (e) {\n return asError(e);\n }\n },\n );\n\n server.registerTool(\n 'cost',\n {\n title: 'Cost estimate / rollup',\n description:\n \"Estimated monthly cost for one Agent (pass `agent`), or a rollup across the catalog by domain/owner/model (pass `by`). With neither, returns just the catalog total. Uses each Agent's declared `expected_traffic` and the referenced Model's `cost_per_million_*` rates.\",\n inputSchema: {\n agent: z.string().optional(),\n by: z.enum(['domain', 'owner', 'model']).optional(),\n },\n },\n async ({ agent, by }) => {\n try {\n return asText(cost(catalog, { agent, by }));\n } catch (e) {\n return asError(e);\n }\n },\n );\n\n server.registerTool(\n 'audit',\n {\n title: 'Run the catalog audit',\n description:\n 'Run the built-in audit ruleset (high-risk agents without evals, agents using destructive tools without policies, cost-unestimated agents, orphan tools/models/policies, missing prompts, missing domains). Optionally filter to findings at or above a minimum severity (P0 strictest). Returns counts and a sorted finding list.',\n inputSchema: {\n minSeverity: z.enum(['P0', 'P1', 'P2']).optional(),\n },\n },\n async ({ minSeverity }) => {\n try {\n return asText(audit(catalog, { minSeverity }));\n } catch (e) {\n return asError(e);\n }\n },\n );\n\n server.registerTool(\n 'drift',\n {\n title: 'Detect drift between observed traces and the declared catalog',\n description:\n 'Load an OTLP JSON file (from autotel, OpenLLMetry, or any OTel emitter), extract observed agent → tool / agent → model edges, and diff against the declared catalog. Returns drifts: undeclared tools called in production, model mismatches, agents that emit traces but are not in the catalog, declared tools never observed.',\n inputSchema: {\n file: z.string().min(1),\n },\n },\n async ({ file }) => {\n try {\n return asText(await drift(catalog, { file }));\n } catch (e) {\n return asError(e);\n }\n },\n );\n\n return server;\n};\n","import {\n auditCatalog,\n computeImpact,\n ENTITY_KINDS,\n EntityKindSchema,\n estimateAgentCost,\n filterForAudience,\n groupFindings,\n refKey,\n rollupCost,\n totalMonthlyCost,\n type Catalog,\n type Entity,\n type EntityKind,\n type EntityRef,\n type ImpactReport,\n type RollupKey,\n type Severity,\n} from 'autocatalog-agents-core';\nimport { computeDrift, loadObservations } from 'autocatalog-agents-adapter-autotel';\n\nconst parseRef = (s: string): EntityRef => {\n const idx = s.indexOf('/');\n\n if (idx <= 0 || idx === s.length - 1) {\n throw new Error(`invalid ref \"${s}\" — expected <kind>/<id>`);\n }\n\n const rawKind = s.slice(0, idx);\n const kind = EntityKindSchema.safeParse(rawKind);\n\n if (!kind.success) {\n throw new Error(`unknown kind \"${rawKind}\" — must be one of ${ENTITY_KINDS.join(', ')}`);\n }\n\n return { kind: kind.data, id: s.slice(idx + 1) };\n};\n\ntype EntitySummary = {\n ref: string;\n id: string;\n name: string;\n status: Entity['status'];\n owner: string;\n description?: string;\n};\n\nconst summarise = (kind: EntityKind, e: Entity): EntitySummary => {\n const summary: EntitySummary = {\n ref: `${kind}/${e.id}`,\n id: e.id,\n name: e.name,\n status: e.status,\n owner: e.owner,\n };\n\n if (e.description) summary.description = e.description;\n\n return summary;\n};\n\nexport const listEntities = (cat: Catalog, kind: EntityKind) => {\n const bucket = cat.entities.get(kind);\n\n if (!bucket) return [];\n\n return [...bucket.values()].map((e) => summarise(kind, e));\n};\n\nexport const describeEntity = (cat: Catalog, refStr: string) => {\n const ref = parseRef(refStr);\n const entity = cat.entities.get(ref.kind)?.get(ref.id);\n\n if (!entity) throw new Error(`not found: ${refStr}`);\n const meta = cat.meta.get(refKey(ref.kind, ref.id));\n const body = meta?.body ? filterForAudience(meta.body, 'agent').trim() : '';\n\n return body ? { ref: refStr, ...entity, body } : { ref: refStr, ...entity };\n};\n\n/** An impact report with refs flattened to `kind/id`, for a client reading JSON. */\ntype ImpactResult = {\n subject: string;\n dependsOn: string[];\n dependedOnBy: string[];\n events?: ImpactReport['events'];\n};\n\nexport const impactEntity = (cat: Catalog, refStr: string) => {\n const ref = parseRef(refStr);\n\n if (!cat.entities.get(ref.kind)?.has(ref.id)) {\n throw new Error(`not found: ${refStr}`);\n }\n\n const report = computeImpact(cat, ref);\n\n const result: ImpactResult = {\n subject: `${report.subject.kind}/${report.subject.id}`,\n dependsOn: report.dependencies.map((d) => `${d.kind}/${d.id}`),\n dependedOnBy: report.dependents.map((d) => `${d.kind}/${d.id}`),\n };\n\n if (report.events) result.events = report.events;\n\n return result;\n};\n\nconst matchesQuery = (query: string, e: Entity): boolean => {\n const q = query.toLowerCase();\n const haystack = [e.id, e.name, e.description ?? '', e.owner].join(' ').toLowerCase();\n\n return haystack.includes(q);\n};\n\nexport const searchEntities = (cat: Catalog, query: string) => {\n const results: Array<ReturnType<typeof summarise>> = [];\n\n for (const kind of ENTITY_KINDS) {\n for (const e of cat.entities.get(kind)?.values() ?? []) {\n if (matchesQuery(query, e)) results.push(summarise(kind, e));\n }\n }\n\n return results;\n};\n\nconst attrMatches = (entity: Entity, attribute: string, value: string): boolean => {\n const raw = Object.entries(entity).find(([key]) => key === attribute)?.[1];\n\n if (raw === undefined || raw === null) return false;\n\n if (Array.isArray(raw)) return raw.some((v) => String(v) === value);\n\n return String(raw) === value;\n};\n\nexport const findBy = (cat: Catalog, attribute: string, value: string) => {\n const results: Array<ReturnType<typeof summarise>> = [];\n\n for (const kind of ENTITY_KINDS) {\n for (const e of cat.entities.get(kind)?.values() ?? []) {\n if (attrMatches(e, attribute, value)) results.push(summarise(kind, e));\n }\n }\n\n return results;\n};\n\nexport const cost = (cat: Catalog, args: { agent?: string; by?: RollupKey }) => {\n if (args.by) {\n return {\n rollup: rollupCost(cat, args.by),\n total: totalMonthlyCost(cat),\n };\n }\n\n if (args.agent) {\n const id = args.agent.startsWith('agent/') ? args.agent.slice('agent/'.length) : args.agent;\n\n if (!cat.entities.get('agent')?.has(id)) {\n throw new Error(`unknown agent: ${id}`);\n }\n\n return estimateAgentCost(cat, id);\n }\n\n return { total: totalMonthlyCost(cat) };\n};\n\nexport const audit = (cat: Catalog, args: { minSeverity?: Severity } = {}) => {\n const findings = auditCatalog(cat);\n\n const filtered = args.minSeverity\n ? findings.filter((f) => {\n const order = { P0: 0, P1: 1, P2: 2 };\n\n return order[f.severity] <= order[args.minSeverity!];\n })\n : findings;\n\n const grouped = groupFindings(filtered);\n\n return {\n counts: { P0: grouped.P0.length, P1: grouped.P1.length, P2: grouped.P2.length },\n findings: filtered,\n };\n};\n\nexport const drift = async (cat: Catalog, args: { file: string }) => {\n const obs = await loadObservations(args.file);\n\n return computeDrift(cat, obs);\n};\n"],"mappings":";AAAA,SAAS,iBAA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AAO,MAAM,MAAM,SAAS,EAAE,KAAK,CAAC,CAAC;AAAA,MAC9C,SAAS,GAAG;AACV,eAAO,QAAQ,CAAC;AAAA,MAClB;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;","names":["EntityKindSchema","EntityKindSchema"]}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createServer
|
|
3
|
+
} from "./chunk-UJNEDUVP.js";
|
|
4
|
+
|
|
5
|
+
// src/index.ts
|
|
6
|
+
import { resolve } from "path";
|
|
7
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
8
|
+
import { loadCatalog } from "autocatalog-agents-core";
|
|
9
|
+
var parseArgs = (argv) => {
|
|
10
|
+
let root = ".";
|
|
11
|
+
for (let i = 0; i < argv.length; i++) {
|
|
12
|
+
if (argv[i] === "--root") root = argv[++i] ?? ".";
|
|
13
|
+
}
|
|
14
|
+
return { root };
|
|
15
|
+
};
|
|
16
|
+
var startMcpServer = async (argv = process.argv.slice(2)) => {
|
|
17
|
+
const { root } = parseArgs(argv);
|
|
18
|
+
const catalog = await loadCatalog(resolve(root));
|
|
19
|
+
process.stderr.write(
|
|
20
|
+
`autocatalog-agents mcp: loaded ${[...catalog.entities.values()].reduce(
|
|
21
|
+
(n, b) => n + b.size,
|
|
22
|
+
0
|
|
23
|
+
)} entities from ${resolve(root)}
|
|
24
|
+
`
|
|
25
|
+
);
|
|
26
|
+
const server = createServer(catalog);
|
|
27
|
+
const transport = new StdioServerTransport();
|
|
28
|
+
await server.connect(transport);
|
|
29
|
+
};
|
|
30
|
+
var isEntry = import.meta.url === `file://${process.argv[1]}` || process.argv[1]?.endsWith("mcp/src/index.ts");
|
|
31
|
+
if (isEntry) {
|
|
32
|
+
startMcpServer().catch((err) => {
|
|
33
|
+
process.stderr.write(`fatal: ${err instanceof Error ? err.message : String(err)}
|
|
34
|
+
`);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
createServer,
|
|
40
|
+
startMcpServer
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { resolve } from 'node:path';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { loadCatalog } from 'autocatalog-agents-core';\nimport { createServer } from './server.js';\n\nexport { createServer } from './server.js';\n\nconst parseArgs = (argv: string[]) => {\n let root = '.';\n\n for (let i = 0; i < argv.length; i++) {\n if (argv[i] === '--root') root = argv[++i] ?? '.';\n }\n\n return { root };\n};\n\nexport const startMcpServer = async (argv: string[] = process.argv.slice(2)): Promise<void> => {\n const { root } = parseArgs(argv);\n const catalog = await loadCatalog(resolve(root));\n\n process.stderr.write(\n `autocatalog-agents mcp: loaded ${[...catalog.entities.values()].reduce(\n (n, b) => n + b.size,\n 0,\n )} entities from ${resolve(root)}\\n`,\n );\n\n const server = createServer(catalog);\n const transport = new StdioServerTransport();\n await server.connect(transport);\n};\n\nconst isEntry =\n import.meta.url === `file://${process.argv[1]}` || process.argv[1]?.endsWith('mcp/src/index.ts');\n\nif (isEntry) {\n startMcpServer().catch((err) => {\n process.stderr.write(`fatal: ${err instanceof Error ? err.message : String(err)}\\n`);\n process.exit(1);\n });\n}\n"],"mappings":";;;;;AAAA,SAAS,eAAe;AACxB,SAAS,4BAA4B;AACrC,SAAS,mBAAmB;AAK5B,IAAM,YAAY,CAAC,SAAmB;AACpC,MAAI,OAAO;AAEX,WAAS,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK;AACpC,QAAI,KAAK,CAAC,MAAM,SAAU,QAAO,KAAK,EAAE,CAAC,KAAK;AAAA,EAChD;AAEA,SAAO,EAAE,KAAK;AAChB;AAEO,IAAM,iBAAiB,OAAO,OAAiB,QAAQ,KAAK,MAAM,CAAC,MAAqB;AAC7F,QAAM,EAAE,KAAK,IAAI,UAAU,IAAI;AAC/B,QAAM,UAAU,MAAM,YAAY,QAAQ,IAAI,CAAC;AAE/C,UAAQ,OAAO;AAAA,IACb,kCAAkC,CAAC,GAAG,QAAQ,SAAS,OAAO,CAAC,EAAE;AAAA,MAC/D,CAAC,GAAG,MAAM,IAAI,EAAE;AAAA,MAChB;AAAA,IACF,CAAC,kBAAkB,QAAQ,IAAI,CAAC;AAAA;AAAA,EAClC;AAEA,QAAM,SAAS,aAAa,OAAO;AACnC,QAAM,YAAY,IAAI,qBAAqB;AAC3C,QAAM,OAAO,QAAQ,SAAS;AAChC;AAEA,IAAM,UACJ,YAAY,QAAQ,UAAU,QAAQ,KAAK,CAAC,CAAC,MAAM,QAAQ,KAAK,CAAC,GAAG,SAAS,kBAAkB;AAEjG,IAAI,SAAS;AACX,iBAAe,EAAE,MAAM,CAAC,QAAQ;AAC9B,YAAQ,OAAO,MAAM,UAAU,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC;AAAA,CAAI;AACnF,YAAQ,KAAK,CAAC;AAAA,EAChB,CAAC;AACH;","names":[]}
|
package/dist/server.d.ts
ADDED
package/dist/server.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "autocatalog-agents-mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "MCP server that answers questions about an agent catalog over stdio.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/jagreehal/autocatalog.git",
|
|
9
|
+
"directory": "packages/agents/mcp"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://jagreehal.github.io/autocatalog",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/jagreehal/autocatalog/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
|
+
},
|
|
23
|
+
"./server": {
|
|
24
|
+
"types": "./dist/server.d.ts",
|
|
25
|
+
"import": "./dist/server.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@modelcontextprotocol/sdk": "^1.32.1",
|
|
34
|
+
"zod": "^4.6.5",
|
|
35
|
+
"autocatalog-agents-adapter-autotel": "0.2.0",
|
|
36
|
+
"autocatalog-agents-core": "0.2.0"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@types/node": "^26.6.4",
|
|
40
|
+
"tsup": "^8.5.1",
|
|
41
|
+
"typescript": "^6.0.3"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"build": "tsup"
|
|
45
|
+
}
|
|
6
46
|
}
|