Skip to main content
Glama
by m-yoshiro
list-components.ts579 B
import { getComponents } from '../storybook-api.js'; import { ErrorCode, McpError, } from '@modelcontextprotocol/sdk/types.js'; export const listComponents = async (storybookStaticDir: string) => { try { const components = await getComponents(storybookStaticDir); return { content: [ { type: 'text', text: JSON.stringify(components, null, 2), }, ], }; } catch (error) { console.error('Error listing components:', error); throw new McpError(ErrorCode.InternalError, 'Failed to list components'); } };

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/m-yoshiro/storybook-mcp'

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