Skip to main content
Glama

NTV Scaffolding MCP Server

PROJECT_SUMMARY.mdโ€ข8.02 kB
# ๐Ÿ“ฆ NTV Scaffolding MCP Server - Project Summary ## ๐ŸŽฏ What Was Created A complete **Model Context Protocol (MCP) Server** that enables AI assistants to easily discover, understand, and generate code for **NTV Scaffolding Angular components**. ## ๐Ÿ“ Project Structure ``` component-mcp/ โ”œโ”€โ”€ src/ โ”‚ โ”œโ”€โ”€ index.ts # Main MCP server entry point โ”‚ โ”œโ”€โ”€ tools/ # Tool implementations โ”‚ โ”‚ โ”œโ”€โ”€ index.ts # Tool registry & exports โ”‚ โ”‚ โ”œโ”€โ”€ listComponents.ts # List components tool โ”‚ โ”‚ โ”œโ”€โ”€ getComponentDoc.ts # Documentation tool โ”‚ โ”‚ โ”œโ”€โ”€ getComponentProps.ts # Properties tool โ”‚ โ”‚ โ”œโ”€โ”€ generateTemplateCode.ts # Template generation tool โ”‚ โ”‚ โ”œโ”€โ”€ generateComponentUsage.ts # Usage examples tool โ”‚ โ”‚ โ”œโ”€โ”€ generateComponent.ts # File generation tool โ”‚ โ”‚ โ””โ”€โ”€ getComponentExamples.ts # Examples tool โ”‚ โ”œโ”€โ”€ data/ โ”‚ โ”‚ โ””โ”€โ”€ components.ts # Component database (10 components) โ”‚ โ””โ”€โ”€ resources/ โ”‚ โ””โ”€โ”€ index.ts # Resource handlers โ”œโ”€โ”€ dist/ # Compiled output (generated by npm run build) โ”œโ”€โ”€ package.json # Project dependencies โ”œโ”€โ”€ tsconfig.json # TypeScript configuration โ”œโ”€โ”€ .gitignore # Git ignore rules โ”œโ”€โ”€ README.md # Full documentation โ”œโ”€โ”€ QUICK_START.md # 3-minute quick start guide โ”œโ”€โ”€ INTEGRATION.md # Integration with AI clients โ”œโ”€โ”€ PROJECT_SUMMARY.md # This file โ””โ”€โ”€ LICENSE # MIT License ``` ## ๐Ÿ”ง Core Features ### 7 Powerful Tools 1. **list_ntv_components** - List all components with filtering 2. **get_ntv_component_doc** - Full documentation with props, events, examples 3. **get_ntv_component_props** - Detailed property information 4. **generate_ntv_template_code** - Generate HTML templates 5. **generate_ntv_component_usage** - Complete code examples (basic/advanced/full-form) 6. **generate_ntv_component_file** - Generate complete component files (.ts, .html, .css, .spec.ts) 7. **get_ntv_component_examples** - Predefined usage examples ### 10 Supported Components - **UI**: Button, Card, Modal, Popover - **Form**: Input, Autocomplete - **Navigation**: Accordion, Stepper - **Data**: ThumbnailGallery - **Layout**: Template Each component includes: - Full property documentation - Event definitions - Slots/content areas - Usage examples - Best practices ## ๐Ÿš€ Quick Start ```bash # Navigate to project cd C:\Users\Admin\Documents\repos\component-mcp # Install dependencies npm install # Build npm run build # Start server npm start ``` ## ๐Ÿ”Œ Integration Points - **Cursor Editor** - Built-in MCP support - **VS Code** - MCP Client extension - **Cody** - Sourcegraph integration - **Claude API** - Direct API integration - **Command Line** - Direct tool invocation See `INTEGRATION.md` for detailed setup instructions. ## ๐Ÿ“š Documentation | Document | Purpose | |----------|---------| | `README.md` | Full server documentation with tool details | | `QUICK_START.md` | 3-minute setup and usage guide | | `INTEGRATION.md` | Integration with various AI clients | | `PROJECT_SUMMARY.md` | This overview document | ## ๐Ÿ—๏ธ Technology Stack - **Runtime**: Node.js 18+ - **Language**: TypeScript 5.3+ - **Framework**: MCP SDK (@modelcontextprotocol/sdk) - **Build Tool**: TypeScript compiler ## ๐Ÿ“ฆ Components Database Located in `src/data/components.ts`, contains: ```typescript interface Component { name: string; selector: string; category: "ui" | "form" | "navigation" | "data" | "layout" | "utility"; description: string; props: ComponentProp[]; configInterface?: string; events?: ComponentEvent[]; slots?: ComponentSlot[]; examples?: ComponentExample[]; bestPractices?: string[]; } ``` Easy to extend with new components! ## ๐ŸŽ“ Use Cases ### For AI Assistants: 1. Discover what components are available 2. Get detailed documentation 3. Generate templates and code 4. Create complete example files 5. Understand best practices ### For Developers: 1. Quick component reference 2. Boilerplate code generation 3. Example code snippets 4. Type-safe configuration objects 5. Automated file generation ## ๐Ÿ” Security - โœ… Input validation on all tools - โœ… Read-only component database - โœ… No file system access - โœ… Sandboxed tool execution - โœ… Type-safe operations ## ๐Ÿ“ˆ Extensibility ### Adding New Tools 1. Create `src/tools/myTool.ts` 2. Implement `MCPTool` interface 3. Export from `src/tools/index.ts` 4. Tool automatically registered ### Adding New Components 1. Edit `src/data/components.ts` 2. Add to `COMPONENTS_DB` array 3. Rebuild: `npm run build` 4. Restart server: `npm start` ## ๐Ÿšข Deployment ### Development ```bash npm run dev ``` ### Production ```bash npm run build npm start ``` ### Docker ```bash docker build -t ntv-mcp-server . docker run -p 3000:3000 ntv-mcp-server ``` ## ๐Ÿ“Š Performance - Instant component lookup (in-memory database) - Efficient code generation - Minimal resource footprint - Scalable tool architecture ## ๐ŸŽฏ Key Benefits โœจ **AI-Friendly**: Designed specifically for AI assistant interaction ๐Ÿ“š **Well-Documented**: Comprehensive docs and examples ๐Ÿ”ง **Easy Setup**: 3-minute quick start ๐Ÿš€ **Extensible**: Add components and tools easily ๐Ÿ”’ **Secure**: Type-safe and validated โšก **Fast**: Instant component discovery and code generation ๐Ÿงฉ **Modular**: Each tool is independent and focused ## ๐Ÿ“ API Examples ### List Components ```json { "name": "list_ntv_components", "params": { "category": "form" } } ``` ### Get Documentation ```json { "name": "get_ntv_component_doc", "params": { "component": "Button" } } ``` ### Generate Template ```json { "name": "generate_ntv_template_code", "params": { "component": "Button", "variant": "primary", "size": "lg" } } ``` ## ๐Ÿ”„ Development Workflow ``` Edit source โ†’ npm run build โ†’ npm start โ†’ Test in AI client โ†“ TypeScript compile โ†“ dist/ created ``` ## ๐Ÿ“‹ Package Scripts | Command | Purpose | |---------|---------| | `npm run build` | Build TypeScript | | `npm run watch` | Watch mode (auto-rebuild) | | `npm start` | Start MCP server | | `npm run dev` | Dev mode with ts-node | ## ๐Ÿงช Testing Tools can be tested: 1. Via AI client integration 2. Via MCP protocol directly 3. Via command line tools 4. Via Claude API ## ๐ŸŽ What You Get โœ… Production-ready MCP server โœ… 7 powerful tools โœ… 10 documented components โœ… Complete integration guides โœ… Quick start documentation โœ… Extensible architecture โœ… Type-safe codebase โœ… MIT licensed ## ๐Ÿ”— Related Projects - **NTV Scaffolding**: The component library itself - **Nx**: Build system and monorepo management - **Angular**: Component framework - **Tailwind CSS**: Styling system - **Storybook**: Component documentation ## ๐Ÿ“ž Support & Maintenance - Regular updates to component database - Easy to add new components - Extensible tool system - Community contributions welcome ## ๐ŸŽ‰ Next Steps 1. โœ… Review documentation 2. ๐Ÿš€ Start the server 3. ๐Ÿ”Œ Integrate with your AI client 4. ๐ŸŽจ Start generating components! --- **Created**: October 2025 **Version**: 1.0.0 **License**: MIT **Status**: โœ… Production Ready --- ## ๐Ÿ“ž Quick Links - **README**: Full documentation and tool details - **Quick Start**: Get running in 3 minutes - **Integration Guide**: Setup with AI clients - **Component Database**: View all available components **Enjoy generating components with AI! ๐Ÿš€**

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/stephenlumban/component-mcp'

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