feat: Komodo MCP server — 7 tools, full API coverage

- komodo_list, komodo_get, komodo_create, komodo_update, komodo_delete,
  komodo_execute, komodo_logs with resource_type routing
- JWT auth with token caching and auto-refresh on 401
- HTTP/SSE transport on port 9800
- TypeScript, @modelcontextprotocol/sdk, zod schemas
- README.md with setup instructions
- references/api.md with full endpoint mapping
This commit is contained in:
2026-09-07 20:36:39 +00:00
parent 15dce68efe
commit 5206ee612d
14 changed files with 2971 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
import { z } from "zod";
import { KomodoClient } from "../komodo-client.js";
import { ResourceType, DELETE_REQUEST_MAP } from "../types.js";
export const deleteInputSchema = {
resource_type: ResourceType.describe(
"Resource type to delete (stack, build, server, procedure, deployment, alerter, sync_resource, tag)",
),
id: z.string().describe("Resource ID or name to delete"),
};
export async function handleDelete(
args: { resource_type: z.infer<typeof ResourceType>; id: string },
client: KomodoClient,
): Promise<{ content: { type: "text"; text: string }[] }> {
const { resource_type, id } = args;
const requestName = DELETE_REQUEST_MAP[resource_type];
if (!requestName) {
throw new Error(
`No DELETE endpoint available for resource type: ${resource_type}`,
);
}
const result = await client.rpc("write", requestName, { id });
return {
content: [
{
type: "text",
text: JSON.stringify(result, null, 2),
},
],
};
}