Markdown Converter
Agent skill for markdown-converter
This file provides guidance to AI coding agents when working with code in this repository.
Sign in to like and favorite skills
This file provides guidance to AI coding agents when working with code in this repository.
This is crdmcp, a generic Model Context Protocol (MCP) server for Kubernetes Custom Resource Definitions. It enables companies to create an MCP server that loads their CRDs, sample manifests, and documentation, allowing employees to work with Claude Code to manage company-specific infrastructure resources.
npm run build - Compile TypeScript to JavaScriptnpm run server - Build and start the MCP server (requires --data-dir parameter)npm start -- --data-dir ./examples/company-a --verbose - Start server with example datanpm run dev - Watch mode compilation during developmentnpm run lint - Check code with ESLintnpm run lint:fix - Auto-fix ESLint issuesnpm run format - Format code with PrettierImportant: Always run
npm run lint after making code changes to ensure code quality and consistency.
Critical MCP Logging Rule: Never use
console.log(), console.info(), or console.warn() in MCP servers. Only use console.error() for all logging output. Writing to stdout corrupts the JSON-RPC protocol communication with Claude Desktop.
# Start server with company data npm run server -- --data-dir /path/to/company/crds --verbose # Available CLI options: # --data-dir, -d: Path to company CRD data directory (required) # --verbose, -v: Enable detailed logging # --port, -p: MCP server port (optional)
Data Loading Pipeline (
src/loaders/):
DataLoader orchestrates parallel loading of all data typesCRDLoader parses Kubernetes CRD YAML files and extracts metadataSampleLoader loads sample manifests, categorizes by complexity, extracts tagsInstructionLoader processes markdown files with frontmatter for contextual guidanceTool System (
src/tools/):
BaseTool provides common functionality (similarity matching, instruction filtering)ToolRegistry manages tool registration and execution with error handlingType System (
src/types/):
company-data/ ├── crds/ # Kubernetes CRD YAML files ├── samples/ # Sample manifest YAML files ├── instructions/ # Markdown guidance with frontmatter
The system automatically categorizes CRDs based on naming patterns:
database - Redis, PostgreSQL, MySQL, MongoDB resourcesmessaging - Kafka, RabbitMQ, queue resourcesservice - API gateways, services, proxiesstorage - Storage, volumes, bucketsnetworking - Network policies, ingress, routessecurity - RBAC, policies, certificatesBaseTool class in src/tools/name, description, inputSchema, and execute() methodsToolRegistry constructorthis.data to access loaded CRDs, samples, and instructionsToolResult with success/error status and suggestionsEach loader supports parallel processing and comprehensive error reporting. Loaders automatically:
Tools return structured results with:
The MCP server transforms tool results into appropriate MCP responses with formatted suggestions.
To add new resource categories, update the
inferResourceCategory() function in src/utils/helpers.ts with new naming patterns.
The core MCP server is functional with resource discovery and guidance tools. Remaining planned features include manifest generation/validation tools and comprehensive testing infrastructure.