Skip to main content
Glama
AlexW00

ArtifactHub MCP Server

by AlexW00
info.ts1.17 kB
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { z } from "zod"; import { getChartInfo } from "../services/artifactHub.js"; import { InfoParams } from "../types/artifactHub.js"; // Register the info tool with the server export function registerInfoTool(server: McpServer) { return server.tool( "helm-chart-info", "Get information about a Helm chart from Artifact Hub, including ID, latest version, and description", { chartRepo: z.string().describe("The Helm chart repository name"), chartName: z.string().describe("The Helm chart name"), }, async ({ chartRepo, chartName }: InfoParams) => { try { const data = await getChartInfo(chartRepo, chartName); return { content: [ { type: "text", text: JSON.stringify( { id: data.package_id, latest_version: data.version, description: data.description, }, null, 2 ), }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error retrieving chart info: ${(error as Error).message}`, }, ], }; } } ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AlexW00/artifacthub-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server