templui-mcp-server
Version:
A Model Context Protocol (MCP) server for TemplUI components, providing AI assistants with access to component source code, documentation, demos, and metadata.
49 lines (48 loc) • 1.33 kB
TypeScript
export declare class GitHubClient {
private apiKey?;
constructor(apiKey?: string);
/**
* Get the source code of a TemplUI component (.templ file)
*/
getComponentSource(componentName: string): Promise<string>;
/**
* Get the JavaScript code for a component (if it exists)
*/
getComponentJavaScript(componentName: string): Promise<string | null>;
/**
* Get showcase/demo code for a component
*/
getComponentDemo(componentName: string): Promise<string[]>;
/**
* Get directory structure of components
*/
getComponentsList(): Promise<string[]>;
/**
* Get latest commit information from the main branch
*/
getLatestCommit(): Promise<{
sha: string;
date: string;
message: string;
}>;
/**
* Get components list from repository for dynamic discovery
*/
getComponentsFromRepository(): Promise<Array<{
name: string;
path: string;
type: string;
}>>;
/**
* Get the directory structure of the repository
*/
getDirectoryStructure(path?: string): Promise<any>;
/**
* Add helpful comments to templ code
*/
private addCommentsToTemplCode;
/**
* Add helpful comments to JavaScript code
*/
private addCommentsToJavaScript;
}